I am processing video with FFmpeg. I am trying to add image overlays at certain times. I have command something like this:
ffmpeg -i video.mp4 -i img_a.png -i img_xx.png -i some_third_image.png -i yy_img.png -filter_complex overlay=185:H-h-85:enable=between(t\\,0.1\\,0.3),overlay=285:H-h-415:enable=between(t\\,0.3\\,0.7),overlay=185:H-h-35:enable=between(t\\,0.7\\,1.0),overlay=45:H-h-515:enable=between(t\\,1.1\\,1.6) -c:v libx264 -crf 20 -preset veryfast vid0.mp4
As I am forming/passing parameters to FFmpeg dynamically (programmatically), there can be really very very long parameters list. So large, that I can even receive a message about too long parameter list (based on operating system).
I would like to avoid this. I would like to know how to write code with FFmpeg so there would be fewer parameters passed to FFmpeg? For example, instead of:
-i img_a.png -i img_xx.png -i some_third_image.png -i yy_img.png
can it be something like:
And if it can, how can those images be processed by FFmpeg (suppose also by
filter_complex overlay)? Please provide an example, if you can.