user23192: 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)

user1871: 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


23192: <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>
 1871: <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>
