[FFmpeg-user] ffmpeg ip cam stream with drawtext

Michael Shaffer mikeshaffer at gmail.com
Tue Jan 29 01:06:18 EET 2019

Hi, we are also streaming a Hikvision cctv camera to youtube. We're not
putting text on the image but are using the "-vf curves" command to
eliminate fog. The CPU was unable to do the curves filter at 30fps above
1080p. We put my GeForce 1060 3GB in the computer, and it doesn't use much
CPU at all now. Here is the command we're using that uses the Nvidia GPU.

c:\ffmpeg\bin\ffmpeg1.exe -re -rtsp_transport tcp -y -i "rtsp://
admin:12345 at" -f lavfi -f dshow -rtbufsize 2000M
-thread_queue_size 5096 -i audio="virtual-audio-capturer" -c:a libmp3lame
-ab 128k -ar 44100 -bufsize 5096k -c:v h264_nvenc -preset:v hq -rc cbr_hq
-b:v 12M -buffer_size 10000k -vf curves=psfile=c22.acv -f flv "rtmp://

If you an afford  it, a GPU would help a lot.

On Mon, Jan 28, 2019 at 1:47 PM frhun <frobihun at gmail.com> wrote:

> 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
> "[in]drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> 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 ,
> drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> 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 ,
> drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> 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 ,
> drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> 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
> rtmp://a.rtmp.youtube.com/live2/x-x-x-x
> 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.
> Thanks!
> Robert
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

More information about the ffmpeg-user mailing list