Reading desktop stream from rtmp server initializes very slowly with 3.4.1

Questions involving a Windows version of FFmpeg.
Post Reply
mahon5763
Posts: 3
Joined: Fri Jun 24, 2016 7:14 pm

Reading desktop stream from rtmp server initializes very slowly with 3.4.1

Post by mahon5763 » Mon Feb 12, 2018 11:57 pm

This is fixed in the latest nightly build (as of Feb 11th, 2018), but I want to note this here in case anyone else encounters this problem.

I stream my desktop with the command:

Code: Select all

ffmpeg -f gdigrab -i desktop -f dshow -i audio="Microphone (Realtek High Definition Audio)" -c:v h264_nvenc -rtbufsize 1M -vf scale=854:480 -frag_duration 2 -force_key_frames expr:gte(t,n_forced*2) -preset fast -pix_fmt yuv420p -c:a aac -f flv rtmp://localhost:1935/live
And read the RTMP stream into DASH content with:

Code: Select all

ffmpeg -i rtmp://localhost:1935/live -r 30 -c:v libx264 -rtbufsize 1M -b:v 500000 -preset veryfast -frag_duration 2 -force_key_frames expr:gte(t,n_forced*2) -c:a aac -f dash -min_seg_duration 2000 -use_template 1 -use_timeline 1 -init_seg_name init-$RepresentationID$.m4s -media_seg_name seg-$RepresentationID$-$Number$.m4s D:\videos\test\liveStream.mpd -f image2 -vf fps=1/2,scale='-1:-1' thumbnail%04d.jpeg
This worked fine with ffmpeg v3.3.1. When I upgraded to 3.4.1, the second command to read the RTMP stream would take 1-2 minutes before writing out the DASH content. I tried the latest nightly build, and that build writes out the content within a few seconds.

Post Reply