[Live-devel] About RTSP Url
Ross Finlayson
finlayson at live555.com
Tue Dec 6 09:50:57 PST 2005
>I'm new with live media!
>I have made a piece of software that stream 4 lives video sources,
>from a MPEG4 encoder card, using unicast RTSP portocol.
>It's work fine, but I would like set my RTSP URL like this :
> *
> <rtsp://x.x.x.x:8554/streamer/camera0>rtsp://x.x.x.x:8554/streamer/camera0
> for having both sound and video from camera 0,
> *
> <rtsp://x.x.x.x:8554/streamer/camera0/video>rtsp://x.x.x.x:8554/streamer/camera0/video
> for having only the video from camera 0,
> * and
> <rtsp://x.x.x.x:8554/streamer/camera0/audio>rtsp://x.x.x.x:8554/streamer/camera0/audio
> for having sound only.
>but actually I just can set up only this url :
><rtsp://x.x.x.x:8554/camera0>rtsp://x.x.x.x:8554/camera0 wich
>contains both sound and video.
>
>Must I make a new RTSPServer, or something like this?
No, just use a single "RTSPServer", but add to it three different
"ServerMediaSession" objects, one for each of the three streams that
you want to support. See "testProgs/testOnDemandRTSPServer.cpp" for
an example of this.
Note that the RTSPServer implementation treats the "streamName"
parameter as being an opaque string, so it's OK to have it include
"/" characters - e.g., "streamer/camera0/video".
Note also that you will need to add *new* "ServerMediaSubsession"
objects to each "ServerMediaSession" object. So, for example, the
audio "ServerMediaSubsession" object that you add to your
'audio-only' "ServerMediaSession" will be different from the audio
"ServerMediaSubsession" object that you add to your'audio+video'
"ServerMediaSession". (Ditto for video.) Because you're streaming
from a live source, you will need to change the "reuseFirstSource"
variable to "True" (see "testProgs/testOnDemandRTSPServer.cpp").
Ross Finlayson
Live Networks, Inc. (LIVE555.COM)
<http://www.live555.com/>
More information about the live-devel
mailing list