[Libav-user] Raw AAC decoding using only libavcodec

Carl Eugen Hoyos ceffmpeg at gmail.com
Sun Aug 28 14:34:56 EEST 2016


Hi!

2016-08-28 7:23 GMT+02:00 Christopher Snowhill <kode54 at gmail.com>:
> I help manage a project that is currently using FFmpeg as a decoder
> library, and is currently only using the libavcodec portion, using its

Could you elaborate on why you do not use libavformat?

> own parsers to handle containers, rather than importing libavformat.

Note that FFmpeg offers "parsers" that are not demuxers.

> I was wondering whether it would be necessary to use libavformat or some
> other part of the library to parse ADTS or ADIF format AAC bitstreams.

Libavcodec support decoding adts frames (it does not work for "raw"
aac as used in the subject of your email).

> The code I am looking at now currently takes what the caller has
> determined to be either ADTS or ADIF formatted AAC, and passes it
> directly to libavcodec, via avcodec_decode_audio4. I assume this is
> incorrect, as it doesn't seem to be working for these formats.

Are you using the (necessary) aac parser from libavcodec? Without it,
the decoder will not know where the aac frames start.

> What is the bare minimum to process ADTS or ADIF into something
> that can be passed to avcodec?

Looking at libavformat/aacdec.c, I'd say nothing is needed (except
parsing which is no demuxing).

Carl Eugen


More information about the Libav-user mailing list