Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Watermarking video from the Linux command line

does anyone know how to watermark video from the Linux command line using a simple tool?

Watermarking in ffmpeg isn't supported in the current version, and requires a custom compile.

Max.

like image 776
user7289 Avatar asked Oct 27 '10 12:10

user7289


2 Answers

ffmpeg -y -i 'inputFile.mpg' -vhook '/usr/lib/vhook/watermark.so -f /home/user/logo.gif'

Make note of the "-vhook" parameter; watermark.so path may vary.

like image 126
B00MER Avatar answered Sep 22 '22 23:09

B00MER


Another simple way to do this is updating ffmpeg to the newest version and adding the overlay video filter:

ffmpeg -y -i video.mp4 -i watermark.png -filter_complex "overlay=(main_w-overlay_w):(main_h-overlay_h)" watermark.mp4

This also gives you more options on where to place the watermark as well. For example, if you wanted to place the watermark in the center of the video you would use:

-filter_complex "overlay=(main_w-overlay_w/2):(main_h-overlay_h/2)"
like image 45
jrkt Avatar answered Sep 22 '22 23:09

jrkt