FFmpeg: add a watermark image to a video with overlay
Add a watermark image to a video with FFmpeg: pass the logo as a second input and use overlay=W-w-10:H-h-10 for the bottom-right corner.

To add a watermark image to a video with FFmpeg, pass the logo as a second input and draw it with the overlay filter: ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=W-w-10:H-h-10" -c:a copy output.mp4 puts the logo 10 pixels from the bottom-right corner. Use a PNG with a transparent background, scale it first with scale if it is too big, and the audio is copied untouched.
The FFmpeg behavior below is quoted from the FFmpeg filters documentation, the ffmpeg documentation and the FFmpeg utilities documentation; the Sume facts come from the Timeline compose and Video filter docs. All were read on 2026-09-29, and every command was run on a 1920×1080 test clip with FFmpeg 9.0.1.
What do W, H, w and h mean in overlay?
overlay takes two inputs: the first is the main video, the second is drawn on top of it. Its x and y options place the logo's top-left corner and default to 0, the top-left of the frame. In those expressions W and H are the main video's width and height, and w and h are the logo's. Because the logo is a second input, the command needs -filter_complex, the option for graphs with more than one input.
| Corner | `overlay=` value |
|---|---|
| Top left | 10:10 |
| Top right | W-w-10:10 |
| Bottom left | 10:H-h-10 |
| Bottom right | W-w-10:H-h-10 |
| Center | (W-w)/2:(H-h)/2 |
How do I resize the watermark?
Scale the logo input before the overlay, and label the result. scale=200:-1 makes it 200 pixels wide; when only one of the values is -1, scale picks the other so the logo keeps its aspect ratio.
To size the logo from the video instead, scale can read a second, reference input: [1:v][0:v]scale=w=oh*dar:h=rh/10 makes the logo a tenth of the video's height and keeps its shape, as in the FFmpeg docs example. On the test clip that gave a 216×108 logo.
# Logo 200 px wide, bottom-right, 10 px margin
ffmpeg -i input.mp4 -i logo.png -filter_complex \
"[1:v]scale=200:-1[logo];[0:v][logo]overlay=W-w-10:H-h-10" \
-c:a copy output.mp4
# Logo a tenth of the video's height
ffmpeg -i input.mp4 -i logo.png -filter_complex \
"[1:v][0:v]scale=w=oh*dar:h=rh/10[logo];[0:v][logo]overlay=W-w-10:H-h-10" \
-c:a copy output.mp4How do I make the watermark semi-transparent?
A PNG with an alpha channel already keeps its transparent areas transparent. To fade the whole logo, lower its alpha before the overlay: colorchannelmixer has an aa option for the output alpha channel, which defaults to 1, so aa=0.5 halves it. Convert to rgba first so there is an alpha channel to change.
ffmpeg -i input.mp4 -i logo.png -filter_complex \
"[1:v]format=rgba,colorchannelmixer=aa=0.5[logo];[0:v][logo]overlay=W-w-10:H-h-10" \
-c:a copy output.mp4How do I show the watermark for only part of the video?
Add enable to the overlay. For filters with timeline support, FFmpeg evaluates the enable expression before each frame and passes the frame through unchanged when it is 0. between(t,0,3) is 1 from 0 to 3 seconds, so overlay=W-w-10:H-h-10:enable='between(t,0,3)' shows the logo for the first three seconds only. ffmpeg -filters lists which filters have timeline support; on FFmpeg 9.0.1 overlay is one.
Does adding a watermark re-encode the video?
Yes. The ffmpeg docs say filters can't run on a stream copy, "since filters work on decoded frames", so the picture is always encoded again. -c:a copy keeps the audio as it was. How to crop a video with FFmpeg has the same trade-off.
Can I add a watermark without running FFmpeg?
On Sume, yes, but not with the Video filter: its filtergraph allows no inputs, no outputs and no paths, and filters that read a file are not on its allowlist, so there is no way to hand it a logo. The route is Timeline compose with operation: "overlay", which How to add a logo or watermark to a video walks through; Bulk add a watermark to videos runs it over a set. What matters when you are coming from FFmpeg:
- Both files must already be in your Sume workspace on
media.sume.com, such as earlier Sume outputs; off-host URLs are refused. positionis onlytop,centerorbottom. There is no corner setting likeW-w-10, and the still is held for the whole clip, so there is no time window likeenable.- Each job reserves up to $0.02 and is captured at its own compute cost, never above that, plus a 5.5% agent fee by default.
Sources
Related posts
More in Developers
- FFmpeg burn subtitles into video: subtitles filter, force_style
Burn subtitles into a video with FFmpeg's subtitles filter: -vf subtitles=subs.srt re-encodes the picture, and force_style overrides the font and colour.
- FFmpeg change frame rate: the fps filter vs -r
Change a video's frame rate with FFmpeg's fps filter: -vf fps=30 drops or duplicates frames and keeps the running time. How -r and framerate differ.
- FFmpeg fade in fade out: video and audio, from and to black
Fade a video in and out with FFmpeg: fade=t=in and fade=t=out on the picture, afade on the sound, with the fade-out starting at the length minus its duration.
- FFmpeg increase volume: the volume filter, in dB or ×
Increase volume in FFmpeg with -af volume: volume=2 or volume=6dB, with -c:v copy so the video isn't re-encoded. Check headroom with volumedetect first.
Written by Sume