Platform: the tools used
- platform: Ubuntu Jaunty (9.04)
- media player: mplayer
- image editor: gimp
- watermarking tool: ffmpeg using the vhook library
- Download the ffmpeg
- Untar it: tar jxfv ffmpeg-xx.xx.tar.bz2
- Get into the untared folder: cd ffmpeg-xx.xx/
- Configure with the vhook enabled: ./configure --enable-gpl --enable-nonfree --enable-vhook. Run ./configure --help to get a full list of options. NOTE: the . in the commands above is part of the command, so put it there.
- Compile and Install: make && make install
- vhook files will be located in the /usr/local/lib/vhook
- video to be watermarked:
- the image to watermark the video. NOTE: the image background must be of color: #808080 and of the same size as the video.
- Play the video from the console/terminal to get the size of the video: mplayer thetrain.mpg
- Read the size of the video from the info displayed when mplayer loads the video, see the image below.
- So the create an image with the same size as the video, in this case it is 640x480 pixels. Remember the background of the image must be #808080, then add all that you want. Here is mine.
- Now we set, its time to cook
- To make it easy, put all the ingredients in on pot, oops sorry, in one folder. The naviget on the terminal to that folder. Here is the generic structure of the command to watermark: ffmpeg -sameq -i original-video -vhook 'path-to-watermark.so-library -f overlaying-image' output-file. The sameq force the ffmpeg to maintain the same quality in and out. There is my cooking: ffmpeg -sameq -i thetrain.mpg -vhook '/usr/local/lib/vhook/watermark.so -f overlayer.png' thetrain.fsp.mpg.
- Prepare the table and save the food. Use mplayer to try your newly watter marked file
Delicious: what goes to the table
See what we served on the table
Try It and tell me! Have fun guys!.