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.


Go Back   Doom9's Forum > General > Audio encoding

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 15th July 2020, 01:02   #1  |  Link
tebasuna51's Avatar
Join Date: Feb 2005
Location: Spain
Posts: 6,130
ffmpeg downmix 7.1 -> 5.1

The simple way to do the downmix 7.1 -> 5.1 is:

ffmpeg -i INPUT71 -af "pan=5.1(side)|FL=FL|FR=FR|FC=FC|LFE=LFE|SL=0.5*BL+0.5*SL|SR=0.5*BR+0.5*SR" OUT51.wav
But I want preserve the volume balance between front and surround channels, like BeHappy/MeGUI can do in AviSynth, with a controlled gain by 2 without clip.

Then I make a separated chain for the surround channels with:

ffmpeg -i INPUT71 -filter_complex "asplit [f][s]; \
 [f] pan=4c|c0=c0|c1=c1|c2=c2|c3=c3 [r];  \
 [s] pan=2c|c0=0.5*c4+0.5*c6|c1=0.5*c5+0.5*c7, \
 acontrast=2, aformat=sample_fmts=s16:channel_layouts=stereo [d]; \
 [r][d] amerge=inputs=2,pan=5.1(side) [a]" -map "[a]" OUT51.wav
I tried other functions like 'compand' instead 'acontrast', other formats in 'aformat', 'join' instead 'amerge', ... and always obtain errors in formats, channels layouts, ...

Only the previous command work without errors, the output wav have the format, length, ... correct, but is empty. I only obtain silence.

Please, there are some ffmpeg guru than can help me.
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 15th July 2020 at 01:26. Reason: typo
tebasuna51 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 22:01.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.