How to add a watermark or logo to any corner or the center of a video with FFMPEG.

ffmpeg –i video.mp4 -i logo.png -filter_complex “overlay=10:10” -shortest top_left.mp4
ffmpeg –i video.mp4 -i logo.png -filter_complex “overlay=main_w-overlay_w-10:10” -shortest top_right.mp4
ffmpeg –i video.mp4 -i logo.png -filter_complex “overlay=10:main_h-overlay_h-10” -shortest bottom_left.mp4
ffmpeg –i video.mp4 -i logo.png -filter_complex “overlay=main_w-overlay_w-10/2:main_h-overlay_h-10/2”  -shortest bottom_right.mp4
ffmpeg -i video.mp4 -i logo.png -filter_complex “overlay=main_w/2-overlay_w/2:main_h/2-overlay_h/2” -shortest center.mp4

版权声明:本文为johnsonshu原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/johnsonshu/p/9520633.html