FFmpeg · Command Guide

How to Add a Watermark to a Video With FFmpeg

Overlaying a logo or watermark image onto every frame of a video, positioned and sized without needing a compositing tool.

Overlaying a logo or watermark image onto every frame of a video, positioned and sized without needing a compositing tool.

The command

ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=W-w-20:H-h-20" -c:a copy output.mp4

What each flag does

-i input.mp4The base video.
-i logo.pngThe watermark image, ideally a PNG with transparency.
-filter_complex "overlay=..."Composites the second input on top of the first at the given position.
W-w-20:H-h-20Positions the logo 20px from the bottom-right corner — W/H are the video's dimensions, w/h are the logo's.

Where this goes wrong

A common mistake is using a JPEG logo instead of a transparent PNG — JPEGs have no alpha channel, so the watermark shows up as a solid rectangle instead of blending into the footage.

Making the watermark semi-transparent

ffmpeg -i input.mp4 -i logo.png -filter_complex "[1]format=rgba,colorchannelmixer=aa=0.6[wm];[0][wm]overlay=W-w-20:H-h-20" -c:a copy output.mp4

The colorchannelmixer=aa=0.6 sets the logo's alpha to 60% opacity before compositing it, so it sits over the footage instead of covering it fully.

After the command

A static logo overlay is one layer. NULLFRAME's templates add a full motion system — captions, callouts, brand lockup — built once and reused, not composited by hand per video.

See the templates

Common questions

Can I scale the watermark down first?+
Yes — add a scale filter to the logo input, e.g. [1]scale=200:-1[logo], then reference [logo] in the overlay.
Does this work with an animated watermark (GIF/video)?+
Yes, FFmpeg treats a second video input the same way — the overlay filter composites frame by frame regardless of whether the overlay is static or moving.
Will the watermark placement stay correct if the video resolution changes?+
The W-w-20 formula is resolution-independent — it always positions relative to the actual output dimensions.