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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 25th July 2017, 23:15   #14321  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by thomaz909 View Post
~107mins ac3 640 produced a 14gb 64bit wav 5.1 file, only to get the 4-5 digit db value.
BTW, -normalize is only recomended when downmix, don't use normalize when recode 5.1 -> 5.1
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 26th July 2017, 00:15   #14322  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by tebasuna51 View Post
BTW, -normalize is only recomended when downmix, don't use normalize when recode 5.1 -> 5.1
Why not? Is it due to the dynamics between the channels?
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline  
Old 26th July 2017, 07:34   #14323  |  Link
mstrong
Registered User
 
Join Date: Jul 2017
Posts: 9
Muxing with Gap File

I have learned how to use the command line version of eac3to. The process creates a gap file. How do I mux my files back together using the gap file?

How do I do it using eac3to? I am also wondering if it can be done using MKVToolNix GUI.

Last edited by mstrong; 26th July 2017 at 07:50.
mstrong is offline  
Old 26th July 2017, 12:46   #14324  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Boulder View Post
Why not?
Well, you can do it if you listen low volume, but most the times the input source (from BD's) have a correct volume level without maximize.

Quote:
Is it due to the dynamics between the channels?
If you use eac3to to decode (ignoring any Dynamic Range Compression in source) and a free AC3 encoder (Aften or ffmpeg) than don't add DRC to output by default, the dynamics between channels are preserved, because the same gain is applied over all channels.

Only if you use a Dolby Digital encoder, than create DRC, the normalize can distort the initial balance between channels.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 26th July 2017, 12:56   #14325  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by mstrong View Post
I have learned how to use the command line version of eac3to. The process creates a gap file. How do I mux my files back together using the gap file?

How do I do it using eac3to? I am also wondering if it can be done using MKVToolNix GUI.
When eac3to create a gap file it do, automatically, a second pass to correct the detected problems, and the corrected files are ready to mux (if all work fine of course).

AFAIK only eac3to can use that gap file.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 26th July 2017, 15:25   #14326  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by tebasuna51 View Post
Well, you can do it if you listen low volume, but most the times the input source (from BD's) have a correct volume level without maximize.
What I've noticed is that many older movies have a quite big headroom (several dB's) even in the 5.1-channel lossless track. The mono and stereo tracks are all quite low in volume, sometimes eac3to shows that you need to amplify by almost 10dB to normalize. That's why I've always enabled normalization apart from encoding the original audio track to FLAC to save some space.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline  
Old 26th July 2017, 19:46   #14327  |  Link
Q-the-STORM
Registered User
 
Join Date: Sep 2012
Posts: 174
Quote:
Originally Posted by mstrong View Post
How do I mux my files back together using the gap file?
Just run the same command again. When eac3to sees that there is a gap file, it will use it.
Q-the-STORM is offline  
Old 26th July 2017, 23:03   #14328  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by thomaz909 View Post
isn't encoding the bottleneck in the whole process?

i would really love to have an option to -normalize "onthefly".
ssd wear, small ramdisks.
~107mins ac3 640 produced a 14gb 64bit wav 5.1 file, only to get the 4-5 digit db value.
You could effectively do it after a ReplayGain or EBU R128 scan. The audio still needs to be scanned first, but it should be faster than converting to wave. Once you have the peak values, you know how to adjust the volume when converting.

My old quad-core can scan a 2 hour, 5.1ch AC3 file in around 40 seconds (oversampling disabled), but it can also scan four of them simultaneously in about 40 seconds. I use foobar2000 for that sort of thing as it's ReplayGain scanner is quite fast.

It can also adjust the level to the ReplayGain target volume when converting, but you can specify an additional increase or decrease, so by enabling the "apply gain and prevent clipping" option with a 20dB increase, it'll limit the increase to prevent clipping according to the ReplayGain info, and the end result is peak normalising.
Adjusting to the ReplayGain target volume minus 5dB gives you the standard EBU R128 target volume, which is how I'd normalise after downmixing related files to stereo (episodes of a TV show etc), although it doesn't hurt to scan the output files and check the peaks just to be sure.

Why has ReplayGain/R128 scanning been almost completely ignored by programs related to video conversion?

Avisynth runs two passes, but does it write a wave file? If not that'd be another way to normalise without writing an intermediate file.

Quote:
Originally Posted by Boulder View Post
What I've noticed is that many older movies have a quite big headroom (several dB's) even in the 5.1-channel lossless track. The mono and stereo tracks are all quite low in volume, sometimes eac3to shows that you need to amplify by almost 10dB to normalize. That's why I've always enabled normalization apart from encoding the original audio track to FLAC to save some space.
That's no doubt true but it probably also means they have less dynamic range than newer movies, but the "average" volume, or at least the dialogue volume, would probably be very similar. Well that's my theory....

