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 26th December 2011, 21:18   #1  |  Link
OtonVM
Registered User
 
Join Date: Jul 2008
Posts: 17
sox FLAC 5.1 to AAC 2.0 DPLII mixer problem

Hello!

I have a problem with mixer values for sox when converting flac files from an audio DVD that are in 5.1 surround sound.

Excerpt from the script:
Code:
ffmpeg -i "$a" -vn -acodec pcm_f32le -f wav - | 
sox -V3 --guard --show-progress --multi-threaded --ignore-length --bits 32 --rate 48000 --encoding floating-point --channels 6 
--type wav - --type wav - remix -m 1v0.2646,3v0.1870,4v0.1870,5v0.2991,6v0.1323 2v0.2646,3v0.1870,4v0.1870,5v-0.1323,6v-0.2291 gain -n | 
ffmpeg -v -1 -y -i - -acodec pcm_f32le -f wav "$OUTF_WAV"
I'm using values for mixer, found on a thread here, but in the end I get a stereo (or DPLII) mix that is very much leaning to the left channel. I can clearly hear this and it's obvious in Audition.

So I tried rejiggering the values based on what MediaInfo says are the channel positions:
Code:
Front: L C R, Back: L R, LFE
The result is this:
Code:
1v0.2646,2v0.1870,6v0.1870,4v0.2291,5v0.1323 3v0.2646,2v0.1870,6v0.1870,4v-0.1323,5v-0.2291
and I might be REALLY wrong here, I don't know. Here I also get a stereo mix, more centered but still leaning to the left.

What am I doing wrong?
OtonVM is offline   Reply With Quote
Old 26th December 2011, 23:19   #2  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
I use the same downmix in Hybrid and thought it sounded okay.
I would:
1. add '-v -10' to the decoding ffmpeg call (not sure if otherwise some unwanted interference ends up in the pipe to sox)
2. remove the '--multi-threaded' in sox (since some Hybrid users had problems with it,..)

Why do you use pcm_f32le and not for example 'pcm_s16le' ?

If there really is a problem with the downmix I would be interested in a better one too.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 27th December 2011, 11:29   #3  |  Link
OtonVM
Registered User
 
Join Date: Jul 2008
Posts: 17
Removed '--multi-threaded' (it's just audio anyway).

I doubt that ffmpeg verbosity has any influence since it's probably a different stream of data (stderr vs stdout); I had to fight with that when piping in python. I did it anyway.

I use 'pcm_f32le' since I'm mixing together more streams into one so I think that more bits for sox to work with are better. When I'm converting stereo to stereo I leave everything at default.
I try not to resample at any point so not to induce any artifacts. Also afconvert (on mac) has than more data to work with.

Result: same!

Left channel is still much louder.


(btw, hybrid looks cool but doesn't run on my mac (I have QT installed), error: "Sorry, but support for options has been dropped, use .ini file instead!")

Last edited by OtonVM; 27th December 2011 at 11:38. Reason: Forgot to add results.
OtonVM is offline   Reply With Quote
Old 27th December 2011, 11:32   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Quote:
"Sorry, but support for options has been dropped, use .ini file instead!"
this should only happen is Hybrid is called with additional command line parameters,.. (works here on my mac without a problem, but you never no the feedback from other mac users is next to null so I never know for sure,... )
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 27th December 2011, 11:41   #5  |  Link
OtonVM
Registered User
 
Join Date: Jul 2008
Posts: 17
Quote:
Originally Posted by Selur View Post
this should only happen is Hybrid is called with additional command line parameters,.. (works here on my mac without a problem, but you never no the feedback from other mac users is next to null so I never know for sure,... )
Nope, I'm just running it from the finder. I'm on SL btw. (But I think I'll either post on your forum or use it on win.)
OtonVM is offline   Reply With Quote
Old 27th December 2011, 21:16   #6  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
I exchanged the Hybrid download with a static build, hope that works.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 30th December 2011, 17:22   #7  |  Link
OtonVM
Registered User
 
Join Date: Jul 2008
Posts: 17
So, no new ideas?
OtonVM is offline   Reply With Quote
Old 30th December 2011, 17:31   #8  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Didn't look at it, since I'm just to deaf to fix the problem.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 30th December 2011, 19:45   #9  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
@OtonVM

to downmix to stereo (without LFE) use:
Code:
remix -m 1v0.3694,3v0.2612,5v0.3694 2v0.3694,3v0.2612,6v0.3694
to downmix to stereo with LFE (not recommended) use:
Code:
remix -m 1v0.2929,3v0.2071,4v0.2071,5v0.2929 2v0.2929,3v0.2071,4v0.2071,6v0.2929
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 30th December 2011, 20:10   #10  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
okay, to sum them all up, here are the once I use in Hybrid:
Code:
//5.1toStereo
1v0.3694,3v0.2612,5v0.3694 2v0.3694,3v0.2612,6v0.3694
//5.1toStereo (dpl)
1v0.3205,3v0.2265,4v0.2265,5v0.2265 2v0.3205,3v0.2265,4v-0.2265,5v-0.2265
//5.1toStereo (dpl2)
1v0.3254,3v0.2301,5v0.2818,6v0.1627 2v0.3254,3v0.2301,5v-0.1627,6v-0.2818
//5.1toStereo (lfe)
1v0.2929,3v0.2071,4v0.2071,5v0.2929 2v0.2929,3v0.2071,4v0.2071,6v0.2929
//5.1toStereo (dpllfe)
1v0.2613,3v0.1847,4v0.1847,5v0.1847,6v0.1847 2v0.2613,3v0.1847,4v0.1847,5v-0.1847,6v-0.1847
//5.1toStereo (dpl2lfe)
1v0.2646,3v0.1870,4v0.1870,5v0.2291,6v0.1323 2v0.2646,3v0.1870,4v0.1870,5v-0.1323,6v-0.2291
b66pak is right and posted the '5.1 to Stereo' and the '5.1toStereo (lfe)' and the first one you used was the '5.1toStereo (dpl2lfe)' so all the others might be worth a try,...

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Reply

Tags
downmix, remix, sox, transcode audio

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 02:43.


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