详细信息错误:
WebAssembly.Memory(): could not allocate memory
at https://*******/ffmpeg-core.js:22:82
at https://*******/ffmpeg.min.js:1:6506
at f (https://*******/ffmpeg.min.js:1:11322)
at Generator._invoke (https://*******/ffmpeg.min.js:1:11110)
at Generator.next (https://*******/ffmpeg.min.js:1:11747)
at i (https://*******/ffmpeg.min.js:1:4295)
at c (https://*******/ffmpeg.min.js:1:4498)ffmpeg的代码:
const downloadWithFFMPEG = async () =>{
const sourceBuffer = await fetch(recordingURL).then(r => r.arrayBuffer());
await ffmpeg.load();
await ffmpeg.FS(
"writeFile",
"input.webm",
new Uint8Array(sourceBuffer, 0, sourceBuffer.byteLength)
);
await ffmpeg.run("-i", "input.webm", "-c", "copy", "output.mp4")
const output = ffmpeg.FS("readFile", "output.mp4");
var link = document.createElement('a')
link.href = URL.createObjectURL(new Blob([output.buffer], { type: 'video/mp4;codecs=H264' }));
link.download = this.data;
link.click();
recording = false;
}问题简介:该错误仅适用于android chrome浏览器。同样的代码在pc/笔记本电脑chrome上运行良好。我也在chrome://上为android浏览器启用了Webassembly-thread,就像有人建议我那样做,但仍然是同样的错误。有人能帮我吗?
发布于 2021-04-24 00:01:53
你可能会收到这个错误,因为设备上没有足够的内存。
这是Wasm应用程序(或通常任何大型应用程序)的常见问题,因为移动设备在硬件方面-在本例中是RAM -比台式机更受限制。
https://stackoverflow.com/questions/67177456
复制相似问题