RTSP Multicast Scenario Setup

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

RTSP Multicast Scenario Setup

Mario Montagud

Dear all,

I'm testing with the gst-rtsp-server (branch 1.2.3). In unicast mode,  
the provided examples work very nice (RTSP, SDP, RTP and RTCP)!  
However, I had no success with the multicast mode.

I've checked that in the provided multicast examples (e.g.,  
test-multicast) a multicast address pool is created. So, my question  
is: how can I launch a multicast client that will receive the RTP  
stream/s through one of the configured multicast addresses?

At the client side I run: ./test-multicast, and at the receiver side  
(different machines) I run:  gst-launch-1.0 -v rtspsrc  
location="rtsp://ip_rtsp_server:8554/test" ! rtph264depay ! avdec_h264  
! autovideosink

The audio/video streams are played out (also using VLC). However, I  
can only see unicast RTP/RTCP packets in Wireshark, and I want a  
shared multicast stream (224.x.x.x) for the different clients, what am  
I doing wrong?

I've tried by setting mcast-iface=ethX and  
protocols=GST_RTSP_LOWER_TRANSP_UDP_MCAST properties in rtspsrc, but  
no success!

I've also tested a multicast scenario with VLC and it works, so I  
guess it is a problem of my network.

I would really appreciate your feedback!

Best Regards,

Mario

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Multicast Scenario Setup

Sebastian Dröge-3
On Fr, 2014-02-28 at 17:07 +0100, Mario Montagud Climent wrote:

> Dear all,
>
> I'm testing with the gst-rtsp-server (branch 1.2.3). In unicast mode,  
> the provided examples work very nice (RTSP, SDP, RTP and RTCP)!  
> However, I had no success with the multicast mode.
>
> I've checked that in the provided multicast examples (e.g.,  
> test-multicast) a multicast address pool is created. So, my question  
> is: how can I launch a multicast client that will receive the RTP  
> stream/s through one of the configured multicast addresses?
>
> At the client side I run: ./test-multicast, and at the receiver side  
> (different machines) I run:  gst-launch-1.0 -v rtspsrc  
> location="rtsp://ip_rtsp_server:8554/test" ! rtph264depay ! avdec_h264  
> ! autovideosink
>
> The audio/video streams are played out (also using VLC). However, I  
> can only see unicast RTP/RTCP packets in Wireshark, and I want a  
> shared multicast stream (224.x.x.x) for the different clients, what am  
> I doing wrong?
IIRC rtspsrc by default prefers TCP, then UDP unicast and as last option
UDP multicast. By setting the protocols property on rtspsrc to
udp-multicast it will only use that and fail if multicast is not
possible.

On the server side, I think it's indeed a bit unintuitive that it still
tries to allow unicast if you only provided a pool with multicast
addresses. I think this should be reported as a bug at
http://bugzilla.gnome.org against GStreamer/gst-rtsp-server.

--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Multicast Scenario Setup

Mario Montagud
Hi Sebastian,

Thank you very much for the feedback!

See my comments below

<quote author="Sebastian Dröge-3">

IIRC rtspsrc by default prefers TCP, then UDP unicast and as last option
UDP multicast. By setting the protocols property on rtspsrc to
udp-multicast it will only use that and fail if multicast is not
possible.

On the server side, I think it's indeed a bit unintuitive that it still
tries to allow unicast if you only provided a pool with multicast
addresses. I think this should be reported as a bug at
http://bugzilla.gnome.org against GStreamer/gst-rtsp-server.

<quote author="Sebastian Dröge-3">

Yes, I read that in the rtspsrc documentation. I think it is exactly what is happening.

If I configure VLC to play out  the incoming RTSP stream (rtsp://ip_rtsp_server:8554/test), it works but in a unicast way.

If I use Gstreamer:

  1) gst-launch-1.0 playbin uri=rtsp://ip_rtsp_server:8554/test

  2) gst-launch-1.0 -v rtspsrc location="rtsp://192.168.37.240:8555/test" ! rtph264depay ! avdec_h264 ! Autovideosink

Both options also play out the incoming RTSP stream in a unicast way.

If I try to force the multicast mode in rtspsrc, it fails:

  3) gst-launch-1.0 -v rtspsrc location="rtsp://192.168.37.240:8555/test" mcast-iface=eth0 protocols=GST_RTSP_LOWER_TRANSP_UDP_MCAST ! rtph264depay ! avdec_h264 ! autovideosink

Error: “Could not connect to server, no protocols left”. -> Since UDP Multicast is the last option!

Actually, the cause of the error is the “protocolos” option.

Am I doing something wrong? Probably I should specify the multicast group to which the client must join, but I don't know how .. Or, contrarily, should I report a bug?

By the way, I do not fully understand how the different multicast addresses in the pool are assigned to the clients. Can I have different multicast streaming sessions in the same RTSP Server? How can I client can indicate the specific multicast group it wants to join?



Reply | Threaded
Open this post in threaded view
|

Re: RTSP Multicast Scenario Setup

stic
In reply to this post by Mario Montagud
Hi,
I have the exact same issue as described here with rtsp server (tried with same version 1.2.3).
Is there a way to work with multicast streaming ?

Regards
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Multicast Scenario Setup

bigbug
I have managed to get the gst-rtsp-server test-multicast2 working to some extent by ensuring the udp_multicast option is passed, this is from Qt using QtAV::AVPlayer but if the option is present multicast does appear to work... to some extent... video is not so far decoded quite right but is at least delivered via multicast ;)

QtAV::AVPlayer player;
QVariantHash opt;
opt["rtsp_transport"] = "udp_multicast";
player.setOptionsForFormat(opt);

you can verify the correct options are passed using TCPDump or wireshark and filtering for RTSP flavor packets, the negotiation is quite informative.

.,;;,.

Reply | Threaded
Open this post in threaded view
|

Re: RTSP Multicast Scenario Setup

surendra
In reply to this post by Mario Montagud
Hi Mario,

I am also facing the same issue with the multicast stream.

I have camera(Moxa Camera) which act as multicast server (i am able to configure multicast address : 230.43.14.7 and port to 5556) .

Camera and the Gstreamer installed  computer connected to switch and in switch snooping enabled (gstreamer computer port joins the snooping).

When i try using below command
gst-launch-1.0 -e \
rtspsrc location="rtsp://10.27.1.38:554/multicaststream_ch1_stream1" protocols=GST_RTSP_LOWER_TRANSP_UDP_MCAST \
    ! rtph264depay ! avdec_h264 \
    ! videoconvert ! xvimagesink sync=false \

Error: “Could not connect to server, no protocols left”. -> Since UDP Multicast is the last option!

Did you resolve the issue?. i am using gstreamer 1.2.3 version with ununtu trusty(14.04)

Could you please help me in resolving the issue..

Thanks,
Surendra