0

I am trying to receive an rtsp audio stream via live555 lib from local network and write it to a wav file. Therefore I wrote an data sink class derived from MediaSink class, like done in the example 'testRTSPClient'. The connection is successfully established, but I don't know how to decode the data.

The format is 'L16', which should be uncompressed pcm data. I noticed that I can get details for writing my wav header from sdp description (2 channels, 44100 frequeny,...).

But which format has the data? How can I get my two channel data for writing to my wav file? With each iteration I receive a buffer of type uchar* with size 1400, which should be passed to a decoder.

Does someone has an idea about that?

ThomasDE
  • 3
  • 4
  • In many cases RTP is uncompressed. You need to use the sdp to get all info you need. In your case [see here](http://tools.ietf.org/html/rfc3551#page-27). You do not need to decode L16 data as it is uncompressed. Create a suitable wav header and write the data to a file. Or dump the raw data. Audacity for example can play raw pcm samples. – mkaes Mar 01 '16 at 13:03
  • That was very helpful for my understanding. Thanks very much! – ThomasDE Apr 25 '16 at 08:59

0 Answers0