I've got a load of screenshots of a homepage that are named homescreen000001.png
, homescreen000002.png
, etc and I'm trying to create a time-lapse video of these images using ffmpeg.
I've got it working in general when I run the following:
ffmpeg -f image2 \
-i ~/Desktop/homescreen%06d.png \
-r 0.5 \
-s 1440x900 \
-b:v 1M \
-vcodec libx264 \
-pix_fmt yuv420p \
~/Desktop/timelapse.mp4
However, it turns out that some of the images have transparent backgrounds so the background is showing up as black on those images.
I'd like a white background so I've been trying to set that up using ffmpeg as follows:
ffmpeg -f image2 \
-loop 1 \
-i ~/Desktop/whitebg.png \
-i ~/Desktop/homescreen%06d.png \
-filter_complex overlay \
-r 0.5 \
-s 1440x900 \
-b:v 1M \
-vcodec libx264 \
-pix_fmt yuv420p \
~/Desktop/timelapse.mp4
Here whitebg.png
is 2px x 2px png with a white background, and that's it.
This ffmpeg command produces a really tiny (in file size) video that's just a white background.
Can anyone explain how I can overlay the images as a time-lapse video over a white background using ffmpeg?