[Libav-user] 7.1 audio in aac codec

Gonzalo Garramuño ggarra13 at gmail.com
Sat Aug 10 03:07:06 EEST 2019

El 9/8/19 a las 17:33, Gonzalo Garramuño escribió:
> El 9/8/19 a las 17:05, Carl Eugen Hoyos escribió:
>> Am Fr., 9. Aug. 2019 um 21:41 Uhr schrieb Gonzalo Garramuño
>> <ggarra13 at gmail.com>:
>>> I am trying to encode 7.1 audio in an aac codec in my program, but the
>>> codec only supports up to 6 channels and I get an error to that effect
>>> if I try to force it to use AV_CH_LAYOUT_7POINT1.
>> Please provide sample code, 7.1 is supposed to work fine with the
>> native aac encoder.
>> Carl Eugen
> Never mind me.  I was saving with the ac3 encoder.  Sorry for the noise.
Well, I was able to save aac 7.1 audio.  However, upon playback I get an 
information message that says:

Assuming an incorrectly encoded 7.1 channel layout instead of a 
spec-compliant 7.1(wide) layout, use -strict 1 to decode according to 
the specification instead.

I use:

avctx->std_strict_compliance = FF_COMPLIANCE_STRICT;

and it removes one of the info messages, but not all.  Anyway, it would 
be better if the messages were not produced at all.  I tried saving with 
a channel layout of AV_CH_LAYOUT_7POINT1_SIDE but it resulted in noise 
upon reproduction.

Gonzalo Garramuño

More information about the Libav-user mailing list