Discussion:
[Live-devel] RTSP UDP multicast Streams and RTP video and audio on the same port
Brent Hunsaker
2005-09-09 22:44:35 UTC
Permalink
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? The command I send the VLC RTSP Server are:

new channel broadcast enabled
setup channel input Cool.mpg
setup channel output #standard{access=udp,url=237.237.11.11:5011}

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?

Thanks for the help,

Brent Hunsaker
Ross Finlayson
2005-09-10 04:22:41 UTC
Permalink
Post by Brent Hunsaker
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.
Post by Brent Hunsaker
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/>
Brent Hunsaker
2005-09-13 21:51:04 UTC
Permalink
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
Post by Ross Finlayson
Post by Brent Hunsaker
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.
Post by Brent Hunsaker
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
http://lists.live.com/mailman/listinfo/live-devel
Ross Finlayson
2005-09-13 22:03:47 UTC
Permalink
Post by Brent Hunsaker
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.)


Ross Finlayson
Live Networks, Inc. (LIVE.COM)
<http://www.live.com/>
Brent Hunsaker
2005-09-13 22:35:30 UTC
Permalink
We have our own RTSP Server but we are using your live lib based RTSP
client (openRTSP and VLC).
Post by Brent Hunsaker
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
Post by Brent Hunsaker
Post by Brent Hunsaker
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.
Post by Brent Hunsaker
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
http://lists.live.com/mailman/listinfo/live-devel
Ross Finlayson
2005-09-13 22:52:56 UTC
Permalink
Post by Brent Hunsaker
We have our own RTSP Server but we are using your live lib based
RTSP client (openRTSP and VLC).
As I noted earlier, you should also be using our software for your
RTSP server (especially if you want to make use of this mailing list
Post by Brent Hunsaker
m=video 5012 udp 33
m=audio 5012 udp 33
This is wrong. Your server should just be including the "m=video"
line - *not* the "m=audio" line. (The MIME type for MPEG Transport
Streams is just "video", even though Transport Streams typically
contain data other than just video.)

(Also, the use of "udp" instead of "RTP/AVP" is, strictly-speaking,
non-standard, although lots of people use this for sending MPEG
Transport Stream over raw-UDP.)


Ross Finlayson
Live Networks, Inc. (LIVE.COM)
<http://www.live.com/>

Keith Gurganus
2005-09-13 21:35:07 UTC
Permalink
Hi All,

I have a question about 'Pausing' a rtsp stream with TCP. Currently I
disable calling the BasicTaskScheduler. However, after a lapse time if I
enable it again, I get past buffered tcp frames. How can I flush buffers so
that I begin getting the current sent data? Or is there a better way of
handling a pause?

Thanks,

- Keith
Ross Finlayson
2005-09-13 21:55:22 UTC
Permalink
Post by Keith Gurganus
I have a question about 'Pausing' a rtsp stream with TCP.
Can you explain this a bit more? Are you referring to (i)
implementing the RTSP "PAUSE" command in a RTSP client; (ii)
implementing the RTSP "PAUSE" command in a RTSP server, if the RTP
stream is being sent via UDP (the normal case); or (iii) implementing
the RTSP "PAUSE" command in a RTSP server, if the RTP stream is being
sent via TCP (i.e., over the RTSP TCP connection)?

If you're talking about (i), then the "RTSPClient" class already has
a "pauseMediaSession()" operation.

If you're talking about (ii), then the RTSP server implementation
already implements "PAUSE" on unicast streams (using
"OnDemandServerMediaSubsession"). However, to use this, your input
source class (a subclass of "FramedSource") will need to implement
the virtual function "doStopGettingFrames()".

If you're talking about (iii), then it currently can't be done. (For
RTP-over-TCP, once the "RTPSource" object starts reading from the TCP
connection, the TCP connection can then no longer be used for RTSP commands.)


Ross Finlayson
Live Networks, Inc. (LIVE.COM)
<http://www.live.com/>
Luca Piccarreta
2005-09-13 22:34:18 UTC
Permalink
Hi Keith,
I did what you say and it's working fine.
Flushing the caches is not implemented in OpenRTSP, so you should add
some code, (possibly in the PlayMediaSession code).
I hacked somehow the RTPSource code adding a virtual Flush()
function.
Than you might try to read, still in the PlayMediaSession code,
the RTPInfo data, in order to tell the reordering buffer to ignore
packets before the resync point (fNextExpected packet or something like
that).
Actually this latter operation is strictly needed only for UDP
streaming, and from my experience, Darwin Streaming Server,
at least, does not need RTPInfo handling (if you think
a little bit about it, it's reasonable, it's just one single channel
multiplexed).
Apart for some missing features I think that you can obtain a
fairly good player by using OpenRTSP.
(Last point... you might be better off working with crude RTP
timestamps).
Happy coding.
Luca.

P.S. I just read Ross's answer, and if I'm not wrong stream packets received
while looking for a command answer are correctly discarded (there is some
code that when a '$' is found just reads the packet and skips it).

----- Original Message -----
From: "Keith Gurganus" <***@650dialup.com>
To: "LIVE.COM Streaming Media - development & use" <live-***@ns.live.com>
Sent: Tuesday, September 13, 2005 11:35 PM
Subject: [Live-devel] Pausing an rtsp stream with TCP
Post by Keith Gurganus
Hi All,
I have a question about 'Pausing' a rtsp stream with TCP. Currently I
disable calling the BasicTaskScheduler. However, after a lapse time if I
enable it again, I get past buffered tcp frames. How can I flush buffers so
that I begin getting the current sent data? Or is there a better way of
handling a pause?
Thanks,
- Keith
_______________________________________________
live-devel mailing list
http://lists.live.com/mailman/listinfo/live-devel
Continue reading on narkive:
Search results for '[Live-devel] RTSP UDP multicast Streams and RTP video and audio on the same port' (Questions and Answers)
5
replies
what is the disdvantages of tcp/ip protocol?
started 2006-06-06 04:55:57 UTC
singles & dating
Loading...