Last edited by hello_hello; 26th July 2017 at 23:17.
hello_hello is offline  
Old 27th July 2017, 03:16   #14329  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 2,130
For the life of me, I have never been able to understand why anyone would want to screw with the volume of a movie/TV show soundtrack. The mix is what the original director/producers/audio engineers wanted it to be in their product. Why do some think that they know better than those who put it together in the first place?
MrVideo is offline  
Old 27th July 2017, 07:32   #14330  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
Quote:
Originally Posted by MrVideo View Post
For the life of me, I have never been able to understand why anyone would want to screw with the volume of a movie/TV show soundtrack. The mix is what the original director/producers/audio engineers wanted it to be in their product. Why do some think that they know better than those who put it together in the first place?
Because between the producers and you getting it, there were so many different people messing with it, that any original intent is already lost, especially when handling broadcast, to a lesser extend with optical media - and most people would otherwise just reach for the remote to adjust the volume.
These days most broadcast content is already volume leveled with EBUR128 though, since a lot of stations adopted this standard.

Note that volume leveling is only an overall attenuation of the volume. It does not change its dynamic range, or anything like that, it just changes the overall volume by a constant factor, just like you would change the volume on your speakers.
Thats why a 2-pass process is needed, analyze the full track to find its volume level, and then attenuate by that level.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 27th July 2017 at 07:36.
nevcairiel is online now  
Old 27th July 2017, 11:24   #14331  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
From the beginning eac3to was designed to transcode audio without lose quality of source.

And only a Peak Normalization is allowed with -normalize.
Of course you can limit the peaks to avoid excesive volume, but the dynamic range is preserved.

A Loudness Normalization based in RMS values instead peak values, like ReplayGain and EBU R128 do, is not always possible without lose dynamic range.
Of course any user can do this with other tools than eac3to.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 27th July 2017 at 11:41. Reason: typo
tebasuna51 is offline  
Old 27th July 2017, 11:34   #14332  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by MrVideo View Post
For the life of me, I have never been able to understand why anyone would want to screw with the volume of a movie/TV show soundtrack. The mix is what the original director/producers/audio engineers wanted it to be in their product. Why do some think that they know better than those who put it together in the first place?
If there's dynamic range reduction info saved to AC3 audio, it would have been the director/producers/audio engineers who put it there. You can decode without using that information to reduce the dynamic range, but it's part of the AC3 spec.

I generally compress audio for movies/TV shows I copy to the hard drive connected to the TV, but that's only because I can do it better than the TVs "night mode", and it's only a temporary copy for viewing in the small hours.

I don't think the recent posts referred to compressing the audio though, only adjusting the level up or down as a whole, or adjusting it so the peaks are near maximum when encoding.

Last edited by hello_hello; 27th July 2017 at 11:39.
hello_hello is offline  
Old 27th July 2017, 20:05   #14333  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 77
Quote:
Originally Posted by stax76 View Post
As far as I know such disks are extremely rare, what's the name of the title? Tools you can try are BDSup2Sub(++) and Subtitle Edit.
MakeMKV shows when sub are forced, and if they're not empty, the forced subs are left in the resultant mkv.

