Chrome ffmpeg.js can not make a video more than 33 seconds

97 Views Asked by At

I am encoding and exporting a video in mp4 and webm format. I am using ffmpeg.js. It works fine but i can not make a video longer than 33 seconds.

let ffmpegArguments:string[] = [];
ffmpegArguments.push("-framerate", (1.0/frameTime).toFixed(0),  "-i", "f%03d.jpg" , 
        "-loglevel", "debug", "-v", "verbose", "-c:v");

I tried to change f%03d.jpg with f%04d.jpg or f%08d.jpg but it stops. Any idea why?
Below console log is when i replace f%03d.jpg with f%04d.jpg 1: https://i.stack.imgur.com/kLyf0.png

1

There are 1 best solutions below

0
On

I was able to solve this using 8 digits instead of 3. And padding the digits.

        ffmpegArguments.push("-framerate", (1.0/frameTime).toFixed(0), "-i", "f%08d.jpg", "-c:v");
 let fileName = "f" + i.toString().padStart(8, '0') + ".jpg";