[FFmpeg-user] Add filter_complex overlay to existing command.

William C Bonner wbonner at wimsworld.com
Thu Apr 6 07:47:41 EEST 2023


I've been using ffmpeg to create time lapse videos successfully for quite
some time. I can't figure out how to convert my simple filter command to a
complex filter command so I can do it all in one process.

Here's an example of my existing command:

ffmpeg -start_number 275 -i 1218%04d.JPG -vf
crop=in_w:9/16*in_w,drawtext=fontfile=C\\:/Windows/Fonts/consola.ttf:fontcolor=white:fontsize=main_h/16:y=main_h-text_h-50:x=main_w-text_w-50:text=WimsWorld,drawtext=fontfile=C\\:/Windows/Fonts/consola.ttf:fontcolor=white:fontsize=main_h/16:y=main_h-text_h-50:x=50:text=%{metadata\\:DateTimeOriginal}
-c:v libx265 -crf 23 -preset veryfast -movflags +faststart -bf 2 -g 15
-pix_fmt yuv420p -y 1218-2160p30.mp4

I can create an overlay with this command:

ffmpeg -start_number 275 -i 1218%04d.JPG -start_number 275 -i 1218%04d.png
-filter_complex "overlay" -c:v libx265 -crf 23 -preset veryfast -movflags
+faststart -bf 2 -g 15 -pix_fmt yuv420p -y 1218-2160p30.mp4

I've got matching jpg and png files that I want to create time lapse.


More information about the ffmpeg-user mailing list