[Live-devel] question about rtsp server
Ross Finlayson
finlayson at live.com
Tue Jun 15 10:18:35 PDT 2004
At 02:03 AM 6/15/04, you wrote:
>When I setup rtsp server by testOnDemandRTSPServer, it send mpeg1or2
>stream on audio or video subsession.I want to know if it can send mpeg1or2
>stream on only one subsession(include audio or video, not separate).Does
>live library supply this function?
Yes, RTP defines a way to stream an entire MPEG Program Stream in a single
RTP stream. See RFC 2250, section 2, and RFC 3555, section 4.2.11.
To implement this using the LIVE.COM code, you would use a
"ByteStreamFileSource" as the source. (You won't need a separate 'framer'
object, because the chunks of data that you'll be sending can be of
arbitrary size.) For the sink, you would use a "SimpleRTPSink", with a
dynamic RTP payload type (i.e., one >= 96), a RTP timestamp frequency of
90000, a sdpMediaTypeString of "video", and a rtpPayloadFormatName of "mp2p".
To use this with "testOnDemandRTSPServer", you will need to define and use
your own subclass of "FileServerMediaSubsession". (See
"MPEG2TransportFileServerMediaSubsession" for a model of how to do this.)
A warning, however: If you do this, you'll probably find that few media
players will be able to play the stream. Most RTP media players support
receiving audio and video in separate streams, but few support receiving an
entire MPEG Program Stream as a single RTP stream.
Ross Finlayson
LIVE.COM
<http://www.live.com/>
More information about the live-devel
mailing list