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! 😉
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
Very useful! How about if we wanted to fade the watermark out after a certain amount of seconds?
This worked great for me but my video resolution dropped after the first 0.5 of a second.
^^this issue was resolved by outputting to .MP4
tnks for input! 🙂
Thanks a lot for sharing your knowledge
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
thank you so much man