[Live-devel] RTSP UDP multicast Streams and RTP video and audio on the same port

Brent Hunsaker saker at helius.com
Tue Sep 13 17:35:30 PDT 2005


We have our own RTSP Server but we are using your live lib based RTSP 
client (openRTSP and VLC).

 > I am working with an MPEG 2 Transport stream that I am streaming with 
our RTSP Streamer.

####################################################################################
Is this "RTSP Streamer" something that you're developing yourself?  If 
so, then I suggest that you also use the "LIVE.COM Streaming Media" code 
for this.  In particular, I suggest working from the 
"testMPEG2TransportStreamer" demo program (for multicast streaming), or 
"testOnDemandRTSPServer" demo program (for unicast streaming).

If you're not using our software to develop your server (or if you're 
using some other closed-source server), then this mailing list is not 
appropriate.  (This mailing list is for developers who are using the 
"LIVE.COM Streaming Media" software.)
####################################################################################

Thank you for your reply.  I have been testing and stepping through the
openRTSP code.  I have included verbose output that I have received from
my openRTSP session.  I do have a couple more questions.

I am working with an MPEG 2 Transport stream that I am streaming with
our RTSP Streamer.  It does successfully stream and record both and
audio and video streams (although the 2 streams include both audio and
video).  How do I get the client to not expect separate streams?  Please
look at the log and let me know if you see anything strange.  I am
confused about the interpretation of the SDP that is returned in
response to the client's DESCRIBE command.  In our server we use:

m=video 5012 udp 33
m=audio 5012 udp 33

where 33 is the RTP Payload Type MP2T.  Since it is not an RTP Payload
Type shouldn't this field be ignored?  I have also tried 0 instead of 33
(PCMU) but they both appear to behave the same.  Originally I tried a
port of 5011 and the live library would create an RTP/RTCP pair of
5010-5011 where 5010 is the stream port.  This causes a problem because
the actual stream comes over 5011 and not 5010 (the RTCP port if we were
using RTP/AVP).  Does this mean that I can't use an odd numbered port
even though I am using udp and not rtp?  I looked in the source and it
doesn't seem to care what the protocol is and always assumes a separated
stream as evidenced by the separate video and audio files that are
recorded when openRTSP is run.

I've also noticed that the MIME formats for M1S and M2P are not
available under the RTP Payload Type.  Does that mean that they can't be
sent via RTP/AVP?

Thanks for your help.

Brent Hunsaker

Ross Finlayson wrote:

> At 03:44 PM 9/9/2005, you wrote:
>
>> I have been using the 0.8.2 version of VLC for Windows.  I have been 
>> trying to get this VLC client which uses your RTSP library to 
>> properly communicate with our RTSP Server so that I can use RTSP to 
>> start UDP multicast streams.  The VLC client will start the stream OK 
>> but it can't play the video and eventually crashes.
>>
>> It seems that this only works using VOD unicast RTP streams.  I have 
>> successfully run the VLC Server and Client on different machines and 
>> gotten a VOD stream.  However changing the output from vod to 
>> broadcast does not seem to work either.  Is this by design or am I 
>> missing something?
>
>
> As I don't know anything about your server, I can't help you much 
> here.  But as I noted yesterday in response to someone else's 
> question, it's up to the server to decide - based on the RTSP URL - 
> whether the stream is multicast or unicast.
>
> In any case, I suggest that you use the "openRTSP" command-line client 
> - rather than VLC - to debug your server.  See 
> <http://www.live.com/openRTSP/>.  If you give "openRTSP" the "-V" 
> option, you will see the full RTSP protocol exchange.
>
>> Also I am wanting to stream video and audio on the same port.  I read 
>> in the FAQ that separating the streams is by design.  Does that mean 
>> that the library only works with separate streams and that combining 
>> them under RTSP is not possible?
>
>
> No, once again this is something that's up to the server to decide.  
> However, most RTSP servers send separate RTP streams - on separate 
> port numbers - for audio and video.  The main exception is servers 
> that send MPEG Transport Streams (which contain audio and video 
> multiplexed together in a single stream).
>
>
>     Ross Finlayson
>     Live Networks, Inc. (LIVE.COM)
>     <http://www.live.com/>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live.com
> http://lists.live.com/mailman/listinfo/live-devel
>

-------------- next part --------------
C:\live\testProgs>openRTSP -V rtsp://172.16.11.2:554/stargate
Sending request: OPTIONS rtsp://172.16.11.2:554/stargate RTSP/1.0
CSeq: 1
User-Agent: openRTSP (LIVE.COM Streaming Media v2005.08.26)


Received OPTIONS response: RTSP/1.0 200 Ok
CSeq: 1
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER, GET_PARAMETER, RE
CORD, REDIRECT, ANNOUNCE
Content-Length: 0


Sending request: DESCRIBE rtsp://172.16.11.2:554/stargate RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: openRTSP (LIVE.COM Streaming Media v2005.08.26)


Received DESCRIBE response: RTSP/1.0 200 OK
CSeq: 2
Content-Type: application/sdp
Content-Length: 147


Need to read 147 extra bytes
Read 147 extra bytes: v=0
o=- 195815069095 3 IN IP4 172.16.11.2
t=0 0
a=tool:Helius RTSP Server
c=IN IP4 237.237.11.12/55
m=audio 5012 udp 33
m=video 5012 udp 33

Opened URL "rtsp://172.16.11.2:554/stargate", returning a SDP description:
v=0
o=- 195815069095 3 IN IP4 172.16.11.2
t=0 0
a=tool:Helius RTSP Server
c=IN IP4 237.237.11.12/55
m=audio 5012 udp 33
m=video 5012 udp 33

Created receiver for "audio/MP2T" subsession (client ports 5012-5013)
Created receiver for "video/MP2T" subsession (client ports 5012-5013)
Sending request: SETUP rtsp://172.16.11.2:554/stargate/ RTSP/1.0
CSeq: 3
Transport: RAW/RAW/UDP;multicast;client_port=5012-5013
User-Agent: openRTSP (LIVE.COM Streaming Media v2005.08.26)


Received SETUP response: RTSP/1.0 200 OK
Transport: RAW/RAW/UDP;multicast;port=5013
Server: MediaStream Server
Content-Length: 0
CSeq: 3
Cache-Control: no-cache
Session: 1


Setup "audio/MP2T" subsession (client ports 5012-5013)
Sending request: SETUP rtsp://172.16.11.2:554/stargate/ RTSP/1.0
CSeq: 4
Transport: RAW/RAW/UDP;multicast;client_port=5012-5013
Session: 1
User-Agent: openRTSP (LIVE.COM Streaming Media v2005.08.26)


Received SETUP response: RTSP/1.0 200 OK
Transport: RAW/RAW/UDP;multicast;port=5013
Server: MediaStream Server
Content-Length: 0
CSeq: 4
Cache-Control: no-cache
Session: 1


Setup "video/MP2T" subsession (client ports 5012-5013)
Created output file: "audio-MP2T-1"
Created output file: "video-MP2T-2"
Sending request: PLAY rtsp://172.16.11.2:554/stargate RTSP/1.0
CSeq: 5
Session: 1
Range: npt=0.000-
User-Agent: openRTSP (LIVE.COM Streaming Media v2005.08.26)


Received PLAY response: RTSP/1.0 200 OK
Server: MediaStream Server
Content-Length: 0
CSeq: 5
Cache-Control: no-cache
Session: 1


Started playing session
Receiving streamed data...
^C
C:\live\testProgs>


More information about the live-devel mailing list