5

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?

0

3 Answers 3

4

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.

0
2

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

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .