How to add a watermark to a video | png overlay

Опубликовано: 20 Май 2021
на канале: The FFMPEG guy
1,545
42

Today, we show how to add a watermark to a video (.png image), using ffmpeg. This process can actually be used to overlay any .png or iamge to a video. The .png we are using is 1400 x 1400 with a transparent background and the main white color set to 50% transparency.
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
EXAMPLES
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
❶ Add a watermark (no resize)
→ ffmpeg -i input.mp4 -vf "movie=image.png [watermark]; [in][watermark] overlay [out]" output01.mp4

with:
movie=image.png [watermark] = Imports «image.png» and calls it [watermark]
[in][watermark] = Loads, in order, the original video ([in]) and the watermark ([watermark])
overlay = … and overlay both (last loaded on top). Note: The upper left corner of the .png will be in position x=0, y=0 = upper left corner of the video
[out] = Result to be called [out] and exported to output01.mp4

❷ Watermark resizing and addition, default position
→ ffmpeg -i input.mp4 -vf "movie=image.png [watermark]; [watermark]scale=300x300 [watermark2];[in][watermark2] overlay [out]" output02.mp4

with:
movie=image.png [watermark] = Imports «image.png» and calls it [watermark]
[watermark]scale=300x300 [watermark2] = …and resizes it to 300x300 calling the result [watermark2]
[in][watermark2] = Loads, in order, the original video ([in]) and the resized watermark ([watermark2])
overlay = … and overlay both (last loaded on top). Note: The upper left corner of the .png will be in position x=0, y=0 = upper left corner of the video
[out] = Result to be called [out] and exported to output02.mp4

❸ Watermark resizing and addition, custom position
→ ffmpeg -i input.mp4 -vf "movie=image.png [watermark]; [watermark]scale=200x200 [watermark2];[in][watermark2] overlay=300:200 [out]" output03.mp4

with:
movie=image.png [watermark] = Imports «image.png» and calls it [watermark]
[watermark]scale=200x200 [watermark2] = …and resizes it to 200x200 calling the result [watermark2]
[in][watermark2] = Loads, in order, the original video ([in]) and the resized watermark ([watermark2])
overlay=300:200 = … and overlay both (last loaded on top). Upper left corner of the .png will be in position x=300, y=200 (relative to position x=0, y=0 = upper left corner of the video)
[out] = Result to be called [out] and exported to output03.mp4

❹ BONUS! My favorite, since sets a watermark bottom right without having to calculate the exact position of the .png
→ ffmpeg -i input.mp4 -vf "movie=image.png [watermark]; [watermark]scale=100x100 [watermark2];[in][watermark2] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]" output04.mp4

with:
movie=image.png [watermark] = Imports «image.png» and calls it [watermark]
[watermark]scale=100x100 [watermark2] = …and resizes it to 100x100 calling the result [watermark2]
[in][watermark2] = Loads, in order, the original video ([in]) and the resized watermark ([watermark2])
overlay=main_w-overlay_w-10:main_h-overlay_h-10 = … and overlay both (last loaded on top, at 10 pixels from bottom right corner).
main_w = width of bottom layer (here [in])
main_h = height of bottom layer (here [in])
overlay_w = width of overlay layer (here [watermark2])
overlay_h= height of overlay layer (here [watermark2])
[out] = Result to be called [out] and exported to output04.mp4
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Catch up with the FFMPEG guy Channel
   • ALL THE VIDEOS FROM THE CHANNEL  
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
MUSIC
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Some of You - Text Me Records - GrandBankss
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
An FFMPEG question?
Ask the FFMPEG guy
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ


Смотрите видео How to add a watermark to a video | png overlay онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь The FFMPEG guy 20 Май 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,545 раз и оно понравилось 42 людям.