[Live-devel] streaming video and audio via RTSP

Ross Finlayson finlayson at live555.com
Thu Jun 12 22:56:25 PDT 2008


>How do you go about streaming video and audio at the same time using
>RTSP?  I want to stream two elemental streams that I got out of a mp4
>file to VLC and have them playback just as if I was watching the
>original file.  Using the testOnDemandRTSPServer I can open the video
>stream in one instance of VLC and the audio stream in another instance
>of VLC.  How do you put the pieces together?

Using a single "ServerMediaSession", containing two 
"ServerMediaSubsession" objects - one for video; the other for audio.

Also, to ensure that the audio and video get synchronized at the 
client, you *must* give them accurate presentation times at the 
server end - and implement RTCP for each stream.  Also (and this is 
important), the presentation times *must* correspond to 'wall-clock' 
time - i.e., the time that you would get by calling "gettimeofday()".

If you do this, then the presentation times that come out the client 
end (after RTCP-synchronization) *will* be same as those that you 
gave the frames at the server end, and then the client will be able 
to use those to synchonize audio and video.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list