[FFmpeg-user] Help to understand -ac 6 behaviour encoding ProRes to MP4 EAC3

Joanna White Joanna.White at bfi.org.uk
Fri Mar 8 13:48:14 EET 2024

Good morning,

Here at the BFI National Archive I have MP4 transcode scripts which handle many different AV source files, converting them into derivative access copies, generally mapping two streams of audio to the MP4. Many source files with 5.1 and higher are failing naturally, as we don't have consistent metadata in the file to aid automation, eg mapping mixed down Lt Rt to the MP4 for example.

I'm using -ac 6 with a loudness setting to stop those files with the Left total/Right total stereo mix down included from exceeding safe audio levels for the MP4 derivative. I've not tested this loudness max addition yet, still to research (grateful for advice!).

What I'm finding though is that when using the -ac 6 flag to compress the source file into MP4 with eac3 audio codec, that each audio stream shifts from a single channel to multiple channels per stream. There is no additional audio in these extra channels so the file sounds okay (though loud due to inclusion of Lt Rt).

Source file (which does have metadata in this case):
ProRes mov with 8 audio streams encoded PCM LE signed, 1152kb/s bit rate:
#1 single channel L
#2 single channel R
#3 single channel C
#4 single channel LFE
#5 single channel Ls
#6 single channel Rs
#7 single channel Lt
#8 single channel Rr

Generated MP4 file with Enhanced AC-3, 448 kb/s bit rate:
#1 six channels  L R C LFE Ls Rs
#2 six channel L R C LFE Ls Rs
#3 six channel L R C LFE Ls Rs
#4 six channel L R C LFE Ls Rs
#5 six channel L R C LFE Ls Rs
#6 six channel L R C LFE Ls Rs
#7 six channel L R C LFE Ls Rs
#8 six channel L R C LFE Ls Rs

It appears the original audio from the ProRes maps to the second channel (shown as C, the channels ordered L C R Ls Rs LFE respectively) in each of the audio streams in the MP4.

I wondered if I was missing a flag that prevents creation of these additional channels though, or is this caused by something like bit-rate  management in FFmpeg? Possibly it's anticipated behaviour but thought I should check so I can feed back to colleagues.

Thanks so much for this excellent email list assistance, it's highly appreciated.

Kind regards,

Joanna White (she/her)
Knowledge & Collections Developer
British Film Institute

BFI National Archive
Kingshill Way, Berkhamsted HP4 3TP
joanna.white at bfi.org.uk
+44(0)7900 228888

More information about the ffmpeg-user mailing list