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

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



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

7 thoughts on “ffmpeg – watermark positions

  1. ffmpeg -i ff.mp4 -b:v 150k -vf “movie=watermark.png [logo]; [in][logo] overlay=1264-overlay_w-10:544-overlay_h-10, crop=1264:552:8:88 [out]” YourCroppedMovie.mp4
    How Position Top Left Side Help Me.

    After Delete Black Border 24

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.