Matroska AAC support

What features would you like to see in future versions of getID3() ?
Post Reply
soulhunter
getID3() v1 developer
Posts: 40
Joined: Mon Jan 11, 2010 5:37 pm
Are you a spambot?: no
Location: Kaliningrad, Russia
Contact:

Matroska AAC support

Post by soulhunter » Fri Feb 18, 2011 10:15 am

I'm starting this topic now in case this functionality needs discussion and, possibly, problem solving.
Lack of AAC support is the only major functionality missing in Matroska module since there are many matroska files with aac encoded audio streams (25-30% of all according to my database statistics).
Why is it still not implemented, are there any problems with it?

Of course there are enough changes for 1.8.5 already, but I would be very glad to see this in nearest future versions.

Pernod
getID3() contributor
Posts: 103
Joined: Sat Mar 21, 2009 5:30 pm
Are you a spambot?: no
Location: London, UK
Contact:

Re: Matroska AAC support

Post by Pernod » Fri Feb 18, 2011 12:37 pm

I've just tested a small sample mkv containing AAC and H.264 and the audio codec was correctly identified as aac with 2 channels.

James Heinrich
getID3() v1 developer
Posts: 1471
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Matroska AAC support

Post by James Heinrich » Fri Feb 18, 2011 4:11 pm

It's not implemented because I can't figure out how the AAC data is sitting in the file. Looking at the data offsets in the mkv files where the AAC audio starts, it doesn't look like either ADIF or ADTS.

To clarify, I'm parsing all the Matroska data, so you should still get a decent amount of information (channels, samplerate, etc). But one key thing that the Matroska container does not specify is the bitrate of the channels, which is why I need to parse the actual audio data. Once I have the audio bitrate(s), I can figure out the video bitrate. If I'm unable to parse the audio data, then you're missing audio bitrate(s) and video bitrate, but the overall bitrate is still known.

Maybe I'll take another crack at it in the near future, the Matroska docs seem a little fuller than last time I looked, so maybe there's hope :)

soulhunter
getID3() v1 developer
Posts: 40
Joined: Mon Jan 11, 2010 5:37 pm
Are you a spambot?: no
Location: Kaliningrad, Russia
Contact:

Re: Matroska AAC support

Post by soulhunter » Fri Feb 18, 2011 8:40 pm

Thats what I need very much - audio bitrate.

James Heinrich
getID3() v1 developer
Posts: 1471
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Matroska AAC support

Post by James Heinrich » Wed Mar 02, 2011 2:22 pm

Unfortunately it's not looking good. I see things like this, which don't encourage me:
The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied.
getID3 doesn't do any actual audio bitstream parsing for AAC, only reading headers, but it seems that to get audio bitrate you need to parse the whole file's audio stream. Even MediaInfo had the same complaint/problem. They seem to have overcome (partially) it in 2010, and have some AAC support now, but only when some "AudioSpecificConfig" data is present, which is a newer (optional) part of the Matroska spec. Older encoders won't have put it there, so that doesn't help in all cases, but if I can find out where that data is hiding, hopefully I can get info from some files.

I haven't completely given up, but I'm somewhat stuck (still).

Post Reply