Page 1 of 1

Support for multiple video streams in a single RTSP session

Posted: 27 Mar 2011 03:43
by gauravchandgupta
Hi,

I have a situation where i need to support playback of recorded data which can have multiple video formats.
So i mean i can have recorded video with some parts of it in MPEG4 and some parts in H.264.
Can i overcome this situation using multiple m= lines one for each of these video codecs so that we can create
different udp ports for each one of these codecs.I will transmit the packets as when they came to relevant ports.
So will the vlc player be able to intermix this and display.

Re: Support for multiple video streams in a single RTSP sess

Posted: 27 Mar 2011 10:35
by Rémi Denis-Courmont
No. VLC will interpret this has multiple concurrent video tracks. You can't do that with RTSP 1.0 (I'm not sure about RTSP 2.0, but VLC does not implement RTSP 2.0 yet anyway).

Currently, multiplexing over an MPEG Transport Stream is the only option that I am aware of for changing codecs on the fly.

Re: Support for multiple video streams in a single RTSP sess

Posted: 28 Mar 2011 01:10
by gauravchandgupta
Thanks for ur prompt response.Is it then possible for me to send new SDP description later when i need to switch or can the VLC support multiple payload formats on a single UDP port.(can it do this by seeing a different payload type in RTP Header or parse the data and understand the payload type).

Re: Support for multiple video streams in a single RTSP sess

Posted: 28 Mar 2011 10:17
by Rémi Denis-Courmont
No. You can't do that. There is no way to send an updated SDP within the boundaries of RTSP 1.0 anyway.

Re: Support for multiple video streams in a single RTSP sess

Posted: 28 Mar 2011 13:23
by gauravchandgupta
Thanks again for the support.Can this be done then

if i write m = video <port number> RTP/AVP <fmt list>

if i specify multiple codecs in fmt list say

m = video <port number> RTP/AVP 97 98

where 97 and 98 can specify different video codecs.

Is this kind of thing feasible so that as when data arrives the VLC based on payload type(97 or 98) will decode and

display the data properly on just one window.

Re: Support for multiple video streams in a single RTSP sess

Posted: 28 Mar 2011 15:12
by Rémi Denis-Courmont
I don't think that is a valid use of RTSP. Whether it will work depends on how liblive555 handles it. But, in my understanding, multiple codecs on the same m-line are meant for codec negotiation in SIP O/A. There is no such thing in RTSP.

As already said, MPEG-TS is the only specified way to change codecs on the fly at the moment.