ffmpeg/vhook watermark.c

Adding watermark feature with ffmpeg

Page 1 of 1

2 Replies - 14391 Views - Last Post: 12 September 2010 - 04:20 AM

#1 richiebee  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 259
  • Joined: 27-November 08

ffmpeg/vhook watermark.c

Posted 05 February 2009 - 06:53 AM

Hi,
I am using ffmeg
and would like to add the functionality of inserting a logo during conversion...

Quote

1.6 watermark.c
Command Line options: `-m [0|1]' Mode (default: 0, see below)
`-t 000000 - FFFFFF' Threshold, six digit hex number
`-f <filename>' Watermark image filename, must be specified!


MODE 0: The watermark picture works like this (assuming color intensities 0..0xFF): Per color do this: If mask color is 0x80, no change to the original frame. If mask color is < 0x80 the absolute difference is subtracted from the frame. If result < 0, result = 0. If mask color is > 0x80 the absolute difference is added to the frame. If result > 0xFF, result = 0xFF.

You can override the 0x80 level with the -t flag. E.g. if threshold is 000000 the color value of watermark is added to the destination.

This way a mask that is visible both in light and dark pictures can be made (e.g. by using a picture generated by the Gimp and the bump map tool).

An example watermark file is at: http://engene.se/ffmpeg_watermark.gif

MODE 1: Per color do this: If mask color > threshold color then the watermark pixel is used.

Example usage:

ffmpeg -i infile -vhook '/path/watermark.so -f wm.gif' -an out.mov
ffmpeg -i infile -vhook '/path/watermark.so -f wm.gif -m 1 -t 222222' -an out.mov


how does video hook work?

Is This A Good Question/Topic? 1

Replies To: ffmpeg/vhook watermark.c

#2 Guest_hmmm*


Reputation:

Re: ffmpeg/vhook watermark.c

Posted 11 June 2010 - 11:59 AM

www.funvila4m.com
Was This Post Helpful? 0

#3 richiebee  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 259
  • Joined: 27-November 08

Re: ffmpeg/vhook watermark.c

Posted 12 September 2010 - 04:20 AM

View Posthmmm, on 11 June 2010 - 10:59 AM, said:

www.funvila4m.com

looks like this site is offline now
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1