Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
|
![]() |
#1 | Link |
None
Join Date: Jul 2007
Location: The Background
Posts: 265
|
What formula does FFmpeg use when converting 5.1 AC3 to stereo wav?
When converting 5.1 AC3 to stereo WAV:
Code:
ffmpeg -i AC3_51.ac3 -ac 2 Stereo.wav |
![]() |
![]() |
![]() |
#3 | Link |
None
Join Date: Jul 2007
Location: The Background
Posts: 265
|
Thanks.
I'm trying to exactly replicate the "-ac 2" option with pan filter command. I've found the following via google search: Code:
ffmpeg -i AC3_51.ac3 -af "pan=stereo|FL < 1.0*FL + 0.707*FC + 0.707*BL|FR < 1.0*FR + 0.707*FC + 0.707*BR" Stereo.wav Code:
ffmpeg -i AC3_51.ac3 -af "pan=stereo|FL = 1.0*FL + 0.707*FC + 0.707*BL|FR = 1.0*FR + 0.707*FC + 0.707*BR" Stereo.wav Which of the two lines is the correct one? (note the "<" and "=" difference) |
![]() |
![]() |
![]() |
#4 | Link |
None
Join Date: Jul 2007
Location: The Background
Posts: 265
|
When downmixing 5.1 AC3 audio to stereo WAV, is the following allowed according to the Dolby downmix parameters:
1. Attenuate FL, FR, FC, SL, SR by 6 dB? 2. Attenuate FL, FR, FC by 6 dB, and attenuate SL, SR by 9 dB? Is any of the above in accordance with Dolby standards? |
![]() |
![]() |
![]() |
#5 | Link |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,435
|
Nope. The allowed values are included in BSI metadata and can be:
Center Mix Level: 0.707 (–3.0 dB), or 0.595 (–4.5 dB) or 0.500 (–6.0 dB) Surround Mix Level: 0.707 (–3 dB) or 0.500 (–6 dB) Front Levels can't be attenuated unless you do a Normalize over all channels. Then Front levels must be always from 3 to 6 dB over the Center and Surround levels.
__________________
BeHappy, AviSynth audio transcoder. |
![]() |
![]() |
![]() |
#6 | Link | |
None
Join Date: Jul 2007
Location: The Background
Posts: 265
|
Quote:
For example, the Center: -3 dB or -4.5 dB, but the Surround channels: -6 dB? |
|
![]() |
![]() |
![]() |
#7 | Link | |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,435
|
Quote:
But, of course, is a user selection and can vary with the movie.
__________________
BeHappy, AviSynth audio transcoder. |
|
![]() |
![]() |
![]() |
#8 | Link | |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,435
|
From ffmpeg docs:
Quote:
-af "pan=stereo|FL = 1.0*FL + 0.707*FC + 0.707*SL|FR = 1.0*FR + 0.707*FC + 0.707*SR" FL' = FL + 0.7xFC + 0.7xSL FR' = FR + 0.7xFC + 0.7xSR The < option: -af "pan=stereo|FL < 1.0*FL + 0.707*FC + 0.707*SL|FR < 1.0*FR + 0.707*FC + 0.707*SR" Is equivalent to: FL' = 0.414xFL + 0.293xFC + 0.293xSL FR' = 0.414xFR + 0.293xFC + 0.293xSR This avoid clipping noise(sum of coeficients = 1) but you can finish with low volume. Note the SL,SR channels instead BL,BR in your samples. By default the surround channels are SL,SR (Side not Back, default longtime ago). The canonical downmix is: FL' = FL + 0.7xFC + SL FR' = FR + 0.7xFC + SR the ffmpeg default downmix lose surround volume Normalized (sum of coeficients = 1): FL' = 0.37xFL + 0.26xFC + 0.37xSL FR' = 0.37xFR + 0.26xFC + 0.37xSR To do a correct normalization, with the max volume without clip, you need do 2 pass (like AviSynth do).
__________________
BeHappy, AviSynth audio transcoder. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|