0

I've got a Dolby Digital (ac3) file and I'm able to extract channels one by one like this:

-map_channel 0.0.4 -channel_layout mono -sn -b:a 128k -ac 1

For example, this extracts the back left channel.

I want to make a good stereo sound from the front three channels (Front, Center, Right) without the back channels - I'm going to play those through another amp. My thoughts are copying some/all of the center channel onto the left/right channels of the stereo output?

I can't downsample 5.1 to 2 in one go because I don't want the back left/right channels to bleed into the front. I want a stereo output of the three front channels, if that helps.

This is the ac3 channel layout:

0 FRONT_LEFT
1 FRONT_RIGHT
2 FRONT_CENTER
3 LOW_FREQUENCY
4 BACK_LEFT
5 BACK_RIGHT

Help is greatly appreciated. Thank you!

  • When you come up with the process, whatever it may be, I suggest lowering volume of center channel by 6 decibels before merging into each the left and right channels. Reason: 6 decibels is half, and since you are going to be playing it through two speakers instead of one, you'll get double the output and it will overpower L/R instead of blending. – Physics-Compute Feb 23 '18 at 23:07
1

Use the pan filter:

ffmpeg -i input -filter_complex "pan=stereo|FL<FL+0.5*FC|FR<FR+0.5*FC[a]" -map 0:v? -map "[a]" -c:v copy output
  • Remove or adjust the FC multiplication factors to desired levels.

  • Using > instead of =, as shown in the example, will adjust the gain to be renormalized so that the total is 1, thus avoiding clipping noise.

  • Also see FFmpeg Wiki: Audio Channel Manipulation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.