Thursday, March 26, 2009

Video watermarking

There is a task to watermark your logo or WEB link in video file. The easiest way is to use `ffmpeg' utility for it while transcode the file. Just I show how to do it with WEB link creation.

First of all we have to create the transparent picture with burned link on it. Let's take `convert' utility for it. The size of our picture should be the same as video is:
convert -size 480x360 -background none -depth 8 -fill '#f98304' -font NewCenturySchlbk-Roman -pointsize 24 -undercolor black -gravity south caption:'Address' label.png
So, we've got 8bit 480x360 lebel.png picture file. Great. Apply it on video. For example I use FLV file. Do like this:
ffmpeg -i MyVideo.flv -vhook '/usr/lib/vhook/ -f label.png -m 1 -t 222222' -r 25 -vcodec libx264 -acodec pcm_s16le
Note: For testing purposes we can use `-t 00:00:07' key in last command to transcode only 7 sec of video.

No comments: