[Live-devel] Add an audio sub-session makes the video stop
Ross Finlayson
finlayson at live555.com
Tue Dec 13 05:53:31 PST 2011
> I am trying to modify an existing RTSP server based on live555. It streams live video without problems, and I have to add live audio sub-streams for each video streams.
>
> As a first step, I wanted to stream an MP3 file, so I created an audio source class based on the "DeviceSource" template.
Before you do this, you should first just add a "MP3AudioFileServerMediaSubsession" with the MP3 file - just to make sure that this (an audio subsession with data coming from a file) works OK for you.
> Every time the doGetNextFrame() function is called, I read 10000 bytes from the file and update the data members of the class accordingly, and then call the static FramedSource::afterGetting() method.
> I normally connected the output of my class to an "MPEG1or2AudioStreamFramer" by calling
> CMySource* src = CMySource::createNew(...)
> MPEG1or2AudioStreamFramer::createNew(envir(), src)
>
> In the existing code, there is also a class based on OnDemandServerMediaSubsession, let's call it CMySubsession. It implements:
> - createNewStreamSource(): which returns a MPEG1or2AudioStreamFramer* created as above
> - createNewRTPSink(): which returns an MPEG1or2AudioRTPSink
>
> Now, if I don't add the audio sub-session, the video plays fine with VLC. If I add the audio substream, the destination address in the "groupsock" for the video stream stays at 0.0.0.0, and thus nothing is sent. I also noticed on the VLC side that no SDP is sent and the server closes the RTSP TCP connection after about 10 seconds.
That's strange. Before using VLC, I suggest using "openRTSP" as a client. That should give you a little more information about where things are going wrong.
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/20111213/930f83d6/attachment-0001.html>
More information about the live-devel
mailing list