[FFmpeg-user] AC-3 encoding questions

Thomas Worth dev at rarevision.com
Tue Nov 1 16:53:40 CET 2011

I'm trying to encode some 6 channel, 24-bit WAV files, but am getting
some warnings from FFmpeg:

[ac3 @ 0x101920200] channel_layout not specified

Ok, now I've used -channel_layout XXX, but I don't know where these
layouts are documented. I've tried all the way up to 120, and get
stuff like this:

Stream #0:0: Audio: ac3, 48000 Hz, 6 channels (LFE|BL|BR|FLC), flt, 320 kb/s

I assume the "LFE|BL|BR|FLC" refers to how each channel will be
mapped, but I've not been able to find exactly what I want, which is


Assuming "BL" and "BR" mean "Back Left" and "Back Right." If so, this
isn't really the correct terminology. It should be "Right Surround"
and "Left Surround."

The standard 5.1 channel layout is this:

1. Left
2. Right
3. Center
4. LFE
5. Left Surround
6. Right Surround

That's how the channels are specified in the WAV file. I hope that if
FFmpeg can't determine the channel layout, it just encodes each
channel in the same order as they are in the WAV.

Also, the duration of the AC-3 file is slightly different from the
original WAV. With long projects, this can introduce audio drift. Is
there anything I can do to avoid this?

More information about the ffmpeg-user mailing list