View Single Post
Old 18th January 2020, 11:56   #3  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,914
Quote:
Originally Posted by Sparktank View Post
Yeah, it will downmix properly, according to standards. Remember the standards omit the LFE channel.
https://trac.ffmpeg.org/wiki/AudioCh...ion#a5.1stereo
It is not exact. The standards showed in section 7.8 of .pdf related in ffmpeg docs are:

For a standard mix:
Quote:
Prior to the scaling needed to prevent overflow, the general 3/2 downmix equations for an LoRo stereo signal are
Lo = 1.0 * L + clev * C + slev * Ls ;
Ro = 1.0 * R + clev * C + slev * Rs ;
or for a DPL mix:
Quote:
Prior to the scaling needed to prevent overflow, the 3/2 downmix equations for an LtRt stereo signal are
Lt = 1.0 * L + 0.707 * C – 0.707 * Ls – 0.707 * Rs ;
Rt = 1.0 * R + 0.707 * C + 0.707 * Ls + 0.707 * Rs ;
But ffmpeg do:
Quote:
L = 0.4142 * L + 0.2929 * C + 0.2929 * Ls
R = 0.4142 * R + 0.2929 * C + 0.2929 * Rs
From a un-normalized mix of:
Quote:
L = 1.0 * L + 0.707 * C + 0.707 * Ls
R = 1.0 * R + 0.707 * C + 0.707 * Rs
Is a standard mix (not DPL) but ignoring the 'clev' and 'slev' parameters included in AC3 headers.

clev can be:
0.707 (my recommendation when encode: -center_mixlev 0.707)
0.595 (the default when encode with ffmpeg)
0.500 (never recommended)

slev can be:
0.707 (not recommended)
0.500 (the default and recommended with ffmpeg)

My recommended un-normalizad mix standard is:
Quote:
L = 1.0 * L + 0.707 * C + 0.500 * Ls
R = 1.0 * R + 0.707 * C + 0.500 * Rs
and normalized:
Quote:
L = 0.453 * L + 0.320 * C + 0.227 * Ls
R = 0.453 * R + 0.320 * C + 0.227 * Rs
But for users than experiment low dialog volume we can modify the coeficients.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 19th January 2020 at 13:10. Reason: typo
tebasuna51 is offline   Reply With Quote