Why is the first image changing so quickly when creating video from images via FFmpeg?

Solution 1:

This is a bug, I noticed it myself. FFmpeg always outputs the first and second images in sequence, any timing you've chosen only kicks in after the second image. For example, if you have one frame to output every ten seconds, and you're making a 25fps movie, the first image will be your first frame, your second image will start 40ms later and be the second frame. After that, the second frame will be duplicated correctly up to the ten second mark (10.040???). I got around this by duplicating the first frame.

Solution 2:

To get you started:

  • -qscale is not an input option and should be placed after -i

  • The -qscale option is for MPEG-4 Part II video, not for h.264 video, which mp4 uses per default. It will probably be ignored. Use -crf 20 (or other sane values from 19 to 24) to change quality.

  • Your input is incorrectly parsed, maybe try to force image2:

    ffmpeg -r 0.15 -f image2 -i /var/www/44693/%0d.jpg /var/www/44693/output11.mp4
    
  • In any case, your codec frame rate and container frame rate mismatch, which shouldn't happen.

  • If that fails, use a more recent version of FFmpeg. For Ubuntu, follow this guide.

Solution 3:

Looks like it's a bug, see https://ffmpeg.org/trac/ffmpeg/ticket/1925 the work around is to use " -vf fps=XX" instead of "-r" it appears (or duplicate the first frame).