This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] I need your personal help.
#1
It's not about hybrid encoders.

Please do me a favor because you are talented.

sox remix conversion please

eac3to code: ffmpeg
7.1 to 5.1
-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]"


5.1 to stereo
-filter_complex "pan=stereo|FL=.3694FL+.2612FC+.3694BL+0.0LFE|FR=.3694FR+.2612FC+.3694BR+0.0LFE"


7.1 to stereo
-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, pan=stereo|FL=.3694FL+.2612FC+.3694BL+0.0LFE|FR=.3694FR+.2612FC+.3694BR+0.0LFE [a]" -map "[a]"
Reply
#2
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:
asplit [f][s]
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
[r][d] amerge [a]
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. Smile
My guess your best bet is to simply ask tebasuna51 over at doom9s.
tebasuna51 probably knows how to translate that into sox syntax. Wink (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
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
I'll be waiting. Thank you.
The ffmpeg downmix sounds louder and better.
Reply
#4
Quote:The ffmpeg downmix sounds louder and better.
Which ffmpeg downmix? Be precise.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#5
(22.10.2020, 18:09)Selur Wrote:
Quote:The ffmpeg downmix sounds louder and better.
Which ffmpeg downmix? Be precise.

eac3to gui UsEac3to ffmpeg code
If you run it with foobar 2000 the ffmpeg filter will definitely sound louder than the hybrid sox
So I wanted to convert it to a sox.
If you run it with the spek utility, it is more abundant.
Reply
#6
That did not answer my question.
Specify:
a. what ffmpeg call you use (the whole call)
b. what sox call you use (the whole call)
otherwise it is not clear what you do.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#7
Sample and script:
https://www110.zippyshare.com/v/l6Nuv9Xe/file.html
Reply
#8
I asked for two command lines not more and I get a link to some downloads.
If you can't post two command lines, don't expect me to spend my time on this.
Keep it simple.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#9
-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]"
can be done with multiple sox calls:
sox 8c341.wav front.wav remix 1 2 3 4
sox 8c341.wav surr.wav remix -m 5v0.5,7v0.5 6v0.5,8v0.5 compand 0.1,0.1 -90,-84,-16,-10,-0.1,-3 0.0 -90 0.0
sox --combine merge front.wav surr.wav down51.wav
see: https://forum.doom9.org/showthread.php?p...ost1926689

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)