Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ffmpeg text watermark bottom left

I have found out how ffmpeg can add image watermark at the bottom left of a video

ffmpeg -i "C:\test.mp4" -i "C:\test\watermark.png" -filter_complex "overlay=10:main_h-overlay_h-10" "C:\test-watermark.mp4"

but I am looking for a way to add text (white, 12px text, with black shadow to make the text readable) instead of an image. Can somebody help me?

like image 324
Bálinth István Avatar asked Aug 02 '16 16:08

Bálinth István


1 Answers

Use the drawtext filter.

ffmpeg -i "C:\test.mp4"
 -vf "drawtext=text='Place text here':x=10:y=H-th-10:
               fontfile=/path/to/font.ttf:fontsize=12:fontcolor=white:
               shadowcolor=black:shadowx=5:shadowy=5"
"C:\test-watermark.mp4"
like image 133
Gyan Avatar answered Nov 14 '22 22:11

Gyan