Live streaming with audio

Topics: Question
Oct 20, 2015 at 7:58 AM

I have an IP camera from which I would like to display a live stream of in a WPF client. It is running RTSP and the video format is H264.

Your library seems promising and the payed libraries out there tend to be very expensive, so I would really appreciate if I could get it to work with MMA.

I have already browsed the discussions and came across this thread:

It seems to be what I want to do, but as far as I can tell, there is no audio in that example, am I correct?
It is important that I am also able to display the audio with the video.

So my question is: Is it possible to make a similar example where I would also be able to output the audio in the client? If so; how would I do that?

Im really inexperienced with this, so please tell me if I am missing something.

Thank you in advance
Oct 21, 2015 at 8:01 PM
Edited Oct 21, 2015 at 8:12 PM
Audio is supported if the source stream has audio, displaying it or rather playing it is going to depend on the codec involved.

If the source data is just raw PCM you would just need to generate a WAVE header and then append the data, the result can be played with the System.Media.SoundPlayer.

Using MediaFoundation you could take other types of supported formats besides PCM.

In the future I possibly will create an example which sends pre-defined sounds from the System.Media namespace.

There is no packetization in the profile, see although again that depends on the codec.

If the codec is PCM you would just basically divide up your sound without the wave header into packets, then the resulting data on the otherside would be received and wrapped with a WAVE header, the information in the WAVE header such as playrate would come from the SDP.

There are various examples of some types which do have packetization in the RtspServer.MediaTypes folder.

That's the high level, let me know once you get some code down of your own if your still having trouble and I will help you some more from there.
Marked as answer by juliusfriedman on 10/21/2015 at 12:01 PM