Reducing latency in an RTSP stream #3871
Unanswered
ssi-jmandrell
asked this question in
Questions
Replies: 2 comments 1 reply
-
For completeness, here is the mediamtx.yml file I am currently using. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You probably need to modify the x264enc parameters. Try using at least x264enc speed-preset=ultrafast tune=zerolatency. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
I have a gstreamer pipeline scraping the screen buffer and encoding that to an RTSP stream which I am passing on to mediamtx. When I connect to the external stream it appears to always be delayed by 10 seconds. Is there a way I can substantially reduce this delay?
I am running under Ubuntu Linux (24.04) and using mediamtx 1.9.1
I see this if I'm using VLC or mplayer to view the stream. This is also visible using VLC and other RTSP receiving tools such as the Genetec VMS.
The gstreamer pipeline I am using is
ximagesrc display-name=:1.0 show-pointer=false use-damage=false ! video/x-raw,framerate=5/1 ! videoconvert ! video/x-raw,format=I420 ! queue ! x264enc ! rtspclientsink latency=1000 protocols=4 location=rtsp://127.0.0.1:554/rtsp
The latency setting on this pipeline should buffer things by 1 seconds, so I'm not sure where the extra delay is coming from.
Are there settings I can adjust in mediamtx to reduce the amount of buffering it is performing before sending out the stream?
Beta Was this translation helpful? Give feedback.
All reactions