[Live-devel] Adding Audio Stream Session

Ross Finlayson finlayson at live555.com
Tue Mar 5 07:11:35 PST 2013


> Been using Live555 for Video streaming on multiple platforms, used on Linux, iOS and now ported to WinCE7. Video streaming works like a charm.
> Now I want to add the audio stream in the media session. As a test I want stream a mp3 file with video stream (H.264 video data generated by a encoder source).
> I am assuming to use MP3AudioFileServerMediaSubsession as audio subsession

No, because that class - being a subclass of "OnDemandServerMediaSubsession" - is used only for *unicast* streaming, and you are instead doing *multicast* streaming.

Instead, you should be using the code from the "testMP3Streamer" demo application as a model.  Therefore, you should be adding - to the "RTSPServer" object - another "PassiveServerMediaSubsession".  You *must*, however, use different port numbers (for RTP and RTCP), different "Groupsock" objects, and, of course, a different "RTPSink" (subclass) object (it should be a "MPEG1or2AudioRTPSink").  As with your video stream, you will call "startPlaying()" on this "MPEG1or2AudioRTPSink" object, before entering the event loop.

You can, however, use the same IP multicast address - i.e., "destinationAddress" - for both video and audio, but you must use a different port number pair (RTP,RTCP) for audio.

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130306/5ed4a33a/attachment.html>


More information about the live-devel mailing list