Error in detail:
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)
Code for 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;
}
Brief about problem: The error only comes for android chrome browser. The same code works fine on pc/laptop chrome. Have also enabled Webassembly-thread on chrome://flags for android browser as someone suggested me to do it but still same error. Can someone help me?