I want to add watermarking on to my FLV videos. Previously I used to do that using FFmpeg's vhook option but due to some problems I had to upgrade it to the latest SVN revision. This version of FFmpeg doesn't have vhook support anymore.

I have tried mencoder with bmovl but mencoder seems to be pretty difficult to work with.

Is there any other feasible option of watermarking videos?

migrated from stackoverflow.com Jan 9 '10 at 14:25

This question came from our site for professional and enthusiast programmers.


The correct way to do this with recent ffmpeg is to use the overlay filter. The following command will place watermark.png on top of input.flv, with the upper-left corner of the watermark fifteen pixels to the right and ten pixels down from the upper-left corner of the main video:

ffmpeg -i input.flv -i watermark.png -filter_complex \
'[0:v][1:v]overlay=15:10[outv]' -map [outv] -map 0:a \
-c:a copy -c:v libx264 -crf 22 -preset veryfast output.mp4

Obviously, change 15 or 10 to whatever values you want.

There are also a few constants you may find useful, if you're putting watermarks on multiple videos with separate resolutions:

  • W and H are the width and height of the main video (input.flv)
  • w and h are the width and height of the overlay video (watermark.png)

These can come in handy many times. For example, to place the watermark over the centre of the video, you could use:


Similarly, to centre the watermark over the upper-left sixth of the video:


For the lower-left sixth of the video:


You can pretty much do whatever you need to.

See the overlay filter documentation for more information.


VLC can watermark videos using the Effects and Filters > Video Effects > Vout/Overlay > Add text, and it can read FLV files. I've, personally, had varying success with encoding using VLC (or any program for that matter).


i think vlc and mplayer and ffmpeg generally do good jobs. what problems are you having with mplayer/mencoder?

you could add the watermark on each frame using imagemagick or scripted gimp, but it will be very slow.

look: http://www.imagemagick.org/Usage/annotating/#wmark_image

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.