Examples of BDs with forced subs that MakeMKV sees, and that can be extracted with mkvextract or Subtitle Edit or AegisSub etc.: Star Wars VI Return of the Jedi; Patton; Kill Bill BDs; Tora Tora Tora; The Walk; The Martian.
Ripman is offline  
Old 27th July 2017, 22:43   #14334  |  Link
mstrong
Registered User
 
Join Date: Jul 2017
Posts: 9
Muxing with GAP file

Quote:
Originally Posted by Q-the-STORM View Post
Just run the same command again. When eac3to sees that there is a gap file, it will use it.
I am assuming the gap file needs to be in the same folder as the video and audio source files?

Could you give me an example syntax for muxing a video and audio file into the same MKV?

Thank you.
mstrong is offline  
Old 27th July 2017, 23:21   #14335  |  Link
Q-the-STORM
Registered User
 
Join Date: Sep 2012
Posts: 174
Quote:
Originally Posted by mstrong View Post
I am assuming the gap file needs to be in the same folder as the video and audio source files?
Yes, the gap file is being created in the correct folder anyways, so there's no need to move anything, just run the command a second time.

Quote:
Originally Posted by mstrong View Post
Could you give me an example syntax for muxing a video and audio file into the same MKV?
Can't be done with eac3to, you gotta use mkvmerge for that...
Q-the-STORM is offline  
Old 28th July 2017, 13:05   #14336  |  Link
thomaz909
Registered User
 
Join Date: Jul 2004
Posts: 40
i just want to "normalize" to 0db.
that means, it scans all channels, takes the highest overall gain found and then amplifies all channels by this value.
for example L=-5db, R=-6db, C=-2db, SL=-12db, SR=-13db, then the center channel has the highest gain with -2db and finally all channels get an amplification by +2db.
no drc, compressor, loudness maximizer, limiter, etc.
and that all in the most efficient, resource saving way.

Last edited by thomaz909; 28th July 2017 at 13:14.
thomaz909 is offline  
Old 28th July 2017, 13:37   #14337  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by thomaz909 View Post
i just want to "normalize" to 0db.
that means, it scans all channels, takes the highest overall gain found and then amplifies all channels by this value.
for example L=-5db, R=-6db, C=-2db, SL=-12db, SR=-13db, then the center channel has the highest gain with -2db and finally all channels get an amplification by +2db.
no drc, compressor, loudness maximizer, limiter, etc.
and that all in the most efficient, resource saving way.
That is just like eac3to -normalize work.

To be clear is a "Peak Normalization" than don't change dynamics, and not a "Loudness Normalization (RMS)"
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 5th August 2017, 03:16   #14338  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 2,130
Quote:
Originally Posted by thomaz909 View Post
i just want to "normalize" to 0db.
that means, it scans all channels, takes the highest overall gain found and then amplifies all channels by this value.
for example L=-5db, R=-6db, C=-2db, SL=-12db, SR=-13db, then the center channel has the highest gain with -2db and finally all channels get an amplification by +2db.
no drc, compressor, loudness maximizer, limiter, etc.
and that all in the most efficient, resource saving way.
I hate to say this, but this a a bad example, because I dare you, in a blind test, that you will not be able to notice that 2dB difference.
MrVideo is offline  
Old 13th August 2017, 17:58   #14339  |  Link
thomaz909
Registered User
 
Join Date: Jul 2004
Posts: 40
Feature request

it would be nice if eac3to ignores -downXX switch when source is lower than the specified bitrate.
for example decoding a 64bit ac3 with -down32 then it "downbits" to 32bit.
when decoding a 24bit dts it ignores the switch and decodes to 24bit instead of "upbitting" to 32bit.

or add -downXXXX (for example -down6432)
then it only downs 64bit to 32bit and leaves all other input bitrates untouched.

Last edited by thomaz909; 13th August 2017 at 18:06.
thomaz909 is offline  
Old 13th August 2017, 18:06   #14340  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
It already works like this, I believe. Can you provide any example (sample file + log) where it doesn't?
sneaker_ger is offline  
Closed Thread

Tags
eac3to

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


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