[Live-devel] Extracting AAC frames from an M4A-LATM stream

Ross Finlayson finlayson at live555.com
Wed May 3 14:25:43 PDT 2006

>I am trying to create a tool that receives an RTSP/RTP stream with 
>M4A-LATM payload, and decodes the audio to PCM. How do I extend the 
>openRTSP test program to achieve this?
>Specifically, where do I add the functionality that removes the LATM 
>header from each RTP payload? AAC decoder APIs work only when the 
>transport (LATM) header is removed from the top of the payload.

*Some* AAC decoders work this way, but others do not.  However, if 
you want to remove the LATM header from received AAC-LATM data, call
See the (anachronistically named file "livedotcom.cpp" - in the VLC 
<http://www.videolan.org/vlc> source code - for an example of this.

>I have looked at the Mplayer code for reference,

As noted above, I suggest looking at the VLC code instead.

Note also that apart from the above change, you don't really need to 
'extend' "openRTSP".  Instead, just run it with the "-a" option, and 
pipe its standard output into a separate decoder application.

	Ross Finlayson
	Live Networks, Inc. (LIVE555.COM)

More information about the live-devel mailing list