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 5th August 2014, 21:59   #1  |  Link
Frozen Fractals
Audiophile
 
Frozen Fractals's Avatar
 
Join Date: Jun 2014
Location: Arendelle
Posts: 24
eac3to Downmixing Questions

When downmixing surround (Frozen's DTS-HD MA 7.1 track) to stereo using eac3to, should I use the "-normalize" switch? I've read in some forum posts that you should, yet others say you shouldn't. From what I understand, normalizing the audio brings the peak/average amplitude to a norm value (0dB in this case)...but is it necessary? Currently I am using the "-downStereo" and "-mixlfe" switches to downmix the 7.1 to 2.1 (including the LFE signal).

Another question I have (related), is if I mix the LFE channel in I get much more clipping with a ~-6dB gain being applied. Without mixing the LFE signal in I get ~-2dB gain applied to remove the clipping. Should I mix the LFE channel in when downmixing 7.1 to stereo? And should I worry about the high(er) negative gain applied if I mix the LFE in (i.e. does it make the whole track "quieter")?

Last edited by Frozen Fractals; 5th August 2014 at 22:01.
Frozen Fractals is offline   Reply With Quote
Old 5th August 2014, 22:53   #2  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
If you leave -normalize out, it will only normalize if clipping is detected.
When clipping is detected, a 2ndpass is performed to apply normalization.
This can be skipped with -no2ndpass, but there will be clipping.

-mixlfe may or may not cause unwanted audio problems.
Generally, -mixlfe is not recommended or stereo downmix.

I think you can use sox or something to create actual 2.1.
I've not played with 2.1 so don't know how well it will turn out.

Are you playing back on a 2.1 sound system?
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 5th August 2014, 23:19   #3  |  Link
Frozen Fractals
Audiophile
 
Frozen Fractals's Avatar
 
Join Date: Jun 2014
Location: Arendelle
Posts: 24
- I see. So I should just leave "-normalize" out?

- So I should omit the LFE signal, even if downmixing for playback on a 2.1 system (i.e. with a dedicated subwoofer)?

- I am sorry, but I am unaware of what sox is?

- I mainly want to play it back as a "music" file (I am using the medley they play during the credits of Frozen) on a 2.1 system (two floorstanding towers with a crossover to the dedicated sub set at 80Hz) and also on my iPhone (using stereo headphones). What settings would be best for these criteria?
Frozen Fractals is offline   Reply With Quote
Old 6th August 2014, 00:46   #4  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
Yeah, leave normalize out. Let it do automatically.

Yeah, leave LFE out. If it's creating a 4dB difference for clipping, then leave it out.
I don't think the -mixlfe creates 2.1. I think it just creates 2.0 (intended for full range speakers; powered speakers)

SoX is an audio processing tool. Mainly a command-line interface (maybe some GUI's around?
For creating 2.1 audio you'll have to search through this forum for some advice, as others have tried this route.
Although, tbh, I believe that I read from several that it's not even a good idea to create discreet 2.1 or something?

You could downmix to 5.1 and let whatever receiver/amp device you're using to playback through to your speakers.
Let you're external hardware handle the downmix. You still get the .1 audio.
I don't know if you're playing back through PC or other device. With PC, you have loads of options, depending on software, soundcard and, possibly, DirectShow Filters (for FLAC decoding; FFDShow post-processing audio options, etc).

If you're going to be using it interchangeably between your 2.1 and iphone, just stick with simple -downStereo without worrying about .1 audio.
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 6th August 2014, 01:09   #5  |  Link
Frozen Fractals
Audiophile
 
Frozen Fractals's Avatar
 
Join Date: Jun 2014
Location: Arendelle
Posts: 24
Understood. I am going to go with "-downStereo" as the only switch (leaving out "-mixlfe" and "-normalize"). However, one question I still have is what exactly is the point of the "-normalize" switch if the encoder is going to automatically apply it as it sees fit?
Frozen Fractals is offline   Reply With Quote
Old 6th August 2014, 01:22   #6  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
Quote:
Originally Posted by Frozen Fractals View Post
as it sees fit?
As stated in my first post, it only does it if it detects clipping.

It won't do it if it finds the audio too quiet or anything.
You can run it against the audio if you feel the audio is quiet. But this would have to be extremely quiet audio.
And probably best handled with something else like SoX with the compand settings (or other means of normalizing, as per your preference).
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 6th August 2014, 03:00   #7  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,821
As far as I know, the LFE channel doesn't contain anything not already in the front (and maybe rear) speakers, in respect to the "sub" frequencies. If you include it in a down-mix you're boosting those low frequencies. If I remember correctly, the Dolby AC3 spec says the LFE channel shouldn't be included (at least by default) when multi-channel audio is being downmixed to stereo by a playback device.

The merit of normalising "soundtrack" audio (or not) is probably a whole other subject, but if the object of the exercise is to create a standalone music file, when it comes to normalising I think the question would be, "why not"? It simply adjusts the volume for the whole file by the same amount so the peaks are at maximum (ie 0dB). When it comes to your example there's no way to avoid it. Combining the individual channels as stereo results in a file with peaks above maximum so the over-all volume needs to be lowered. If you include the LFE channel it needs to be lowered more (but it'll also have more low frequencies in relation to the rest).

Mind you for standalone music files I always apply ReplayGain. It analyses the audio in order to adjust it to a specific target volume according to how loud it actually sounds, and it works very well. I'd probably downmix with eac3to to something lossless like FLAC, then open the FLAC file with foobar2000 and run a ReplayGain scan. I'd then convert it to another format (or even flac again) with foobar2000 while applying the necessary ReplayGain adjustment. Or for MP3 you can apply RelayGain volume changes losslessly after they're encoded. When it comes to playing music on a portable MP3 player especially, it's great not having to constantly adjust the volume.

The original idea behind ReplayGain was to save the info to tags in the audio file for the player to read, and it'd just the volume automatically for each one on playback. Unfortunately though, it's still not widely supported by hardware players, so the workaround is to apply the appropriate volume adjustment when creating the audio file instead.
hello_hello is offline   Reply With Quote
Old 6th August 2014, 04:32   #8  |  Link
Frozen Fractals
Audiophile
 
Frozen Fractals's Avatar
 
Join Date: Jun 2014
Location: Arendelle
Posts: 24
So it is recommended to applying the "-normalize" switch? Or is it (normalization) already automatically applied if eac3to says that a second pass is necessary (due to clipping)?

Regarding ReplayGain: I am not familiar with it. I have used foobar2000, but I never have used that particular feature. How exactly do I use it/is it necessary? Right now I am downmixing to FLAC. I plan on then converting that FLAC to AAC for my iPhone. The FLAC will be used for playback on my PC.
Frozen Fractals is offline   Reply With Quote
Old 6th August 2014, 07:20   #9  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
Oh cool, you use Foobar2000.
you can read a great deal of how RG works here: http://wiki.hydrogenaud.io/index.php?title=ReplayGain

When you import your music, you can right-click on the track and use (in the context menu):
ReplayGain >
"Scan per-file track gain" (all files will get different RG value depending on track loudness)
"Scan selection as a single album" (all files will get same RG value based on album loudness; all selected files are calculated, regardless of tags)
"Scan selection as albums (by tags)" (all files will get same RG value based on album loudness; all selected files are calculated, considering any tags; files with no tags get treated as same album)
"Scan selection as albums (by folders)" (all files will get same RG value based on album loudness; all selected files are calculated, regardless of tags; probably good if you have hundreds of folders for each album and not all tracks have tags? I'm guessing).

I use the "(by tags)" selection (after tagging everything).
It gives you RG values for single-track and album mode (according to tags).

After scanning for RG values, tags are embedded with the RG data.
You can go into Foobar:

Preferences
> Playback
> ReplayGain
>> "Source mode:" none/track/album
>> "Processing:" apply gain and prevent clipping according to peak

And it should playback with decent loudness and prevent clipping without distortion.

The "Preamp" options you can play with.
I don't touch them.

Some way technical reading on RG 1.0 specification: http://wiki.hydrogenaud.io/index.php..._specification

A custom google search about ReplayGain and Preamp options over at the HydrogenAudio forums
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 6th August 2014, 10:31   #10  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,881
Quote:
Originally Posted by Frozen Fractals View Post
So it is recommended to applying the "-normalize" switch? Or is it (normalization) already automatically applied if eac3to says that a second pass is necessary (due to clipping)?
When downmix the signal of 3 channels (Front, Center and Surround) are added to only 1 channel (L or R) then most the times there are overflows (clipping) at some points.

For that the automatic normalize, to obtain the max volume but less than the original track volume.

If there aren't overflows you obtain the same volume than original track and the normalize is only recommended if you want more volume.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 6th August 2014, 12:37   #11  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,821
Quote:
Originally Posted by Frozen Fractals View Post
Regarding ReplayGain: I am not familiar with it. I have used foobar2000, but I never have used that particular feature. How exactly do I use it/is it necessary? Right now I am downmixing to FLAC. I plan on then converting that FLAC to AAC for my iPhone. The FLAC will be used for playback on my PC.
Sparktank seems to have covered the "how to".

ReplayGain isn't necessary, but it's a pretty good idea. If it was me, I'd scan the flac files with ReplayGain. When it's done, foobar2000 will offer to save the ReplayGain info to tags in the files. I'd let it. When you do, foobar2000 can use the ReplayGain info in the tags to automatically adjust the volume on playback. In foobar2000's preferences there's an option to enable ReplayGain (under Playback). Or it might be enabled by default.

foobar2000's converter has the same option under Processing/ReplayGain. When converting the flac files to AAC you can get foobar2000 to use the ReplayGain info to adjust the volume while converting so the AAC files will sound the same in level and the player (iphone) therefore doesn't need to support ReplayGain as such.

The latest foobar2000 has built in converter presets for NeroAAC, QAAC, FhGAAC and FDKAAC, although you still need to download the appropriate encoders and/or required files manually.

Using ReplayGain is for me, pretty much an all or nothing thing though, especially as I tend to leave my MP3 player/foobar2000 in random mode, so all my music needs to have ReplayGain applied in one way or another or it defeats the purpose somewhat. I highly recommend it though. It saves a hell of a lot of manual volume adjusting from one song to the next. As I tend to play music in random mode, I always run a "track gain" scan so every file should end up the same level and I get foobar2000 to apply Track Gain on playback (or apply track gain when converting for the MP3 player). If you want to keep the relative volumes of a whole album's worth of songs intact though, you can run one of the "album scans" and apply Album Gain on playback. I've not really used Album Gain myself so I'm not familiar with foobar2000's album scan options, but that's the basic difference between track gain and album gain.

Last edited by hello_hello; 6th August 2014 at 12:56.
hello_hello is offline   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 12:13.


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