[Libav-user] Raw AAC decoding using only libavcodec

Christopher Snowhill kode54 at gmail.com
Sun Aug 28 20:01:03 EEST 2016



On 8/28/16 4:34 AM, Carl Eugen Hoyos wrote:
> 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?
This is part of foobar2000, and I have no idea why the current
implementation does not use libavformat. It's up to Peter, the author of
the player, to explain why. I was merely asking if there was anything
necessary to deal with it.
>
>> own parsers to handle containers, rather than importing libavformat.
> Note that FFmpeg offers "parsers" that are not demuxers.
But I do not know what switches he passes to the configure script, so I
do not know whether the parser is enabled or not.

>> 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.
I have no idea if he is using the parser. Is it more than merely
constructing AVPackets and passing them directly to the decoder?

>> 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).
If it involves more than merely hand assembling what the player knows to
be "packets" into AVPacket structures and passing them directly to
libavcodec, then he is definitely not using parsers.

> Carl Eugen
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160828/b4a34882/attachment.sig>


More information about the Libav-user mailing list