[FFmpeg-user] FFmpeg vs mpv multicast streaming experiment, filmed using 240fps camera

Joe Smithy ffmpeg-user at domn.net
Mon Mar 27 00:20:51 EEST 2023

Video in question

Experiment to find a high precision clock display for desktop streaming on
windows with multicast

TL;DR SCript ShowTimeV2.bat below is the best so far

This monitor is operating at 60Hz
The stream capture is also operating at 60fps, at least that's what the
command line says
For reference this monitor is the excellent hisense 43R63G running at 4K
60hz HDR off

The whole system and using the MPV receiver appears to be about 0.75
seconds behind
And for the ffplay receive it appears to be 0.5 seconds behind

Streaming command
ffmpeg -f gdigrab -framerate 60 -video_size 3840x2160 -i desktop -vf
"scale=1920:1080" -c:v h264_nvenc -preset llhp -tune ull -f mpegts udp://

Stream receiver / left hand
mpv udp:// --profile=low-latency --no-cache --untimed
 --no-demuxer-thread --vd-lavc-threads=4

Stream receiver / right hand
ffplay -hide_banner -fflags nobuffer -flags low_delay -probesize 20000
-analyzeduration 1 -strict experimental -framedrop  udp://

Blue millisecond clock is open source project called "clock-millisecond",
unfortunately it updates at around 10/15 FPS, unsuitable for our purpose
https sourceforge.net/projects/clock-millisecond/

Then there is a succession of 3 scripts to create a high precision timer
using the cmd.exe console

the scripts


@echo off
echo %time%
goto loop

ShowTimeV2.bat Thanks to reddit user u/illsk1lls

TITLE Precise Time
MODE 30,3
SETLOCAL EnableDelayedExpansion
REM pull a CarriageReturn from output of dummy copy error
FOR /f %%a in ('copy /Z "%~dpf0" nul') DO SET "CR=%%a"
<nul set /p ".=%time% !cr!          "

ShowTimeV3.bat Thanks to reddit user u/illsk1lls

TITLE Precise Time
MODE 30,3
ECHO          %TIME%

n the video they are presented in order

More information about the ffmpeg-user mailing list