<p>Can't test the below now, but it should be</p>

<pre><code>ffmpeg -itsoffset 2 -i original.mp4 -i watermark.png -loop 1 -t 2.5 -i intro.png -filter_complex "[2:v] fade=out:50:10:alpha=1 [intro]; [0][1]overlay=W-w-45:H-h-35[main];[main][intro] overlay=eof_action=pass [v]" -map "[v]" -map 0:a output.mp4
</code></pre>

CC BY-SA 4.0
2018-09-17T12:10:12.927Z
Where does the watermark image come into that?
Dave Hollingworth
CC BY-SA 4.0
2018-09-17T12:58:59.413Z
Corrected inputs
Gyan
CC BY-SA 4.0
2018-09-17T10:55:16.833Z
2018-09-17T12:58:30.540Z
2018-09-17T12:58:30.540Z
Gyan
<p>I'm using ffmpeg to do two things - add a transparent watermark to the whole video, and also add a title intro image. I'm using the following command to add the watermark:</p>

<pre><code>ffmpeg -i original.mp4 -i watermark.png -filter_complex "overlay=W-w-45:H-h-35" watermarked.mp4
</code></pre>

<p>And this command to add the intro:</p>

<pre><code>ffmpeg -itsoffset 2 -i watermarked.mp4 -r 25 -loop 1 -i intro.png -filter_complex "[1:v] fade=out:50:10:alpha=1 [intro]; [0:v][intro] overlay=shortest=1 [v]" -map "[v]" -map 0:a output.mp4
</code></pre>

<p>I'm concerned that by processing the video twice, I'm losing quality. Is there a way to add the watermark and the intro with just one ffmpeg command / just one pass on the video?</p>

<p>(I understand the first ffmpeg command above, but I'm a bit lost with the second one - I managed to get it working based on code I saw somewhere)</p>

<ffmpeg><post-production>
Is it possible to merge two ffmpeg commands into one?
Dave Hollingworth
# Is it possible to merge two ffmpeg commands into one?

(Asked by: username_0 on 2018-09-17)

I'm using ffmpeg to do two things - add a transparent watermark to the whole video, and also add a title intro image. I'm using the following command to add the watermark:
ffmpeg -i original.mp4 -i watermark.png -filter_complex "overlay=W-w-45:H-h-35" watermarked.mp4

And this command to add the intro:
ffmpeg -itsoffset 2 -i watermarked.mp4 -r 25 -loop 1 -i intro.png -filter_complex "[1:v] fade=out:50:10:alpha=1 [intro]; [0:v][intro] overlay=shortest=1 [v]" -map "[v]" -map 0:a output.mp4

I'm concerned that by processing the video twice, I'm losing quality. Is there a way to add the watermark and the intro with just one ffmpeg command / just one pass on the video?
(I understand the first ffmpeg command above, but I'm a bit lost with the second one - I managed to get it working based on code I saw somewhere)

**Tags:** ffmpeg, post-production


---

## 1 answers

### Answer by username_1 on 2018-09-17. Score: 1 | Accepted answer

Can't test the below now, but it should be
ffmpeg -itsoffset 2 -i original.mp4 -i watermark.png -loop 1 -t 2.5 -i intro.png -filter_complex "[2:v] fade=out:50:10:alpha=1 [intro]; [0][1]overlay=W-w-45:H-h-35[main];[main][intro] overlay=eof_action=pass [v]" -map "[v]" -map 0:a output.mp4

> **Comments:**
> **username_0**: Where does the watermark image come into that?  
> **username_1**: Corrected inputs  

---

