[Live-devel] OpenRTSP w/ Axis 207 series cameras: AAC issue

Eric Lammerts live-devel at lists.lammerts.org
Sat Feb 7 12:11:52 PST 2009


>> I am experimenting with receiving streamed data from Axis 207W 
>> cameras using (a modified version of) the openRTSP utility, and is 
>> confronted with the following issue. When I use the -q option to 
>> receive a quicktime file, I can later use the ffmpeg avcodec 
>> libraries to read packets and decode the audio and video streams. 
>> However, when I just save the raw streamed data into separate video 
>> and audio elementary streams, I cannot decode the AAC audio stream 
>> anymore.
> 
> The output file contains raw AAC audio data - the exact same data 
> that was sent within the RTP packets.  There is nothing wrong with 
> this data, and audio decoders can be used to decode it as it arrives 
> (note, for example, VLC, which does this).

I had the same problem with a Vivotek camera. The SDP contains some
additional header info that you need for decoding. This info will be
saved into the quicktime file but not into the raw file.

If you know the sample frequency of the audio you could try "faad -s
<samplefreq>". Sometimes that's sufficient info to make it work.

Otherwise, get the header info with ->fmtp_config() from your audio
MediaSubsession. This gives you a hex string. When you decode with
libfaad, convert the hex string to binary and pass it as the
AudioSpecificConfig to NeAACDecInit2(). That should make it work.

Eric




More information about the live-devel mailing list