[FFmpeg-user] ffmpeg ip cam stream with drawtext
frhun
frobihun at gmail.com
Tue Jan 29 08:33:55 EET 2019
Hi
I try to put on the text image.
ffmpeg -re -rtsp_transport tcp -i
rtsp://admin:xxxxx@192.168.2.25:554/Streaming/Channels/1 -f image2 -loop
1 -i C:\k\v\T\A.bmp -filter_complex "overlay=10:10" -vcodec libx264
-pix_fmt yuv420p -f flv rtmp://a.rtmp.youtube.com/live2/x-x-x-x
the image file size is ~200kb, lot of time to write to disk, and ffmpeg
do not open some times, and the last image show static.
that method is good for a short time, but rather this is good show logos
on the video
and I do not put videocard the pc, but it is a notebook.
I did not say, the text information change per second.
I like to made example football video brodcasting, is shown at the top
of the image the result, time, and others ( flags..)
Thanks
Robert
2019. 01. 29. 0:06 keltezéssel, Michael Shaffer írta:
> 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 192.168.1.64:554" -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://
> a.rtmp.youtube.com/live2/abcd-efgh-1234-1234"
>
> If you an afford it, a GPU would help a lot.
> Michael
>
> 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@192.168.2.25:554/Streaming/Channels/1 -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@192.168.2.25/Streaming/Channels/1 -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".
> _______________________________________________
> 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