Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

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

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

add comment

3 Answers

up vote 2 down vote accepted

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:

'[0:v][1:v]overlay=(W-w)/2:(H-h)/2[outv]'

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

'[0:v][1:v]overlay=(W-w)/6:(H-h)/6[outv]'

For the lower-left sixth of the video:

'[0:v][1:v]overlay=(W-w)/6:(H-h)/(6/5)[outv]'

You can pretty much do whatever you need to.

See the overlay filter documentation for more information.

share|improve this answer
add comment

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

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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