When a local video renderer uses the ffmpeg.wasm library in the Chrome browser, very often an error with the SBOX_FATAL_MEMORY_EXCEEDED code occurs during the rendering process. The standard command set is used. The code below is half fake because it is very long, but describes an approximate action algorithm. Computer performance and RAM capacity do not affect the video, files used - minimal size. Has anyone experienced this and how can we solve it? Error screen
const videoGenerate = async (project) => {
const ffmpeg = createFFmpeg({
corePath: 'ffmpeg/ffmpeg-core.js',
workerPath: 'ffmpeg/ffmpeg-core.worker.js'
});
await loadFfmpeg(ffmpeg);
project.projectName = "Default";
project.fileType = "video/mp4";
const resultVideo = {
title: `${project.projectName}ConcatenatedVideo.mp4`,
};
// *For fetchFile method and ffmpeg.FS('writeFile', title, file);
await uploadObjects(project.projectName, ffmpeg);
// *
const command = ['-i', project.video, resultVideo.title];
await ffmpeg.run(...command);
await ffmpeg.FS("unlink", resultVideo.title);
resultVideo["blob"] = ffmpeg.FS('readFile', title);
return resultVideo.blob;
};
These dependencies are used: "@ffmpeg/core": " 0.8.5", "@ffmpeg/ffmpeg": " 0.9.7". Upgrading the library to the latest version does not work either.