Problems with multicast RTSP stream if no default gateway is defined

Guillermo Rodriguez Garcia guille.rodriguez at gmail.com
Thu Sep 17 13:03:36 UTC 2020


Hi all,

I am trying to play a multicast RTSP stream using GStreamer and I am
seeing some unexpected behaviour. This is a simplified version of the
pipeline I am using:

gst-launch-1.0 rtspsrc location=rtsp://192.168.0.216 ! rtph264depay !
avdec_h264 ! videoconvert ! videoscale ! fakesink

The RTSP source and the machine running GStreamer are both in an
isolated LAN (192.168.0.xxx). There is no "default gateway" defined.

The above pipeline results in errors ("Error joining multicast group:
No such device").

[...]
0:00:00.146730467  [333m 2432 [00m 0x55d24c1894a0  [33;01mWARN    [00m
 [00m              udpsrc
gstudpsrc.c:1582:gst_udpsrc_open:<udpsrc0> [00m error: could not add
membership: Error joining multicast group: No such device
0:00:00.146782947  [333m 2432 [00m 0x55d24c1894a0  [31;01mERROR   [00m
 [00m              udpsrc
gstudpsrc.c:1661:gst_udpsrc_close:<udpsrc0> [00m Failed to leave
multicast group: Error leaving multicast group: No such device
0:00:00.147097556  [333m 2432 [00m 0x55d24c1894a0  [33;01mWARN    [00m
 [00m              udpsrc
gstudpsrc.c:1582:gst_udpsrc_open:<udpsrc1> [00m error: could not add
membership: Error joining multicast group: No such device
0:00:00.147154020  [333m 2432 [00m 0x55d24c1894a0  [31;01mERROR   [00m
 [00m              udpsrc
gstudpsrc.c:1661:gst_udpsrc_close:<udpsrc1> [00m Failed to leave
multicast group: Error leaving multicast group: No such device
0:00:00.148073188  [333m 2432 [00m 0x55d24c1894a0  [31;01mERROR   [00m
 [00m             rtspsrc
gstrtspsrc.c:4640:gst_rtspsrc_stream_configure_udp_sinks:<rtspsrc0> [00m
failed to create socket
0:00:00.148101780  [333m 2432 [00m 0x55d24c1894a0  [33;01mWARN    [00m
 [00m             rtspsrc
gstrtspsrc.c:4744:gst_rtspsrc_stream_configure_transport:<rtspsrc0> [00m
failed to configure transport

I thought that this was because rtspsrc didn't know which interface to
use for multicast. So I tried:

gst-launch-1.0 rtspsrc multicast-iface=enp0s3 ! ....

This doesn't work either, although a different error is reported:

[...]
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
0:00:00.154308014  [335m 3790 [00m 0x7fdd44031a30  [33;01mWARN    [00m
 [00m        multiudpsink
gstmultiudpsink.c:686:gst_multiudpsink_send_messages:<udpsink0> [00m
warning: Error sending UDP packets
0:00:00.154344693  [335m 3790 [00m 0x7fdd44031a30  [33;01mWARN    [00m
 [00m        multiudpsink
gstmultiudpsink.c:686:gst_multiudpsink_send_messages:<udpsink0> [00m
warning: client 239.0.0.1:5000, reason: Error sending message: Network
is unreachable
WARNING: from element
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink0: Error
sending UDP packets
Additional debug info:
../gst/udp/gstmultiudpsink.c(686): gst_multiudpsink_send_messages ():
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink0:
client 239.0.0.1:5000, reason: Error sending message: Network is unreachable

If I define a default gateway in the machine running GStreamer, then
everything works.

Is this normal? Why do I need a default gateway to be able to send
packets to a multicast address (which is not routed anywhere) ?

Best regards,

Guillermo Rodriguez Garcia
guille.rodriguez at gmail.com


More information about the gstreamer-devel mailing list