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

Alex Vasilenko aa.vasilenko at gmail.com
Tue Mar 19 10:50:05 CET 2013

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

Alex Vasilenko

More information about the ffmpeg-user mailing list