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

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th November 2022, 10:41   #41  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by tebasuna51 View Post
Of course there are downmix functions and also upmix functions.
Did you ever try to understand how good is DEE downmix function?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 8th November 2022, 12:46   #42  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
DEE ddp Downmix

7.1 -> 5.1 Something like:

FL' = 0.54*FL
FR' = 0.57*FR
FC' = 0.64*FC
LF' = 1.00*LF
SL' = 0.4*SL + 0.4*BL
SR' = 0.4*SR + 0.4*BR

7.1 -> 2.0 Something like:

FL' = 0.54*FL + 0.45*FC + 0.34*SL + 0.33*BL [1.66 clip risk]
FR' = 0.48*FR + 0.45*FC + 0.30*SR + 0.34*BR [1.57 clip risk]

5.1 -> 2.0 Something like:

FL' = 0.54*FL + 0.38*FC + 0.47*SL [1.39 clip risk]
FR' = 0.48*FR + 0.38*FC + 0.46*SR [1.32 clip risk]
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 30th November 2022, 21:34   #43  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
This triggered my curiosity - isn't feasible to use SOFA filter https://ffmpeg.org/ffmpeg-filters.html#sofalizer to downmix 7.1 (up to 9 channels) to 2 channel? Of course some synthetic SOFA file can be used if HRTF is unwanted.
pandy is offline   Reply With Quote
Old 1st December 2022, 00:46   #44  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 272
Can use headphone filter, and also afir filter in casea impulse response files are really big.
richardpl is offline   Reply With Quote
Old 4th February 2023, 17:28   #45  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by tebasuna51 View Post
1) If your input is 7.1, first do a 7.1 -> 5.1 downmix with the compand selected (see precedent posts):
-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|-8/-2|-6/-1|-0/-0.1, aformat=channel_layouts=stereo [d]; [r][d] amerge [a]" -map "[a]"
WARNING: when use these filters with a recent ffmpeg v5.1 there are a regression detected.

Use a ffmpeg v4.4 until the regression was solved.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 5th February 2023 at 21:14.
tebasuna51 is offline   Reply With Quote
Old 9th February 2023, 23:34   #46  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
The regression detected is not fixed.

I open a new one
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 11th February 2023, 16:10   #47  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Quote:
Originally Posted by tebasuna51 View Post
The regression detected is not fixed.
Confused, according to your link:
Quote:
Status: new → closed

Fixed in 93a9ee7afd7bf2e019490117f1bada30724a0200
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 12th February 2023, 12:55   #48  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
It is not fixed, now do other remix unwanted, see the image in the new one.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 19th February 2023, 22:43   #49  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Quote:
Originally Posted by tebasuna51 View Post
It is not fixed, now do other remix unwanted, see the image in the new one.
Fixed now.
Balling is offline   Reply With Quote
Old 21st February 2023, 12:39   #50  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
I test the Latest Auto-Build (2023-02-20 12:35) in https://github.com/BtbN/FFmpeg-Builds/releases
Seems work correctly now:

1) 7.1 -> 5.1 downmix with the compand selected (see precedent posts):
-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|-8/-2|-6/-1|-0/-0.1, aformat=channel_layouts=stereo [d]; [r][d] amerge [a]" -map "[a]"

There are two 'green messages':
[Parsed_pan_1 @ 000001fc795c1d80] Pure channel mapping detected: 0 1 2 3
It always appears no matter what I use:
pan=3.1|c0=c0|c1=c1|c2=c2|c3=c3
until
pan=FL+FR+FC+LFE|FL=FL|FR=FR|FC=FC|LFE=LFE

And
[Parsed_amerge_5 @ 000002ac9b81ce00] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
But any attempt to specify the correct channel layout for the surround channels, instead 'stereo', like:
pan=SL+SR...,compand...
or
aformat=channel_layouts=SL+SR
abort the process.

2) I suggest use for 6.1 -> 5.1 downmix:

-filter_complex "asplit [f][s]; [f] pan=3.1|c0=c0|c1=c1|c2=c2|c3=c3 [r]; [s] pan=stereo|c0=0.412*c4+0.588*c5|c1=0.412*c4+0.588*c6, compand=attacks=0:decays=0:points=-90/-85.4|-8/-3.4|-5/-1|-0/-0.1, aformat=channel_layouts=stereo [d]; [r][d] amerge [z]" -map "[z]"
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 22nd February 2023, 13:53   #51  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
What do you suggest should happen with Back Centre channel? We do not support mixing that into back channels.
https://trac.ffmpeg.org/ticket/10207#comment:4
Balling is offline   Reply With Quote
Old 22nd February 2023, 15:50   #52  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Balling View Post
What do you suggest should happen with Back Centre channel? We do not support mixing that into back channels
Your sample is a problematic AAC 6.0 (MediaInfo and faad inform with channel layout L R C Cb Lb Rb).

qaac can't decode it: ERROR: Not available input file format

NeroAacDec decode it in wrong (I suposse) channel order (maybe FL FC FR SL BC SR) without channel mask.

faad seems decode it without channel mask with the order FL FR FC BC SL SR

ffmpeg decode it like 5.1 but with channel mask 0 in the same order than faad.

To convert that 6.0 to 5.1 I suggest try:

-filter_complex "asplit [f][s]; [f] pan=3.1|c0=c0|c1=c1|c2=c2|c3=0.0*c3 [r]; [s] pan=stereo|c0=0.412*c3+0.588*c4|c1=0.412*c3+0.588*c5, compand=attacks=0:decays=0:points=-90/-85.4|-8/-3.4|-5/-1|-0/-0.1, aformat=channel_layouts=stereo [d]; [r][d] amerge [z]" -map "[z]"
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 22nd February 2023 at 16:00.
tebasuna51 is offline   Reply With Quote
Old 23rd February 2023, 14:07   #53  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
channel layout L R C Cb Lb Rb, yep, where Cb is back center. Wav does support that channel. https://learn.microsoft.com/en-us/wi...rmatextensible

So your command puts back center where?

Last edited by Balling; 23rd February 2023 at 14:25.
Balling is offline   Reply With Quote
Old 23rd February 2023, 22:35   #54  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Half mixed in surround channels, make a fantom back center.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Reply

Tags
downmix, phase shift

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 16:51.


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