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

Alex Vasilenko aa.vasilenko at gmail.com
Tue Mar 19 12:36:39 CET 2013


On Tuesday, March 19, 2013 at 13:01 , Liam Condron-Farnos wrote:
> > 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.
Was thinking about this but select filter mislead me. With watermark.mov works like a charm though I have to adjust fade out frames to fade=out:73:1:alpha=1, not sure why. ffmpeg output shows 75 total frames.

I believe watermark.png can be used in conjunction with fade out and select. Something like this:

movie=watermark.png, fade=out:74:1:alpha=1, select=lte(n\,75) [bg]; [in][bg] overlay=x=20:y=main_h-60 [out]

But this one doesn't work for me.

> 't' is presentation timestamp for watermark, which may never by higher than 3
> as it is single frame. You could instead replace 't' with 'n'.
> 
> 

Doesn't work either. Tried following:

movie=watermark.png, select=lte(n\,75) [bg]; [in][bg] overlay=x=20:y=main_h-60 [out]
 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org (mailto:ffmpeg-user at ffmpeg.org)
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> 




More information about the ffmpeg-user mailing list