Closed onorua closed 3 months ago
Hello, thanks for providing detailed instructions on how to replicate the issue, however, this happens because you set the sync
flag to false:
gst-launch-1.0 -v videotestsrc ! clockoverlay ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=ultrafast key-int-max=30 ! mpegtsmux alignment=1 ! srtsink wait-for-connection=false sync=false enable-last-sample=true "uri=srt://{serverIP}:8890?mode=caller&streamid=publish:room502&udp-mss=1200"
With sync=false
, video frames are not sent in real time, but as soon as they are generated, and since the generation speed on your machine is greater than the clock time, you are sending 10 minutes of video in 3 minutes, resulting in 10 minutes-files generated every 3 minutes, as expected.
We never supported streaming non-realtime video, even though there are some clients that allow it.
Is there something i'm missing here?
Thank you, you are right, I've added is-live=1
to my videotestsrc
and it is working as expected now. We are considering mediamtx for our realtime event.
The sync=false
option introduced by me to avoid client side delays during comparison of media servers. Hence I needed to have "full speed". Obviously I was wrong :)
Which version are you using?
v1.8.2-27-g42724987
Which operating system are you using?
Describe the issue
config for recording:
According to the
recordSegmentDuration: 10m
new file should be created every 10 minutes. In fact new file created every ~3 minutes:During realtime stream that I can see from WebRTC client - the video showed in normal speed. But the recorded one is like 3-4 times slower than it should be. In fact, the recorded file that created every 3 minutes, in VLC has 10 minutes length.
Describe how to replicate the issue
gst-launch-1.0 -v videotestsrc ! clockoverlay ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=ultrafast key-int-max=30 ! mpegtsmux alignment=1 ! srtsink wait-for-connection=false sync=false enable-last-sample=true "uri=srt://{serverIP}:8890?mode=caller&streamid=publish:room502&udp-mss=1200"
Did you attach the server logs?
no
Did you attach a network dump?
no, but I have attached video file with configuration to write segment every minute.
https://github.com/bluenviron/mediamtx/assets/407040/d81f5a33-745b-4959-81db-f27faa2708af