[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
https://www.youtube.com/watch?v=scxBddxr0gQ

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://
239.0.0.10:9998

Stream receiver / left hand
mpv udp://239.0.0.10:9998 --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://239.0.0.10:9998

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

ShowTime.bat

@echo off
:loop
echo %time%
goto loop

ShowTimeV2.bat Thanks to reddit user u/illsk1lls

@ECHO OFF
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"
ECHO.
:TIMER
<nul set /p ".=%time% !cr!          "
GOTO :TIMER

ShowTimeV3.bat Thanks to reddit user u/illsk1lls

@ECHO OFF
TITLE Precise Time
MODE 30,3
:TIMER
CLS
ECHO.
ECHO          %TIME%
GOTO TIMER

n the video they are presented in order


More information about the ffmpeg-user mailing list