I am trying to use SRT sink with GStreamer 1.16.0 on Ubuntu and I am facing
an issue at startup that is quite frequent. Once it's up and running it
works great, but about 50% of the time it simply doesn't want to start.
I managed to come up with a very simple pipeline to reproduce my issue
First, I start the consumer:
gst-launch-1.0 -v srtsrc uri="srt://127.0.0.1:8888" ! identity silent=false
! fakesink async=false
And then I try broadcasting something:
gst-launch-1.0 -v videotestsrc ! queue ! x264enc ! queue ! mpegtsmux
alignment=7 ! identity silent=false ! queue leaky=downstream ! srtsink
uri="srt://:8888" sync=false async=false
The identity element from my consumer will print stuff when it works, and I
tend to have to restart my 2nd pipeline 2 or 3 times before that happens,
even though the identity from this pipeline will always print, proving that
buffers seem to be flowing through normally there
Does anyone have experience with SRT streaming in GStreamer? Is anything
wrong with my pipeline?
My knowledge on SRT is quite limited (thanks GStreamer for abstracting all
that complexity), so I am not sure what else I can do to help with debugging
This seems to work 100% of the time, however this solution will never
support multiple clients: https://github.com/Haivision/srt/issues/574 They actually suggest using GStreamer in this thread for this kind of use
case, so hopefully something can be tweaked in my pipeline to make it work
as smoothly as their test app?
From there, I decided to try and see what is different between the default
config for srtsink and srt-live-transmit. It turns out they are using a
block size of 1456 instead of the default 4096 in srtsink, so I started
using blocksize=1456 on my srtsink. It's hard to tell for sure, but it seems
to be working better for me. It is still failing occasionally, but seems to
work about 80% of the time now...