[FFmpeg-devel] [PATCH] DVB LATM parser

David DeHaven dave
Thu Feb 12 18:11:58 CET 2009

On Feb 11, 2009, at 10:02 PM, Paul Kendall wrote:
> On Thursday 12 February 2009 00:53:21 Jai Menon wrote:
>> On Sun, Feb 1, 2009 at 4:37 AM, Paul Kendall <paul at kcbbs.gen.nz>  
>> wrote:
>>> Micheal,
>>> Sorry for the long delay in this! Been really busy with other  
>>> things.
>>> Now there is a bit of noise on the MythTV lists about this so I  
>>> thought
>>> it time that I get back to it.
>>> On Thursday 18 September 2008 06:24:48 Michael Niedermayer wrote:
>>>> Hi
>>>> On Wed, Sep 17, 2008 at 04:57:46PM +1200, Paul Kendall wrote:
>>>>> On Wednesday 17 September 2008 12:51:18 Michael Niedermayer wrote:
>>>>>> On Fri, Jul 04, 2008 at 09:28:37AM +1200, Paul Kendall wrote:
>>>>>>> On Thursday 03 July 2008 22:16:56 Paul Kendall wrote:
>>>>>>>> Hi attached is a patch that provides a AAC LATM parser
>>>>>>>> CODEC_ID_AAC_LATM I have been working on. The libfaad decoder  
>>>>>>>> is
>>>>>>>> also patched to provide another codec the decoding for this
>>>>>>>> codec id. There are minor patches to mpeg.c & mpegts.c to send
>>>>>>>> stream id 0x11 to this codec id.
>>>>>>>> With this patch I can get audio working perfectly for NZ DVB-T
>>>>>>>> using the stock unpatched libfaad2 library.
>>>>>>>> I would welcome comments and suggestions so this can be  
>>>>>>>> included
>>>>>>>> in the ffmpeg codebase.
>>>>>>>> Cheers,
>>>>>>>> Paul Kendall
>>>>>>> Doh!
>>>>>>> I missed a vital part of the patch! Putting the codec in the
>>>>>>> allcodecs.c file! Heres a modified patch.
>>>>>> I think a parser is not the correct place to remove the LATM  
>>>>>> stuff.
>>>>>> A parser should only split things into frames and extract
>>>>>> information, not remove information.
>>>>>> This for example is important if one wants to preserve the LATM  
>>>>>> and
>>>>>> mux it into another container.
>>>>>> LATM could be removed in a bitstream filter ....
>>>>> Ok, I can look into this. Is there any docs on this.
>>>> well ... the source code :)
>>>> but you can ask questions here if you have any, also keep in mind  
>>>> if the
>>>> bitstream filter API has any problems it could be changed ...
>>>> Also note that a LATM parser or some changes to the AAC parser  
>>>> might
>>>> still be required even with a bitstream filter, otherwise the AAC  
>>>> parser
>>>> will likely be confused by the LATM stuff ...
>>> The parser needs to be modified to handle the LATM wrapping and  
>>> packetize
>>> the stream. Should the parser also set the extradata so the  
>>> decoder can
>>> use that to set the channels, sample rate & sample size? or should  
>>> this
>>> be left to the bitstream filter?
>>> The bitstream filter should just check the LATM wrapping and  
>>> remove if
>>> present.
>>> The decoder then gets raw AAC data and all the parameters have  
>>> been set
>>> by the parser and so it should all work fine.
>>> Is that the plan?
>> Hi Paul, Is there any update on this? the approach sounds about right
> I was waiting to hear back from one of the devs as whether this is  
> the right
> approach. I am keen to get this sorted ASAP as it is necessary for  
> DVB-T here
> in NZ.

Well, a slightly different (?) version works for streams from Norway  
too. I tried this one from the Handbrake project:

One issue I'm seeing is it's reporting a negative bitrate. I don't  
have much material to test with though.


More information about the ffmpeg-devel mailing list