<p>Use</p>

<pre><code>ffmpeg -i input.mp4 -ignore_loop 0 -i watermark.gif -i arrow.png -i Dots.png -filter_complex "[0]scale=750:1334,setsar=1[v];[1]colorkey=0x54FF5F:0.1:0.2[ckout];[v][ckout]overlay=x=705:y=25:shortest=1[gif];[gif][2]overlay=x=310:y=1230[arw];[arw][3]overlay=x=705:y=25" -c:v libx264 -crf 20 -crf 16 output.avi
</code></pre>

<p>You should do the concat separately.</p>

CC BY-SA 4.0
2018-10-25T14:55:55.493Z
Thank you! Everything works fine :) Hope it will also help somebody else! :)
Artem Derzky
CC BY-SA 4.0
2019-12-20T20:11:10.293Z
@ArtemDerzky, why “Thank you!”, but not voting up and accept this helpful answer?
MarianD
CC BY-SA 4.0
2018-10-25T04:35:27.003Z
2018-10-25T04:35:27.003Z
Gyan
<p>I don't even know if it's possible, but if anybody could help me would be really great! :)</p>
<p>So first of all I resize my video with this command:</p>
<p>CODE №1</p>
<pre><code>ffmpeg -i input.mp4 -c:v libx264 -crf 20 -crf 16 -vf scale=750:1334 output.avi
</code></pre>
<p>Then I add Gif overlay with chroma key to it like that:</p>
<p>CODE №2</p>
<pre><code>ffmpeg -i input.avi -ignore_loop 0 -i watermark.gif -filter_complex &quot;[1:v]colorkey=0x54FF5F:0.1:0.2[ckout];[0:v][ckout]overlay=x=705:y=25:shortest=1[out]&quot; -map &quot;[out]&quot; output.avi
</code></pre>
<p>And then 2 more overlays:</p>
<p>CODE №3</p>
<pre><code>ffmpeg -i input.avi -i arrow.png -i Dots.png -filter_complex &quot;overlay=x=310:y=1230,overlay=x=705:y=25&quot; output.avi
</code></pre>
<p>And for the last part, I concatenate vid that I've made with another one like this:</p>
<p>CODE №4</p>
<pre><code>ffmpeg -i &quot;concat:vid1.avi|input.avi&quot; -c copy output.avi
</code></pre>
<p>Would be really great if anybody could help me to show few examples on how to merge all those scripts in 1 :) Or at least №3 and №3. Thank you in advance!</p>

<video><ffmpeg><video-editor><file-formats><chromakey>
How to combine so many ffmpeg filters in 1?
Artem Derzky
# How to combine so many ffmpeg filters in 1?

(Asked by: username_0 on 2018-10-25)

I don't even know if it's possible, but if anybody could help me would be really great! :)
So first of all I resize my video with this command:
CODE №1
ffmpeg -i input.mp4 -c:v libx264 -crf 20 -crf 16 -vf scale=750:1334 output.avi

Then I add Gif overlay with chroma key to it like that:
CODE №2
ffmpeg -i input.avi -ignore_loop 0 -i watermark.gif -filter_complex "[1:v]colorkey=0x54FF5F:0.1:0.2[ckout];[0:v][ckout]overlay=x=705:y=25:shortest=1[out]" -map "[out]" output.avi

And then 2 more overlays:
CODE №3
ffmpeg -i input.avi -i arrow.png -i Dots.png -filter_complex "overlay=x=310:y=1230,overlay=x=705:y=25" output.avi

And for the last part, I concatenate vid that I've made with another one like this:
CODE №4
ffmpeg -i "concat:vid1.avi|input.avi" -c copy output.avi

Would be really great if anybody could help me to show few examples on how to merge all those scripts in 1 :) Or at least №3 and №3. Thank you in advance!

**Tags:** video, ffmpeg, video-editor, file-formats, chromakey


---

## 1 answers

### Answer by username_1 on 2018-10-25. Score: 0

Use
ffmpeg -i input.mp4 -ignore_loop 0 -i watermark.gif -i arrow.png -i Dots.png -filter_complex "[0]scale=750:1334,setsar=1[v];[1]colorkey=0x54FF5F:0.1:0.2[ckout];[v][ckout]overlay=x=705:y=25:shortest=1[gif];[gif][2]overlay=x=310:y=1230[arw];[arw][3]overlay=x=705:y=25" -c:v libx264 -crf 20 -crf 16 output.avi

You should do the concat separately.

> **Comments:**
> **username_0**: Thank you! Everything works fine :) Hope it will also help somebody else! :)  
> **username_2**: @ArtemDerzky, why “Thank you!”, but not voting up and accept this helpful answer?  

---

