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 19th August 2019, 19:05   #1  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
AviSynth Downmix Scripts

This is a question for Tebasuna:

In AVStoDVD MrC uses downmix scripts from you. For downmixing 8ch audio to 6ch the script is this one:
Quote:
Function Dmix86(clip a)
{
flr = Getchannel(a, 1, 2, 3, 4)
blr = Getchannel(a, 5, 6)
slr = Getchannel(a, 7, 8)
sur = MixAudio(blr, slr, 1.0, 1.0)
return MergeChannels(flr,sur)
}
Now over at VideoHelp JuMe proposed a different script:

Quote:
The formula for 7.1 to 5.1 is a little more complicated:

Ls' = Ls + (-1,2 dB) × Lrs + (-6,2 dB) × Rrs
Rs' = Rs + (-1,2 dB) × Rrs + (-6,2 dB) × Lrs

In other words, surround back -channels are partially mixed together before they are combined with side surrounds. I’m a complete novice with Avisynth, so there is probably more sophisticated way of writing the script, but this is what I’ve been using:

Quote:
Function Dmix8to6(clip a)
{
front = Getchannel(a, 1, 2, 3, 4)
bl = Getchannel(a, 5)
br = Getchannel(a, 6)
sl = Getchannel(a, 7)
sr = Getchannel(a, 8)
bl_new = MixAudio(bl, br, 0.8710, 0.4898)
br_new = MixAudio(br, bl, 0.8710, 0.4898)
sl_final = MixAudio(sl, bl_new, 1.0, 1.0)
sr_final = MixAudio(sr, br_new, 1.0, 1.0)
return MergeChannels(front, sl_final, sr_final)
}
Any comments?
I cannot really judge this script because I do not have a surround setup for audio (I'm old school - Stereo Only)


Cheers
manolito
manolito is offline   Reply With Quote
Old 20th August 2019, 00:31   #2  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by manolito View Post
In AVStoDVD MrC uses downmix scripts from you. For downmixing 8ch audio to 6ch the script is this one:
That 'Function Dmix86' must be used with float audio samples and after the merged clip must be Normalized to avoid clips in MixAudio(blr, slr, 1.0, 1.0).

I recommend the script used in BeHappy or MeGUI with the sur like this:

sur = MixAudio(blr, slr, 1.0, 1.0).SoftClipperFromAudX(0.0)

Now we don't need Normalize and the four first channels preserve the proper volume.

Quote:
Now over at VideoHelp JuMe proposed a different script:
Any comments?
The conversion between formula and avs script is correct (remember float samples and normalize after with volume problems).

Any user can do the desired mix but I can't recommend that formula at all.
For what, to obtain surround channels in 5.1, you need mix left and right channels?
The Ls channel is a mix of Lss and Lsr, put Rsr is a mistake:
Attached Images
 
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is online now   Reply With Quote
Old 20th August 2019, 10:06   #3  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Thanks...

JuMe did some listening tests using this method, this is what he found:
Quote:
I think that the more complicated formula from my previous post is better. The difference was most audible with a simple 7.1 channel test –file, which I downmixed using both methods. The more complicated method created “phantom -speakers” between side surrounds. In other words, even after downmixing to 5.1, side surround –testsignals sounded like they are coming from the sides and back surround –testsignals sounded like they are coming from behind. I hope this makes any sense, because I can’t explain it any better.
Of course my testing was't limited to a simple channel test. I also downmixed a couple 7.1 demo files for "real world" comparisons, and the difference was still there. Especially the sounds moving from one surround speaker to another sounded more seamless when they were downmixed with more complicated method.

Last edited by manolito; 20th August 2019 at 10:11.
manolito is offline   Reply With Quote
Old 20th August 2019, 15:07   #4  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Of course everybody can test anything and select their preferences.

I can understand some coeficient variations if Ls,Rs speakers aren't at -+115º, the average of Lss,Rss -+90º and Lsr,Rsr -+140º
It is well know than we need only 4 speakers (FL,FR,BL,BR) to create any surround sound 2D with the appropiate mix.
The 7.1 systems were created for commercial purposes, the 5.1 is more than enough for 2D surround.

But include other back channels in the mix of Ls,Rs is out of my mind.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is online now   Reply With Quote
Old 20th August 2019, 21:23   #5  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
There's probably some logic behind cross-mixing both the rear channels into each side to some degree. As 7.1ch rear surround speakers are behind you, you're going to hear both through each ear, and when mixed into the side speakers, if they're situated nearly to each side of you, the balance of sound you would have heard from the individual rear speakers would change.

And THX do it differently. The rear 7.1ch surround speakers are supposed to be directly behind you, virtually touching each other, more like a single speaker, so the rear surround channels would probably benefit more from cross-mixing when combining them into single surround channels.
http://www.audiogurus.com/learn/spea...-placement/100

That's ignoring the fact that the sound you hear from a left rear speaker reaches you left ear sooner than the right one, but there's probably nothing to be done about that. Surround sound sucks anyway. There's nothing like a sound appearing from somewhere behind you to take you out of what you're watching and remind you that the sound is all around you but the picture isn't.

Last edited by hello_hello; 21st August 2019 at 09:49.
hello_hello is offline   Reply With Quote
Old 21st August 2019, 11:18   #6  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
The origin of JuMe's algorithm is an official paper by the ETSI (European Telecommunications Standards Institute) about the AC-4 standard. The PDF document is here:
https://www.etsi.org/deliver/etsi_ts...01v010301p.pdf
The downmix information is on page 103.

So I guess it does make some sense to use this cross-mix approach for 8ch -> 6ch downmixing.

I will add it to the "Downmix.avsi" which comes with AVStoDVD as an alternative to the existing 8to6 function, I will call the function "Dmix86Dpl2x".

Cheers
manolito


//EDIT//
Further research by JuMe revealed that this downmix algorithm is for a Dolby ProLogic IIx compatible downmix. On a 5.1 system he could only hear very subtle differences between the two methods.

Last edited by manolito; 21st August 2019 at 13:56.
manolito is offline   Reply With Quote
Old 21st August 2019, 16:29   #7  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by manolito View Post
...this downmix algorithm is for a Dolby ProLogic IIx compatible downmix.
Then is intended to be played for a 7.1 system with a matrix decoder Dolby ProLogic IIx and recover the original 7.1 channels.

It is not to be played for a 5.1 system.
Like I say before don't have sense preserve 7.1 when 5.1 can play the same 2D surround with the recommended mix.

A 5.1 system can't recover the 7.1 original and your "Dmix86Dpl2x" have "very subtle differences" with the original, the "Dmix86" is exact to original.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is online now   Reply With Quote
Old 21st August 2019, 17:21   #8  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
It is not to be played for a 5.1 system.
Sorry but I think this is just not true. This is the exact purpose of the DPL IIx format to be played on a 5.1 system with the additional advantage to be able to recreate (to some extent) the additional channels on a 7.1 system with a DPL IIx matrix decoder.

If your reasoning was true then you would also say that the older DPL and DPL II matrices for 5.1 -> Stereo conversions are useless, right? According to your reasoning these formats were only meant for playback on 5.1 systems and not for playback on stereo systems. I believe that Dolby Labs and a lot of users would disagree...
manolito is offline   Reply With Quote
Old 21st August 2019, 20:58   #9  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
I am very old and I remember the first Dolby Surround in VHS tapes, a stereo analogic audio matrix encoded was converted in more than 2 channels.

Until DPL II to obtain 5.0 (not 5.1) from only stereo analogic audio. You are right was usefull before digital conections (SPDIF, HDMI) or to save some space.

I say than a DPL IIx to recover 7.1 from a 5.1 is useless at all, of course in my opinion.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is online now   Reply With Quote
Reply

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 10:25.


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