Hey folks, I'm using FFmpeg to render some videos, but I'm receiving errors every time I try to use a preset that is different from ultrafast or fast. I tried to increase the TOTAL_MEMORY but looks like it is not working. Here is my code:
const result = ffmpeg({
MEMFS: [
{ name: "image.png", data: new Uint8Array(image.data) },
{ name: "video.mp4", data: new Uint8Array(video.data) },
],
TOTAL_MEMORY: 10 * 1024 * 1024,
print: function (data) {},
printErr: function (data) {
stderr += data + "\n";
},
arguments: [
"-loop",
"1",
"-i",
"image.png",
"-i",
"video.mp4",
"-preset",
"superfast",
"-filter_complex",
`[1:v]scale=${videoW}:-1[video];[0:v]scale=iw:-2[bg];[bg][video]overlay=(W-w)/2:${videoY}:shortest=1`,
"out.mp4",
],
onExit: function (code) {
console.log("Process exited with code " + code);
console.log(stderr);
},
});
Hey folks, I'm using FFmpeg to render some videos, but I'm receiving errors every time I try to use a preset that is different from ultrafast or fast. I tried to increase the TOTAL_MEMORY but looks like it is not working. Here is my code:
Output:
Thanks for the amazing work!