knik0 / faad2

Freeware Advanced Audio (AAC) Decoder faad2 mirror
https://sourceforge.net/projects/faac/
Other
175 stars 78 forks source link

ADTS aac is not recognized #182

Closed bahusoid closed 11 months ago

bahusoid commented 1 year ago

See file: https://mega.nz/file/RDxCXIhT#9a2VjfgJc5zgDN8Relv5AXu0zynx_VMfsGuq_qT6W2k

Output from faad V2.10.1: adts.aac file info: RAW

MediaInfo gives the following details: General Complete name : adts.aac Format : ADTS Format/Info : Audio Data Transport Stream File size : 7.33 MiB Overall bit rate mode : Variable Track name : Dusty Road Performer : Oi Va Voi Genre : Eclectic

Audio Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Format version : Version 4 Codec ID : 2 Bit rate mode : Variable Channel(s) : 2 channels Channel layout : L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 SPF) Compression mode : Lossy Stream size : 7.32 MiB (100%)

luzpaz commented 1 year ago

JIC the mega link expires. I've added the file to the ticket directly
182.zip

bahusoid commented 11 months ago

Looking at MediaInfo source code I see that they try to find adts header in buffer (see BufferOffset is increased if header is not found on current position): https://github.com/MediaArea/MediaInfoLib/blob/master/Source/MediaInfo/Audio/File_Aac.cpp#L437-L439

And libfaad fails immediately if header is not found: https://github.com/knik0/faad2/blob/677918df32c3a98db9ac448267a2c5bc9ce449ad/libfaad/decoder.c#L329-L331

I checked provided file and indeed adts header is present after 501 bytes after expected position.