[Mp4-tech] Decoding an MPEG-2 AAC stream : Help
ramesh raman
ramesh.r analog.com
Wed Nov 12 20:35:13 EST 2003
Hi,
Thanks for the quick response. But i dont understand.
My problem is i have an MPEG2-ADTS stream. It is an AAC stream. I want
to decode this using the MPEG-4.
Also, i get the same error, when i use other MPEG2-AAC streams (from the
MPEG-2 conformance CD ). I tried to decode the L7....aac and M6_48k.aac
test vectors belonging to the Low complexity and main profiles
respectively.
I wonder if the MPEG-4 Decoder looks for some particular header ? is
this what you meant by the system file ?
Is it that i need to put this "raw" MPEG-2 stream into another stream
with a "Mpeg-4 system" header ?
If so, where do i get the format of that system header from ? Is there
already any program to do that encapsulation that comes with the
reference s/w ?
Thanks in advance
regards
/ramesh
sunx wrote:
>The .mp4 should be MPEG-4 System file. You need a MPEG-4 Demux to extract
>the AAC stream first.
>
>On Wed, 12 Nov 2003, ramesh raman wrote:
>
>
>
>> Hi all,
>>
>>I am new to MPEG-4. I downloaded the public distribution code and i
>>have compiled the MPEG-4 Decoder code on Linux.
>>I try to run it with the following options :
>>
>>./mp4audec test.mp4 -o test.raw
>> test.mp4 is an MPEG-2 AAC
>>ADTS stream (which decodes correctly on a MPEG-2 AAC decoder) present in
>>local dir.
>>
>>When i run the program, i get the following error,
>>mp4audec: WARNING: error decoding audio file test.mp4
>>
>>Could anybody please tell me what options i need to set to decode an
>>MPEG-2 AAC Encoded stream.
>>
>>Now, here are few things i observed while trying to step through:
>>
>>1. While stepping through the function "MP4ParseAtomUsingProtoList"
>> in the libisomedia.a library, there is a comparison of the FIRST 4
>>Bytes read from the stream with the File size. (In file MP4atoms.c :
>> exact code is as below :
>> err = MP4CreateBaseAtom( atomProto ); if ( err ) goto bail;
>>
>> /* atom size */
>> err = inputStream->read32( inputStream, &atomProto->size, NULL ); if
>>( err ) goto bail;
>> if ( atomProto->size == 0 )
>> BAILWITHERROR( MP4NoQTAtomErr )
>> if ( (atomProto->size < 0) || ((atomProto->size - 4) >
>>inputStream->available) )
>> BAILWITHERROR( MP4BadDataErr )
>>
>>the atomProto->size in my case become 0xfff94d80 and this check fails
>>here )
>>
>>2. The .mp4 file that i have doesnt contain the file size in the first 4
>>bytes (It actually contains 0xff 0xf9 0x4D 0x80 , while the file size
>>in hex is 0xB637CB bytes)
>>
>>Can anybody please tell me if i need to give any specific options to the
>>MPEG4 decoder , so that it can decode this stream.
>>I apologize if my question has already been answered earlier.
>>
>>thanks in advance
>>regards
>>/ramesh
>>
>>
>>
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/mp4-tech/attachments/20031112/308c7a7d/attachment-0001.html
More information about the Mp4-tech
mailing list