[FFmpeg-user] Reducing Latency while streaming desktop

Thomas Glanzmann thomas at glanzmann.de
Sat Aug 25 21:24:10 EEST 2018


Hello,
I would like to use ffmpeg to stream my windows 7 desktop to windows 10
desktops on the same broadcast domain. Last week I used the following two lines
for 5 days, it worked flawlessly but the latency was around 400ms. I would like
to get below 50ms on a switched 1 Gbit ethernet network that has a
latency of 0.3ms. Do you have any recommendations that I can try?

I used one of the following two lines to capture my Windows 7 desktop:

ffmpeg -f gdigrab -framerate 25 -i desktop -vcodec libx264 -pix_fmt yuv420p -tune zerolatency -preset ultrafast -f mpegts udp://236.0.0.1:2000
ffmpeg -y -loglevel warning -f dshow -i video="screen-capture-recorder" -framerate 25  -vcodec libx264 -pix_fmt yuv420p -tune zerolatency -preset ultrafast -f mpegts udp://236.0.0.1:2000

I used the following two lines to play:

mpv.exe udp://236.0.0.1:2000 --no-cache --untimed --no-demuxer-thread
ffplay -probesize 32 -sync ext udp://236.0.0.1:2000

I used nightly builds both for ffmpeg and mpv.

Cheers,
	Thomas


More information about the ffmpeg-user mailing list