[Mp4-tech] Decoding an MPEG-2 AAC stream : Help
sunx
sunx pollux.usc.edu
Wed Nov 12 06:33:40 EST 2003
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
>
>
More information about the Mp4-tech
mailing list