[FFmpeg-user] show watermark at the beginning of the video

Liam Condron-Farnos 23liam at googlemail.com
Tue Mar 19 12:01:19 CET 2013


>Need to add watermark for first 3 seconds the video using ffmpeg. Here's what I got right now:
>
>ffmpeg -y -i '255871.mov' -qscale:v 0 -qscale:a 0 -vf '[in] transpose=1 [out];movie=watermark.png , select=lte(t\,3) [bg]; [out][bg] >overlay=x=20:y=main_h-60 [out]' output.mp4

When I had to do something similar, I ended up just converting the PNG
to a video with the Apple Animation codec, called qtrle in ffmpeg. I
used this one because it's the only codec I know of that supports
transparency (well, prores should also be able to do it, but the
ffmpeg implementation of that wasn't complete enough last time I
checked).

ffmpeg -loop 1  -i watermark.png -c qtrle -t 3 watermark.mov

I can't remember exactly; I think I may have had to do something with
the fade filter - something like this (fade out starting at frame 74,
over one frame, and fade out the alpha channel [so, fade to
transparency rather than to black]; obviously take a look at the
documentation):

ffmpeg -loop 1 -i watermark.png -c qtrle -t 3 -filter:v
'fade=out:74:1:1' watermark.mov

...then, just replace 'watermark.png' with 'watermark.mov' in your command line.


More information about the ffmpeg-user mailing list