What's really confusing is that you use named channels when you use '5.1 to stereo' and for the other conversions you use the channel indexes.
Let's start with your "5.1 to stereo" down-mix:
-filter_complex "pan=stereo|FL=.3694FL+.2612FC+.3694BL+0.0LFE|FR=.3694FR+.2612FC+.3694BR+0.0LFE"
this is the same as Hybrids 'toStereo' down mix:
- toStereo: "1v0.3694,3v0.2612,5v0.3694 2v0.3694,3v0.2612,6v0.3694"
- toStereo (dpl): "1v0.3205,3v0.2265,4v0.2265,5v0.2265 2v0.3205,3v0.2265,4v-0.2265,6v-0.2265"
- toStereo (dpl2): "1v0.3254,3v0.2301,5v0.2818,6v0.1627 2v0.3254,3v0.2301,5v-0.1627,6v-0.2818"
- toStereo (lfe): "1v0.2929,3v0.2071,4v0.2071,5v0.2929 2v0.2929,3v0.2071,4v0.2071,6v0.2929"
- toStereo (dpllfe): "1v0.2613,3v0.1847,4v0.1847,5v0.1847,6v0.1847 2v0.2613,3v0.1847,4v0.1847,5v-0.1847,6v-0.1847"
- toStereo (dpl2lfe): 1v0.2646,3v0.1870,4v0.1870,5v0.2291,6v0.1323 2v0.2646,3v0.1870,4v0.1870,5v-0.1323,6v-0.2291"
The "pan=xy" mappings map basically directly to the 'remix -m' in sox, main difference is that in sox channels start with 1 and ffmpeg in channels start with 0, so when converting from ffmpeg to sox you need to increase the channel number. (see: "remix [−a|−m|−p] <out-spec>" in
http://sox.sourceforge.net/sox.html)
-> The sox command line call part would be:
remix -m 1v0.3694,3v0.2612,5v0.3694 2v0.3694,3v0.2612,6v0.3694
I'm ignoring '7.1 to stereo' since you made a copy&paste-error and posted the '7.1 to 5.1' again under a different name.
Since I have never really used ffmpegs for downmixing the first thing I try is to understand what your '7.1 to 5.1' down-mix does:
-filter_complex "asplit [f][s]; [f] pan=3.1|c0=c0|c1=c1|c2=c2|c3=c3 [r]; [s] pan=stereo|c0=0.5*c4+0.5*c6|c1=0.5*c5+0.5*c7, compand=attacks=0:decays=0:points=-90/-84|-10/-4|-6/-2|-0/-0.3, aformat=channel_layouts=stereo [d]; [r][d] amerge [a]" -map "[a]"
by splitting the filter_complex it in it's parts:
copies the input channels into two variables 'f' and 's'
[f] pan=3.1|c0=c0|c1=c1|c2=c2|c3=c3 [r]
takes the first four channels and asings them to 'r'
[s] pan=stereo|c0=0.5*c4+0.5*c6|c1=0.5*c5+0.5*c7, compand=attacks=0:decays=0:points=-90/-84|-10/-4|-6/-2|-0/-0.3, aformat=channel_layouts=stereo [d]
create a stereo by first mixing the last 4 channels (channel0=0.5*c4+0.5*c6 and channel1=0.5*c5+0.5*c7) and then applying some dynamic range compression
appends [r] and [d] to get six channels.
Ignoring the dynamic range compression what is done is copy the first 4 channels and mix the last 4 into two channels and merge them.
In sox syntax the above is:
remix -m 1v1 2v1 3v1 4v1 5v0.5,7v0.6 4v0.5,8v0.5
So far so good.
Looking at the
http://sox.sourceforge.net/sox.html and comparing the 'compand attack1,decay1{,attack2,decay2}' syntax with the ffmpeg syntax (
https://www.ffmpeg.org/ffmpeg-all.html#compand) I have no clue how to properly translate this. (Never really did need compand that much in ffmpeg or sox to spend time understanding it.)
-> if you figure out the proper translations for the compand part, let me know I might add them to Hybrid.
My guess your best bet is to simply ask tebasuna51 over at
doom9s.
tebasuna51 probably knows how to translate that into sox syntax.
(I posted there and ask him whether he could translate this to sox.)
As a side note: Hybrid does '7.1 to Stereo' using:
remix -m 1v0.243804,7v0.062798,3v0.172392,6v0.044404,8v0.044404,5v0.432198 2v0.243804,7v0.062798,3v0.172392,5v0.044404,8v0.044404,6v0.432198
just in case you want to try it.
Cu Selur