11/19/2025
Learn to add a logo or image watermark to your videos with FFmpeg. Get the simple command to overlay an image, control its position, and protect your content.
How to Add an Image Watermark (Logo) to a Video with FFmpeg?
Do you want to brand your video creations with a unique logo to protect your copyright? Or maybe you need to embed your brand identity in the videos you publish. This process is commonly known as "watermarking." Forget about expensive or cumbersome software; FFmpeg's filter system allows you to precisely overlay any image onto any position in your video with a single command line.
🚀 Quick Access: The FFmpeg Command
Let's say you have a video input.mp4 and a watermark image watermark.png. Want to place the watermark in the top-left corner of the video? Run this command:
ffmpeg -i input.mp4 -i watermark.png -filter_complex "overlay=10:10" output.mp4
This command will overlay watermark.png on top of input.mp4 and generate a new watermarked video named output.mp4.
🧠The Breakdown: Understanding Each Parameter
This command introduces one of FFmpeg's most powerful features: -filter_complex.
| Parameter | Explanation |
|---|---|
ffmpeg |
Calls the FFmpeg program. |
-i input.mp4 |
Specifies the first input file, your main video. In the filtergraph, this is referred to as [0]. |
-i watermark.png |
Specifies the second input file, your watermark image. In the filtergraph, this is referred to as [1]. |
-filter_complex |
Declares the start of a complex filtergraph, which allows you to process and mix multiple input streams. |
"overlay=10:10" |
This is the core of the filter. overlay is the name of the filter that places one video/image on top of another. 10:10 represents the coordinates: 10 pixels from the left edge (X) and 10 pixels from the top edge (Y). |
output.mp4 |
The filename for the final, watermarked output video. |
FAQ & Variations
1. How do I position the watermark in the bottom-right corner?
This is a very common requirement! The overlay filter provides built-in variables to make this easy. W and H represent the width and height of the main video, while w and h represent the width and height of the watermark image.
To place the watermark in the bottom-right corner (with a 10-pixel margin), you would set the coordinates like this:
- X coordinate:
W-w-10(Main video width - watermark width - 10) - Y coordinate:
H-h-10(Main video height - watermark height - 10)
The full command is:
ffmpeg -i input.mp4 -i watermark.png -filter_complex "overlay=W-w-10:H-h-10" output.mp4
Similarly, the top-right corner would be W-w-10:10, and the bottom-left would be 10:H-h-10.
2. Is the video re-encoded when adding a watermark? Will I lose quality?
Yes, it will always be re-encoded. The act of adding a watermark is an image processing operation that changes the pixel data of every single frame. FFmpeg must decode the original video frame by frame, "paint" the watermark image onto it, and then re-encode the newly combined frame into a new video stream.
This process inherently involves a quality loss (unless you use a lossless encoder, which would create a massive file). However, you can control the output quality by adding the -crf parameter, just as we discussed in the video compression article. Adding -crf 23 is a good way to maintain excellent visual quality while getting a reasonably sized file.
# Control output quality while adding a watermark
ffmpeg -i input.mp4 -i watermark.png -filter_complex "overlay=W-w-10:H-h-10" -crf 23 output.mp4