RTSP Streaming Delays

Joshua Quesenberry engnfrc at gmail.com
Fri Oct 27 15:04:40 UTC 2023


Hello Everyone,

I need some help handling RTSP feeds where the attached device may
occasionally reboot and take 30-60 seconds to rebroadcast it’s feed.
The cameras used only support RTSP with TCP. I’ve tried adjusting the
various timeouts for rtspsrc, but they don’t seem to make any
difference in the behavior I see. The high-level software I’m using
right now isn’t smart enough to restart the gstreamer pipeline, so
what I would really like is for the stream to remain open forever and
re-connect internally as needed. I tried throwing mediamtx in the
middle and switching gstreamer rtspsrc to UDP mode, however it’s
showing that the server closed the connection and “Could not read from
resource”. I’ve set all the gstreamer rtspsrc timeout parameters to 0
and all the mediamtx timeouts to 120s, but this doesn’t appear to have
any effect either. I’m using Ubuntu 20.04 with GStreamer 1.16.x
packages (see below). What am I missing with regards to timeouts in
gstreamer and/or mediamtx? Why don’t they appear to have any effect?
I’m guessing some of you all have run into similar limitations, so
does anyone have other setups I could try out that may get me through
this issue?

ii  gir1.2-gstreamer-1.0:amd64
1.16.3-0ubuntu1.1                    amd64        GObject
introspection data for the GStreamer library
ii  gstreamer1.0-alsa:amd64
1.16.3-0ubuntu1.1                    amd64        GStreamer plugin for
ALSA
ii  gstreamer1.0-clutter-3.0:amd64                     3.0.27-1
                     amd64        Clutter PLugin for GStreamer 1.0
ii  gstreamer1.0-espeak:amd64                          0.5.0-1
                     amd64        GStreamer plugin for eSpeak speech
synthesis
ii  gstreamer1.0-gl:amd64
1.16.3-0ubuntu1.1                    amd64        GStreamer plugins
for GL
ii  gstreamer1.0-libav:amd64                           1.16.2-2
                     amd64        ffmpeg plugin for GStreamer
ii  gstreamer1.0-opencv:amd64                          1.16.3-0ubuntu1
                     amd64        GStreamer OpenCV plugins
ii  gstreamer1.0-packagekit
1.1.13-2ubuntu1.1                    amd64        GStreamer plugin to
install codecs using PackageKit
ii  gstreamer1.0-plugins-bad:amd64                     1.16.3-0ubuntu1
                     amd64        GStreamer plugins from the "bad" set
ii  gstreamer1.0-plugins-base:amd64
1.16.3-0ubuntu1.1                    amd64        GStreamer plugins
from the "base" set
ii  gstreamer1.0-plugins-base-apps
1.16.3-0ubuntu1.1                    amd64        GStreamer helper
programs from the "base" set
ii  gstreamer1.0-plugins-good:amd64
1.16.3-0ubuntu1.1                    amd64        GStreamer plugins
from the "good" set
ii  gstreamer1.0-plugins-ugly:amd64                    1.16.2-2build1
                     amd64        GStreamer plugins from the "ugly"
set
ii  gstreamer1.0-pulseaudio:amd64
1.16.3-0ubuntu1.1                    amd64        GStreamer plugin for
PulseAudio
ii  gstreamer1.0-rtsp:amd64                            1.16.2-3
                     amd64        RTSP plugin for GStreamer
ii  gstreamer1.0-tools
1.16.3-0ubuntu1.1                    amd64        Tools for use with
GStreamer
ii  gstreamer1.0-vaapi:amd64                           1.16.2-2
                     amd64        VA-API plugins for GStreamer
ii  gstreamer1.0-x:amd64
1.16.3-0ubuntu1.1                    amd64        GStreamer plugins
for X11 and Pango
ii  libgstreamer-gl1.0-0:amd64
1.16.3-0ubuntu1.1                    amd64        GStreamer GL
libraries
ii  libgstreamer-opencv1.0-0:amd64                     1.16.3-0ubuntu1
                     amd64        GStreamer OpenCV libraries
ii  libgstreamer-plugins-bad1.0-0:amd64                1.16.3-0ubuntu1
                     amd64        GStreamer libraries from the "bad"
set
ii  libgstreamer-plugins-base1.0-0:amd64
1.16.3-0ubuntu1.1                    amd64        GStreamer libraries
from the "base" set
ii  libgstreamer-plugins-good1.0-0:amd64
1.16.3-0ubuntu1.1                    amd64        GStreamer
development files for libraries from the "good" set
ii  libgstreamer1.0-0:amd64
1.16.3-0ubuntu1.1                    amd64        Core GStreamer
libraries and elements

Thanks!

Josh Q


More information about the gstreamer-devel mailing list