Tag Archives: watermark

ffmpeg – watermark positions

This are the command lines that I use to add the watermark picture named watermark.png on the video named source.avi and export to output.flv.

Tested on a DigitalOcean Virtual server! 😉

rock ssd

The 10 values are the paddings!

Top left
ffmpeg –i source.avi -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:10 [out]" output.flv

Top right
ffmpeg –i source.avi -vf "movie=watermark.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:10 [out]" output.flv

Bottom left
ffmpeg –i source.avi -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]" output.flv

Bottom right
ffmpeg –i source.avi -vf "movie=watermark.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]" output.flv

Center?
ffmpeg –i source.avi -vf “movie=watermark.png [watermark]; [in][watermark] overlay=main_w/2-overlay_w/2:main_h/2-overlay_h/2 [out]” output.flv

 

UPDATE

If you get this error…

[NULL @ 0x45fd680] Unable to find a suitable output format for '–i'
–i: Invalid argument

try something like…

ffmpeg -i 'video-source.mp4' -i /watermark/path/image.png -filter_complex "overlay=main_w-overlay_w-10:main_h-overlay_h-10" -c:v libx264 -vsync 2 -strict -2 /output/video.mp4