I tried to set up a simple video streaming pipeline using matroska and it seems to work fine. However, I receive dozens of Got data flow before segment event errors when starting the client side. What could cause this?
In this specific setup it’s just noise, however, I have a much more complicated RTSPS pipeline which this snippet is a part of and I suspected this to be the root of my problems. Maybe I should expand and explain the whole problem.
In the minimal setup, there are three devices: an edge device (raspberry), a server (debian) and a smartphone (in this case Android).
The raspberry communicates with the server by sending a matroska stream over its VPN tunnel and this works pretty well (I would like to use UDP, though, which I didn’t get to work with matroska so far, as it doesn’t send stream headers after the stream has already started; this isn’t the problem here, as it does work with TCP for now).
As there could be several smartphones connected to the server, I use RTSP(S) for this connection. The RTSP server demuxes the matroska stream and sends both video and audio via rtp to the smartphone, which authenticates via basic auth.
With GStreamer 1.14 I had no problems using this setup, with GStreamer 1.22 I get the following messages in chronological order:
rtspclient rtsp-client.c:1080:find_media: client 0x7f618cb40510: not authorized to see factory path
Got data flow before segment event for every element in the pipeline
rtpsession gstrtpsession.c:2514:gst_rtp_session_chain_send_rtp_common:<rtpsession0> Don't have a clock yet and can't determine NTP time for this packet
rtspstream rtsp-stream.c:5618:gst_rtsp_stream_query_position:<GstRTSPStream@0x7f615404a350> Couldn't obtain position: no segment event (the same for query_stop)
I figured that the first error is actually not a problem, as this only fires for the OPTIONS RTSP request and also occurs on GStreamer 1.14. With the rest of the problems, I’m not sure which is the root of the stream not working at all.
It’s version 1.22.10. I’m pretty sure you’re right that it’s an issue with matroskademux as I reimplemented the whole thing with rtpbin and plain payloaded h264/opus in the meantime and get no error, even with authentication.
It’s not just matroskademux, it is also showing up in flacs:
⋮
./Various Artists -- Blues Dance: Early Jamaican Sound System Smash Hits – 1942-62, Vol. 03 (2020)/01-23 - Azzie Lawrence -- Jamaica Blues.flac:done
Done
Successfully finished 2 of 5.
(collectiongain:698499): GStreamer-WARNING **: 08:24:16.856: ../gstreamer/subprojects/gstreamer/gst/gstpad.c:4818:gst_pad_push_data:<flacparse27:src> Got data flow before segment event
⋮
This is error/warning/debug output from collectiongain of rgain3. The author of rgain3 is MIA but the errors therein were reported 5 years ago. I don’t know if there’s a 1:1 correspondence between flac files and error outputs, but there are generally a lot of these errors when I run it.
$ \gst-inspect-1.0 flacparse |grep version; \gst-inspect-1.0 flacdec |grep version; \gst-inspect-1.0 --version; collectiongain --gst-version
Version 1.26.9
Version 1.26.9
gst-inspect-1.0 version 1.26.9
GStreamer 1.26.9
https://www.archlinux.org/
GStreamer Core Library version 1.26.9
One common denominator between these two issues is python. (The python version for this rgain3 install is 3.13.) Maybe the problem lies with something other than the demuxers/decoders like gi which is common to both of these? Then again, another common denominator is the core gstreamer itself.