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

S Mathur yetanotherid at gmail.com
Wed May 10 11:11:12 PDT 2006


Hi Ross,

Thanks for pointing out omitLATMDataLengthField(), it works beautifully.

I now want to write my own application using the live555 library framework
that does the following:
- Capture an MP4A (generic or LATM) audio RTSP/RTP stream
- Decode each frame to a PCM frame
- Re-encode PCM to lower-bitrate AAC frame(s)
- Send out AAC frames using LATM to a Darwin server (RTSP announce)

Would this be the correct approach?
1) Use RTPSource class as already shown in playCommon.cpp to capture frames
2) Make "filter" derived from the FramedFilter class to decode AAC (similar
to uLawFromPCMAudioSource.cpp perhaps)
3) Make "filter" derived from the FramedFilter class to re-encode AAC
(similar to PCMFromuLawAudioSource<http://www.live555.com/liveMedia/doxygen/html/classPCMFromuLawAudioSource.html>.cpp
perhaps)
4) Use MPEG4LATMAudioRTPSink to announce a stream to a Darwin server
(similar to testMPEG4*toDarwin.cpp)

Please let me know if you see any problems/inefficiencies in the above
approach.

Thanks for your time.

Mathur

Date: Wed, 03 May 2006 14:25:43 -0700
> From: Ross Finlayson <finlayson at live555.com>
> Subject: Re: [Live-devel] Extracting AAC frames from an M4A-LATM
>         stream
> To: LIVE555 Streaming Media - development & use
>         <live-devel at ns.live555.com>
> Message-ID: <7.0.1.0.1.20060503142131.01f5fb10 at live555.com>
> Content-Type: text/plain; charset="us-ascii"; format=flowed
>
>
> >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
>          MPEG4LATMAudioRTPSource::omitLATMDataLengthField()
> 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)
>         <http://www.live555.com/>
>
>
>
> ------------------------------
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
>
> End of live-devel Digest, Vol 31, Issue 3
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20060510/f1e1b85b/attachment.html 


More information about the live-devel mailing list