Add a logo or watermark to a video
Sign your videos with your logo before you publish them. ffmpeg overlays a PNG image, preferably with a transparent background, in the corner of your choice, at the size and with the transparency you want.
Updated on
Preferably a PNG with a transparent background.
The lower the number, the better the picture and the larger the file.
How to use it
- Install ffmpeg if you haven't already.
- Put the video and the logo in the same folder, then open a terminal in that folder.
- Copy the generated command, adjust the file names if needed, then run it.
- Open the resulting file to check the result.
How the overlay works
The logo is first resized to the chosen width, keeping its proportions, then made more or less transparent. The overlay filter then places it on the video: W and H are the size of the video, w and h the size of the logo, which lets you target a corner whatever the resolution.
Logo size by resolution
150 pixels is about 8% of the width of a 1080p video, but 12% of a 720p video. If you process videos with different resolutions, adjust the width to keep a consistent look.
Frequently asked questions
The logo has a white or black background instead of being transparent
The image has no transparency: this is often the case with a JPEG. Export the logo as a PNG with a transparent background from your graphics software.
How do I move the logo closer to the edge?
The 20-pixel margin appears in the position, for example "W-w-20:H-h-20". Replace 20 with 10 for a logo closer to the edge.
Can I add text instead of a logo?
Yes, with ffmpeg's drawtext filter, but it requires you to specify a font file. The simplest approach is still to export the text as a transparent PNG and use this page.