<p>I am processing video with FFmpeg. I am trying to add image overlays at certain times. I have command something like this: </p>

<pre><code>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
</code></pre>

<p>As I am forming/passing parameters to FFmpeg dynamically (programmatically), there can be <strong>really very very long parameters list</strong>. So large, that I can even receive a message about too long parameter list (based on operating system). </p>

<p>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: </p>

<pre><code>-i img_a.png -i img_xx.png -i some_third_image.png -i yy_img.png
</code></pre>

<p>can it be something like: </p>

<pre><code>-i "img_a.png,img_xx.png,some_third_image.png,yy_img.png"
</code></pre>

<p>And if it can, how can those images be processed by FFmpeg (suppose also by <code>filter_complex</code> overlay)? Please provide an example, if you can.</p>

<video><ffmpeg><filter>
How to lower number of parameters passed to ffmpeg
DarioBB
# How to lower number of parameters passed to ffmpeg

(Asked by: username_0 on 2019-04-16)

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: 
-i "img_a.png,img_xx.png,some_third_image.png,yy_img.png"

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.

**Tags:** video, ffmpeg, filter


---

## 0 answers

