watermark on transcoding rtmp video nginx

571 Views Asked by At

Hello i am transcoding video with rtmp and i want to put some text...i put Arial.ttf in my home directory of the server but doesnt work.. this is my command..

-map 0:0 -map 0:1 -strict -2 -crf 26 -vcodec libx264 -preset superfast 
-acodec aac -b:a 128k -vf scale=-1:720  -aspect 16:9 -g 50 -r 30 -ar 48000 
-ac 2 -vf drawtext="fontfile=/home/Arial.ttf: text='TEXT': fontcolor=white: fontsize=24: box=1: boxcolor=black: x=10:y=10" 
-f flv

can someone help me please?

thanks

1

There are 1 best solutions below

0
On

Make sure you include absolute path to font and file is there:

drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text': x=100: y=50: fontsize=24: [email protected]: box=1: [email protected]"

Redirect output to a log file and see if command outputs any errors.

You can also include a watermark image instead:

-i /path/to/watermark.png -filter_complex "overlay=main_w-overlay_w-4:4"