[FFmpeg-user] Could ffmpeg add fade effect for watermark picture?

Moritz Barsnick barsnick at gmx.net
Thu May 21 11:23:28 CEST 2015


On Thu, May 21, 2015 at 10:59:06 +0800, Nemo wrote:
> I means, increase or reduce the watermark transparency.
> Thanks a lot.

Let me google that for you.

This shows some way how to do it, keywords to read are timeline editing
and fade filter:

http://stackoverflow.com/questions/9160771/ffmpeg-watermark-first-30-second

I believe this answer in that thread should give you a good solution:
http://stackoverflow.com/a/24024776
I one elegant step, using "-loop 1" to make a pseudo video from the
overlay image, and using the fade filter in a "-filter_complex" chain
to mainpulate the overlay.

In other words:
$ ffmpeg -i inputvideo loop 1 -i watermark.png -c:a copy -filter_complex "[1:v]fade=in:st=0:d=0.5,fade=out:st=30:d=0.5[watermark]; [0:v][watermark]overlay=10:main_h-overlay_h-10" outputvideo

Cheers,
Moritz


More information about the ffmpeg-user mailing list