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

Paul B Mahol onemda at gmail.com
Tue Mar 19 11:36:22 CET 2013


On 3/19/13, Alex Vasilenko <aa.vasilenko at gmail.com> wrote:
> Hi all ,
>
> 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
>
> It rotates video to the right and adds watermark at the bottom of the video
> for first 3 seconds. The problem is watermark is visible during the whole
> video.
>
> Thought that select doesn't work at all. Tried following command
>
> ffmpeg -y -i '255871.mov' -qscale:v 0 -qscale:a 0 -vf '[in] transpose=1
> [out];movie=watermark.png , select=0 [bg]; [out][bg]
> overlay=x=20:y=main_h-60 [out]' output.mp4

watermark.png is single frame, so select always pick it,
yes it it little strange but that is how overlay filter works.

Instead you could use blend filter, you first would need to pad watermark.png
with pad filter to same size as input and pad it with black color and than set
some complicated expression for blend filter.

This is too much complicated and IIRC there is ongoing work on making
real scripting
with libavfilter available.

>
> Watermark is not visible. This is correct and proves that select filter
> works as expected. As I understand this is how ffmpeg works: it leaves last
> frame of the shortest video visible.
>
> How can I force ffmpeg to discard show watermark after N seconds?
>
> Cross posted this question on SO:
> http://stackoverflow.com/questions/15482644/show-watermark-at-the-beginning-of-the-video
>
>
> Thanks,
> --
> Alex Vasilenko
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list