Checking the type of decoders used by MPEG4 audio and video files

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Jan 29 04:10:12 PST 2013


On Tue, 2013-01-29 at 11:36 +0000, sanjay.saha at wipro.com wrote:

> How can we check whether 
> a particular MPEG4 audio file is of one of the following types: 
> a) MPEG4 AAC LC
> b) MPEG4 - HE AAC
> c) MPEG4 - AAC LTP
>
> From the log, I found that it is using the plugin MFW_GST_AAC_PLUGIN
> from which we can infer that it is using AAC decoder but cannot
> distinguish further between (a) – (c)?

It's a bit tricky. And it depends on the elements used. We don't always
signal HE-AAC properly, and sometimes it's not easily possible to detect
it either.

First thing to look out for is whether the AAC caps contain a "profile"
field. If yes, that should tell you (though it's not always correctly
detected at the demuxers, patches welcome).

In case of HE-AAC there are multiple variants. Either it's signalled
explicitly as HE-AAC v2 (via the object type in the codec data and/or
profile), or it's signalled implicitly as HE-AAC v1 (usually
recognisable by there being more than 2 bytes of codec data and the
object type in the codec data saying LC).

At least aacparse should figure out the basic variants properly here and
signal them, and ideally demuxers like qtdemux or matroskademux too. But
I'd be surprised if that is done properly yet.

 
> and MPEG4 video file is of type “MPEG4 AVC (AAC LC Assoc Audio)”?

Not sure what that means? Just that the container is mp4 with AVC video
and AAC-LC audio?

You might find the GstDiscoverer API helpful.

Cheers
 -Tim




More information about the gstreamer-devel mailing list