[FFmpeg-user] Time-lapse generation

MailingLists - XYZ mailinglists at flubb.xyz
Fri Oct 25 11:59:27 EEST 2019

Hi everyone,

I routinely generate time-lapse videos from series of pictures taken by fixed cameras (minimum 10 000 images per video) with the following command :

	ffmpeg -f image2 -r 5 -pattern_type glob -i '*[0-9].jpg' -vf "scale=1620:1080,format=yuv420p" -vcodec libx264 final.mp4

Everything usually works, except for yesterday when I had 10 000 pictures and from this set I had three sequences of images, with varying dimensions :

* the first 8 000 pictures : 5184x3456
* 8 pictures : 720x480
* the remaining pictures : 5184x3456

Starting around the 8000th picture, ffmpeg started dropping frames and the behaviour continued up until the end of the file.
Of course when I tried to play the file, it ended around the 8000th picture.

I managed to isolate the problem : the culprits were the low res images (720x480) and by eliminating them from the set, the process went smoothly and produced a nice MP4 with all the pictures, from start to finish, without dropping any frames.

My question is : how could I ask ffmpeg to not be bothered by the pictures resolution changes and scale them according to the output dimension, 1620:1080, even though input images might be smaller than that ?

Following advice on Stack Overflow, I tried to modify the output scale with "scale=1620:-2” instead of "scale=1620:1080” but nothing changed, frames continued to be dropped…

(I’m using ffmpeg 3.2.14 and I haven’t tried a newer version)


More information about the ffmpeg-user mailing list