3/18/2026
Add a text watermark to video with FFmpeg drawtext. Includes corner positioning, opacity, borders, fonts, and common troubleshooting tips.
How to Add a Text Watermark to Video with FFmpeg
Use FFmpeg's drawtext filter to add a visible text watermark, label, username, copyright notice, or brand mark to a video.
For the short command page, see Add Text Watermark with FFmpeg. For a form-based command builder, use the Add Text Watermark tool.
Bottom-Right Watermark
ffmpeg -i input.mp4 -vf "drawtext=text='MyBrand':fontcolor=white:fontsize=28:x=w-tw-20:y=h-th-20" -c:v libx264 -crf 23 -preset medium -c:a copy watermarked.mp4
This places MyBrand 20 pixels from the bottom-right corner.
What the Options Mean
| Option | Meaning |
|---|---|
drawtext |
FFmpeg filter that renders text on video frames. |
text='MyBrand' |
Text shown in the watermark. |
fontcolor=white |
Text color. |
fontsize=28 |
Text size. |
x=w-tw-20 |
Horizontal position: video width minus text width minus 20px. |
y=h-th-20 |
Vertical position: video height minus text height minus 20px. |
Because drawtext changes video frames, FFmpeg must re-encode the video.
Common Positions
| Position | Expression |
|---|---|
| Top-left | x=20:y=20 |
| Top-right | x=w-tw-20:y=20 |
| Bottom-left | x=20:y=h-th-20 |
| Bottom-right | x=w-tw-20:y=h-th-20 |
| Center | x=(w-tw)/2:y=(h-th)/2 |
Semi-Transparent Watermark with Border
ffmpeg -i input.mp4 -vf "drawtext=text='MyBrand':[email protected]:fontsize=32:borderw=2:bordercolor=black:x=w-tw-20:y=h-th-20" -c:v libx264 -crf 23 -preset medium -c:a copy watermarked.mp4
The @0.55 sets opacity. borderw and bordercolor make text easier to read on bright backgrounds.
Use a Specific Font
If FFmpeg cannot find a suitable font, set one manually:
ffmpeg -i input.mp4 -vf "drawtext=fontfile=/path/to/font.ttf:text='MyBrand':fontcolor=white:fontsize=28:x=w-tw-20:y=h-th-20" -c:v libx264 -crf 23 -c:a copy watermarked.mp4
For Chinese, Japanese, Korean, or emoji text, choose a font that supports the characters.
Common Problems
FFmpeg says Cannot find a valid font.
Add fontfile=/path/to/font.ttf.
The text is not visible.
Use a larger font size, add a border, or move it away from bright areas.
The shell breaks because of quotes.
If your text contains quotes, escape them or use a simpler watermark string.
The output quality changed.
Use a lower CRF value such as 18 or 20.
Related FFmpeg Pages
- See the short recipe: Add Text Watermark with FFmpeg.
- Build a custom command with the Add Text Watermark tool.
- Learn how to crop a video with FFmpeg.
- Debug drawtext and filter errors with the FFmpeg error explainer.
Related tool
Add Text Watermark with FFmpeg
Generate FFmpeg drawtext commands to add a text watermark, label, or copyright notice to video.
Open the command generator