FFmpeg Video Filters Adding a Watermark via Overlay

Adding a Watermark via Overlay

AS
Aman Saurav
| Jan 23, 2025 |
8 min read
#video #overlay

Branding your videos with a logo (watermark) involves using the overlay filter graph.

Basic Command

Assuming logo.png is your watermark image:

ffmpeg -i video.mp4 -i logo.png -filter_complex "overlay=10:10" output.mp4

This places the logo at coordinates 10,10 (top-left).

Positioning Examples

  • Top Right: overlay=main_w-overlay_w-10:10
  • Bottom Right: overlay=main_w-overlay_w-10:main_h-overlay_h-10
  • Center: overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2

Transparency

If your PNG has transparency, FFmpeg respects it automatically. You can also adjust the global opacity of the watermark using the format and colorchannelmixer filters, though that makes the command significantly more complex.