[FFmpeg-user] ffmpeg ip cam stream with drawtext

frhun frobihun at gmail.com
Mon Jan 28 20:39:35 EET 2019

Hi all

I am new in the mail list.
I from Hungary, I usualy helped sport competition, streaming to youtube...

I hope someone helps me.

I have a ip cam ( hikvision) , so far using only stream to youtube function.

( ffmpeg -re -rtsp_transport tcp -i 
rtsp://admin:xxxxx@ -tune 
zerolatency -vcodec libx264  -pix_fmt + -c:v copy -ac 1 -c:a aac -strict 
experimental -f flv rtmp://a.rtmp.youtube.com/live2/x-x-x-x )

working as well,
but now I want drawing text from dynamic text file.

ffmpeg -re -rtsp_transport tcp -i 
rtsp://admin:xxxxx@ -acodec aac -ar 
8000 -b:a 64k -vcodec libx264 -vf 
textfile='Z\:\\k\\v\\T_A\\P.txt': x=180: y=30: reload=1: 
fontcolor=black: fontsize=50: box=1: boxborderw=5: boxcolor=red at 0.8 , 
textfile='Z\:\\k\\v\\T_A\\F.txt': x=180: y=75: reload=1: 
fontcolor=black: fontsize=50: box=1: boxborderw=5: boxcolor=white at 0.8 , 
textfile='Z\:\\k\\v\\T_A\\O.txt': x=30: y=30: reload=1: fontcolor=black: 
fontsize=60: box=1: boxborderw=5: boxcolor=aqua at 0.8 , 
textfile='Z\:\\k\\v\\T_A\\M.txt': x=30: y=80: reload=1: fontcolor=black: 
fontsize=47: box=1: boxborderw=5: boxcolor=yellow at 0.8[out]" -f flv 

4 txt files writing per second a program (scoreboard) names, points, 
time, line number

both bat files ( I using on win 10) working well, but first code cpu 
usage is 4-5 percent, and the second cpu usage is 50% !!!
it is not so good because 4-5 pieces stream send to youtube...

What is te perfect solution that the cpu usage be small.



More information about the ffmpeg-user mailing list