FFmpeg recipe
FFmpeg: Add an Image Watermark / Logo to a Video
overlay places one input on top of another. Use a transparent PNG and offset 10 px from the corner for a clean watermark.
Command
ffmpeg -i input.mp4 -i logo.png -filter_complex "[0:v][1:v]overlay=W-w-10:H-h-10" -c:v libx264 -crf 23 -c:a copy -y output.mp4Prefer no terminal?
Use the Watermark in your browser
What each flag does
| -i | Input file. Can be a video, audio, or image. Repeat for multiple inputs. |
|---|---|
| -c:v | Video codec for output. e.g. libx264, libx265, libvpx-vp9. |
| -crf | Constant Rate Factor — quality target (lower = better, larger file). 23 is visually lossless for libx264. |
| -c:a | Audio codec for output. e.g. aac, libmp3lame, copy. |
| overlay=W-w-10:H-h-10 | Position: W=main width, w=overlay width, 10 px margin from bottom-right corner. Other corners: 10:10 (top-left), W-w-10:10 (top-right), 10:H-h-10 (bottom-left). |
Notes & gotchas
- For a translucent watermark, pre-process the PNG with [1:v]format=rgba,colorchannelmixer=aa=0.5[wm] and use [wm] in overlay.
- For animated motion (logo bouncing or sliding in), see ffmpeg overlay timeline editing.
Check it worked
ffplay -i output.mp4The watermark visible at the corner you chose, at the opacity you set.
What to change
| overlay takes an expression | W and H are the video, w and h the logo. W-w-10:H-h-10 is bottom right with a 10 px margin; 10:10 is top left. |
|---|---|
| Set the opacity in the filter | Add format=rgba,colorchannelmixer=aa=0.6 to the logo input for 60%. Pre-fading the PNG works too and is less flexible. |
| Scale the logo to the video | A logo sized for 1080p is enormous on a 480p clip. Scale it relative to the input rather than in pixels. |
If it fails
The watermark has a black box around it.
Why: The overlay lost the alpha channel, usually because the pixel format was forced before the overlay.
Fix: Use a PNG with transparency and apply format=rgba to the overlay input before the overlay filter.
The watermark is enormous or invisible.
Why: The logo is being placed at its native size against a differently-sized video.
Fix: Scale it relative to the video, for example scale=iw*0.15:-1 applied to the overlay input.