Add a Watermark to a Video with ffmpeg

July 15th, 2009 by Mitch Frazier in

Your rating: None Average: 4.7 (11 votes)

Download in .ogv format
__________________________
Mitch Frazier is an Associate Editor for Linux Journal and the Web Editor for linuxjournal.com.


Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer

Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Thomas Bond's picture

Works Sort Of

On August 14th, 2009 Thomas Bond (not verified) says:

Hi All,

Got the watermarking to work sort of. I have the watermark but I also have a gray cast to the original video. Looks like the 808080 background is not transparent. Any ideas?

Thanks!

Tom

Mitch Frazier's picture

Check Your Image

On August 14th, 2009 Mitch Frazier says:

For reference, the purpose of the 808080 is described below (taken from the ffmpeg documentation):

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.

The only thing I can think of is that you've got a problem with the image and it's not in the format that you think it is. Double check the background to make sure it's all 808080. Also make sure that the image is the same size as the video. The documentation doesn't state what, if anything, might be done to an image that is of a different size than the video before it's used to watermark the video.

This is a known good watermark image, try it and see what you get from it.

__________________________

Mitch Frazier is an Associate Editor for Linux Journal and the Web Editor for linuxjournal.com.

videocaptures's picture

Images From Videos

On July 25th, 2009 videocaptures (not verified) says:

Fast video indexer is a video capture software that can capture video frames automatically from a list of videos and create index web pages, index pictures or a list of images.

Artem Russakovskii's picture

ffmpeg removed support for

On July 15th, 2009 Artem Russakovskii (not verified) says:

ffmpeg removed support for vhook a while ago, at least in SVN, in favor of libavfilter. You can see the note here: http://windforce.ellil.net/d/ffmpeg/hooks.html. Therefore, this vhook idea isn't going to work unless you are using an old version of ffmpeg, and it's no longer supported anyway. :(

Mitch Frazier's picture

Not that Old

On July 16th, 2009 Mitch Frazier says:

It was deprecated in the 0.5 version that was released in March of this year and won't be removed until the next version.

__________________________

Mitch Frazier is an Associate Editor for Linux Journal and the Web Editor for linuxjournal.com.

Post new comment

Please note that comments may not appear immediately, so there is no need to repost your comment.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <i> <b>
  • Lines and paragraphs break automatically.

More information about formatting options

Newsletter

Each week Linux Journal editors will tell you what's hot in the world of Linux. You will receive late breaking news, technical tips and tricks, and links to in-depth stories featured on www.linuxjournal.com.
Sign up for our Email Newsletter

Tech Tip Videos

From the Magazine

December 2009, #188

If last month's Infrastrucuture issue was too "big" for you then try on this month's Embedded issue. Find out how to use Player for programming mobile robots, build a humidity controller for your root cellar, find out how to reduce the boot time of your embedded system, and if you're new to embedded systems find out the basics that go into one. You can also read about the Beagle Board, the Mesh Potato and a spate of other interestingly named items. And along with our regular columns don't miss our new monthly column: Economy Size Geek.


Read this issue