Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADTS aac is not recognized #182

Closed
bahusoid opened this issue Oct 27, 2023 · 2 comments · Fixed by #197
Closed

ADTS aac is not recognized #182

bahusoid opened this issue Oct 27, 2023 · 2 comments · Fixed by #197

Comments

@bahusoid
Copy link
Contributor

bahusoid commented Oct 27, 2023

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
Copy link

luzpaz commented Nov 20, 2023

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

@bahusoid
Copy link
Contributor Author

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:

faad2/libfaad/decoder.c

Lines 329 to 331 in 677918d

/* Check if an ADTS header is present */
} else if (faad_showbits(&ld, 12) == 0xfff) {
hDecoder->adts_header_present = 1;

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants