View Full Version : ?correct way to convert 5.1 to stereo Belight
sadsack
5th July 2011, 17:33
I have a 5.1 ac3 I'd like to downmix to stereo wave (44.1 khz) in BELIGHT to burn to cd. It's a music-only track (no dialog or effects) designed just for the music soundtrack. Looks like there's different instruments on different channels, including the LFE channel.
I'm wondering if I should untick the "LFE to LR -3db" (or make it 0) in Advanced Settings, since it's part of the music, not "loud explosions," etc.
I ticked some of the defaults - Dynamic Compression, Boost Mode (LiGH) and OTA (Hybird Gain), to get the volume raised. Looks good in a wave editor, but I wanted some advice before doing the whole thing.
hello_hello
5th July 2011, 22:06
I wouldn't use Dynamic Compression when encoding music.... I don't think. Are you wanting to down-mix to pure stereo or Dolby Pro Logic? I assume just to stereo.
Here's my basic understanding.... The centre down-mix level can vary and should be contained within the AC3 stream, as should the rear speaker levels. Therefore it'd be up to the decoder to get it correct (I guess). The LFE channel is usually mixed using -3db because there's only one low frequency speaker but two stereo speakers and a second speaker gives you 3db more. Actually I though it was 6db, but I looked in Azid's help file (the tool AutoGK uses for decoding AC3) and it says it uses -3db for the LFE down-mix level by default. According to a few forum threads I've read, -3db is the norm.
There's a discussion here regarding down-mixing and post #3 offers a couple of standard matrices. http://www.hydrogenaudio.org/forums/index.php?showtopic=52887&hl=downmixing. It's a discussion about a now defunct foobar2000 plugin, but the principle is the same.
I've never used BELIGHT so I have no idea what LiGH and OTA gain modes do (edit: I worked it out and mentioned them again in the second last paragraph), but if they normalise "on the fly" (by basically turning the volume up and down as the music decodes), which I assume they do, then I wouldn't be using them when re-encoding music either. I'd be down-mixing to a stereo wave file without any compression or normalising, then I'd normalise the whole wave file properly, then I'd convert it to it's final format.
I use foobar2000 for most of my audio encoding. It's an audio player, but it'll convert as well, and with the right plugins it'll decode lots of formats including the audio inside MP4 and MKV files. Now you've actually got me thinking about it though, I'm not sure how the audio is normalised while down-mixing to stereo for encoding. I'll have to investigate that one. I know I've checked quite a few down-mixed MP3 encodes and their peaks are invariably 0db or very close to it, so I never normalise them. Now you've got me thinking about it for the first time in a long time I'll have to investigate how it's done.
I do know when using AutoGK and Azid, every once in a while the encoded audio will be a little wrong.... generally down in level or sharp peaks seem really compressed, while when using foobar2000 and it's "5.1 to stereo" plugin I've never heard a difference between the original and encoded files (using stereo speakers of course). Anyway....
As I have no life and became seriously invested in your problem, I downloaded a BeSweet PDF help file and had a read. Seems your settings would enable Dynamic Compression (obviously), which is done based on info in the AC3 stream but I doubt you want to compress music-only audio and there are various levels of compression which can be used (I don't know what BELIGHT does). The LiGH part is the algorithm used for boosting the volume but as I suspected, it works by turning the volume up and down on the fly so you probably don't want that. The OTA Hybrid gain works by using two passes, except instead of down-mixing to stereo and then normalising on the second pass it scans the audio until it's found the maximum amplification for "normal" normalisation, then it applies that gain as the audio is decoded (I assume). You probably do want that.
I'm glad I read the help file as I think it answers my question as to how the Foobar2000 "5.1 to stereo" plugin seems to normalise even though it's not got an apparent normalising function. I think it'd also explain why down-mixing other multi channel audio types which have already been normalised (AAC for example) doesn't produce a distorted mess. Well it's late and I'm tired and believing the above will let me stop thinking about it for tonight at least so I can get some sleep.
Sorry about the long post but I did some research while replying and learned me some stuff too. :)
sadsack
6th July 2011, 00:06
Thanks for your research. As I dont have a life either, I was sitting waiting for someone to reply. I'm alittle surprised none of the Belight/BeSweet users did. I tried Foobar earlier, but I prefer the dedicated audio GUI of Belight.
I tried outputting samples with/without Dynamic Compression, and without LiGH applied. With both on, the music level was higher, which in general I would prefer since I dont like music with parts you cant hear (and which I would manually raise volume of parts in a wave editor).
So it sounds like you're saying I should keep the default "LFE to LR -3db"?
I'll play samples including your recommendation and compare how they sound.
I cut the ac3 in parts so I could encode smaller waves rather than editing one big wave. Is this incorrect because the 2-pass normalization is not looking at the complete recording levels?
hello_hello
6th July 2011, 07:36
Thanks for your research. As I dont have a life either, I was sitting waiting for someone to reply. I'm alittle surprised none of the Belight/BeSweet users did. I tried Foobar earlier, but I prefer the dedicated audio GUI of Belight.
Each to their own I guess, but I prefer the simple "open the file, right click and select a conversion preset" method. As long as it converts properly I'm happy not to have to think, plus there's the benefit of not having to always demux the audio stream before converting and no need for intermediate wave files.
Foobar's AC3 decoder will use dynamic range compression if you tell it to (I never have) and I'd be somewhat surprised if there's not a DSP plugin for "on the fly" volume normalisation. I personally dislike on the fly volume normalisation as it's often obvious the audio is being turned up and down (that "pumping" effect). I do however use it regularly when watching movies etc to keep the peace, but I don't think I'd ever include it in the actual encoding process.
So it sounds like you're saying I should keep the default "LFE to LR -3db"?
Yes, but in reality I don't think there'd be much perceivable difference anyway. Plus I think it's safe to ignore the LFE channel entirely as if memory serves me correctly the left and right channels are "full range" while the LFE channel only contains some of the really low frequencies for extra punch. I'd be thinking the logic there is if you're using typical stereo speakers then they won't handle those low frequencies well anyway, so AC3 puts them on a separate channel and out of harm's way if your system doesn't include a dedicated sub. Or maybe that's all waffle. I'm just guessing, but it seems -3db is the standard way of doing it.
I'll play samples including your recommendation and compare how they sound.
I cut the ac3 in parts so I could encode smaller waves rather than editing one big wave. Is this incorrect because the 2-pass normalization is not looking at the complete recording levels?
I guess in a perfect world the volume information would be written to the individual AC3 streams when you cut the original, but I've no idea if that's what actually happens.
If anything I'd convert the whole AC3 stream to a stereo wave file myself and then cut the wave file as required, then I'd convert the individual wave files to whichever format I'm requiring. Cutting up a wave file would be easier in terms of cutting exactly where you want to than cutting an AC3 file would be. Plus most wave editors will let you easily fade out a track, that sort of thing.
A question....
When you said you'd prefer to use dynamic compression/normalisation or you'd manually raise the quiet parts of the audio, how does that relate to the cuts you're making?
Without knowing the type of music you're working with or where you're cutting I'm wondering if you're basically cutting the audio into individual songs. If that's what you're doing and raising the volume of quiet parts refers to only raising the volume of a whole cut (or not) I'd be leaving out the dynamic normalisation myself and running ReplayGain on the individual cuts to give each the same apparent level while encoding.
hello_hello
6th July 2011, 08:02
For funzies I just opened a few movies containing AC3 audio and looked at ffdshow's audio mixer matrix to see what it does when mixing 5.1 to stereo.
The front and back left and right channels are always given a level of "1" which I assume means 100%, or the same as the input level. The centre channel is mixed to the left and right stereo channels with a level of "0.707" in each. I'll go out on a limb and say that's 70% of the original volume and I'll further guess it's 70% using the decibel scale which I'd be willing to bet equates to a reduction of 3db. The LFE track is mixed to stereo in exactly the same way.
While I'm making incredibly intelligent and insightful guesses, I'd assume ffdshow's mixing would be "post" any changes to the relative levels the decoder would make before it's then mixed to stereo. ffdshow seems to always mix 5.1 to stereo in the same way, regardless of the type of audio codec, so I assume for AC3 the decoder modifies the centre and surround levels according to the information in the AC3 stream, then ffdshow mixes those levels to stereo while always applying a 3db reduction to the centre and LFE channels.
nibus
6th July 2011, 09:44
I think eac3to would give you better results than Besweet/belight, especially with the Nero decoders installed. It also has a normalization feature, but it only raises the volume until the first peak hits 0db, so there isn't any compression like you are adding in Belight (DRC / LigH). This should work better for music because music is already fairly compressed. The Besweet boost modes are meant more for movie soundtracks to help out with noisy listening environments by raising the "valleys" and lowering the "peaks".
http://forum.doom9.org/showthread.php?t=125966
sadsack
6th July 2011, 18:37
I tried "eac3to and more" GUI but couldnt figure out how to start it processing. Seemed like it needed the whole video rather than just an audio file.
I used Foobar with the "5.1 to stereo" setting to wave, and compared the result with the recommended Belight settings wave (including "LFE to LR -3db" ticked). They looked quite similar; Foobar was also about 1 db higher. The fact that Foobar demuxes does make it sound pretty handy for certain situations.
The music is the movie soundtrack, so there are short and long cues. The LFE channel is a Bass cello. The back L,R are just those echoey versions of the front L,R. I forget how the Center sounded like.
With the Belight or Foobar waves (from above), I would need to raise parts of each cue manually.
Highlighting a cue within the wave (not the whole wave with various cues simultaneously) and Normalize to 0 still doesnt do the trick, since most of a cue wont necessarily be raised; more tweaking required. Either way, alot of work.
I tried a Belight sample with the works - Dynamic Compression, LiGH and Hybrid Boost; it sounded distorted.
Unticking the LiGH gave an undistorted sound which was also raised in the quieter parts. I played parts of it, and same parts on a manually raised cue, and they generally sounded the same.
So if you guys thought I could trust that method, that would be my first choice. Otherwise it's the drudgery of tweaking each cue (which I've done before, but it's not exactly fun).
hello_hello
7th July 2011, 04:02
Highlighting a cue within the wave (not the whole wave with various cues simultaneously) and Normalize to 0 still doesnt do the trick, since most of a cue wont necessarily be raised; more tweaking required. Either way, alot of work.
Assuming from what you just posted... if normalising did fix the volume difference between cues it'd be the preferred way to do it (or do you really need to apply different amounts of gain to a single cue?)... then you might want to give ReplayGain a try.
I don't know if you're familiar with it but foobar has a ReplayGain scanner. It only takes a few seconds to scan a file and then you can apply ReplayGain while converting the individual cues to their final format.
If ReplayGain doesn't do the trick have you tried compression? You could import a wave file into a program such as Audacity (it's free) then use it's compressor DSP. It's an adjustable compressor (you can set the threshold level, compression ratio and attack time) and it works quite well. Once you've found a compression setting which works, chances are you can apply the same compression to each individual cue and they'll sound fine. There's two compressors. The second is labelled SC4 and it gives you more configuration options.
I haven't really done direct comparisons, but I'd be pretty confident a properly applied compressor is going to sound better (more natural) than some sort of dynamic gain.
You can also import a multi channel wave file into Audacity, so if you wanted to you could convert the 5.1 AC3 to wave without mixing it down to stereo (foobar will do it if BeLight won't) and open it with Audacity. Not that you probably need it, but then you've got total control over each channel individually, so you could mix it down to stereo using whichever levels you prefer for the centre, LFE and rear channels.
If there's no need for that it'd be faster working with a stereo wave file, so mixing the AC3 to stereo first is probably the way to go.
Wavasour is also a free wave editor. http://www.wavosaur.com/
I've not played around with it much myself. Which program are you using to edit the wave files at the moment?
sadsack
8th July 2011, 20:15
I tried ReplayGain in Foobar when I made my earlier test but I didnt get it to work. Since you mentioned it, I researched it, but I dont like the idea that it only works with compatible devices.
I primarily use NERO wave editor. I've used Audacity before, mainly for similar tasks to what you described - for it's ability to separate and join channels, and to downmix multiple channels. In this case, however, because this was a specific music-only 5.1 track, I didnt want to tinker with each channel. I was hoping it would downmix better automatically.
I've previously tested the DSP compressor in Nero wave editor, but I was never certain that I wasnt somehow destroying the music, even if it sounded okay, and the wave looked okay.
hello_hello
9th July 2011, 05:20
I tried ReplayGain in Foobar when I made my earlier test but I didnt get it to work. Since you mentioned it, I researched it, but I dont like the idea that it only works with compatible devices.
What I was suggesting was not to only save the ReplayGain data as tags, as then it will only work with compatible devices, which do tend to be fairly scarce. Why it hasn't been more widely adopted, I don't know.
Foobar2000 will use the ReplayGain tags on playback and it'll also use them to apply ReplayGain when converting, but it can't save the tags to the wave files themselves.
I take my finished wave files and convert them to flac. I then open the flac files with foobar and run the ReplayGain scanner on them. When it's finished foobar will offer to save the ReplayGain info to tags. I then convert the flac files to the final format while applying the ReplayGain (you set up the ReplayGain bit under the processing section of foobar's conversion options). Foobar will probably warn that the application of ReplayGain can't be reversed losslessy (or something to that effect) but that's okay because I still have the original lossless flac files.
The only format I'm aware of to which ReplayGain can be applied losslessly is MP3. It can also be reversed losslessly. That's one of the primary reasons I still use MP3. I can apply ReplayGain to each one and because it doesn't rely on the player supporting ReplayGain tags any player will play those MP3s at the same level.
The best program (maybe the only one) for applying ReplayGain losslessly to MP3s is MP3Gain. http://mp3gain.sourceforge.net/
Anyway, the ReplayGain thing was just a thought....
I've previously tested the DSP compressor in Nero wave editor, but I was never certain that I wasnt somehow destroying the music, even if it sounded okay, and the wave looked okay.
I use Nero a fair bit myself. You can't really destroy the music by compressing it, only make it sound bad if you compress it too much. I still think some gentle compression would sound better than trying to manually raise or lower sections of the audio yourself, or applying "on the fly" normalisation, but each to their own....
sadsack
9th July 2011, 17:46
I have FLAC frontend but I dont think it creates a Replaygain tag.
I'll give the wav-flac-wav conversion in Foobar2000 a try.
WaveGain v1.3.0 looked like a wave-dedicated Replaygain program (so I could skip the FLAC step). Tried it but got a run error. The readme suggested downloading an exe and ocx in case of errors; I installed the exe, and already had the ocx installed, so I'm not sure why I cant get it to run. So I'll try Foobar2000.
http://www.rarewares.org/others.php#wavegain
robertcollier4
16th November 2012, 17:17
Use the following command with eac3to
eac3to.exe E:\Sourcefile.ac3 E:\Outfile.wav -down2 -mixlfe
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.