Equal Loudness Normalizing for a dvd soundtrack

The topic here on Replay Gain:

https://forum.audacityteam.org/t/replaygain/22589/1

references the plugin for Audacity to normalize loudness.

My goal is to make a usable guide for those who want to normalize audio from a dvd sound track
using advice given over time at videohelp.com with Audacity and other completely free tools. I have used one procedure with Goldwave to do normalization after having some difficulty with handling Replay Gain in native mode.

The thread title here announces the goal.

But I’ll be starting with Audacity from scratch and am not a pro user of sound tools.

If there is a guide for this technique let me know. A guide is a list of procedures. Please do not simply link to discussions.

What I have so far is

Audacity 2.03 installed to WinXP
LAME encoder found at Audacity downloads
An installer program for plugins called LADSPA which I do not know how to use
ReplayGain.ny

Which is related to Nyquist plugins-- again I know nothing.

Starting from the TS file from dvd (which my guide shows a preparation process from the
advisers at videohelp) I understand the the audio will first be extracted from the TS file set.

DGIndex is a tool to extract the audio.

Does this new version of Audacity with plugins do that as well?


That’s enough for this post. The goal for the guide is to show a process in simple steps.
Preparation of Audacity and use to Equal Loudness Normalizing and then Remux the new audio with the dvd (using Virtual Dub Mod) is the process requested. I have some of the technique for Virtual Dub mod already and have done the procedure once to completion.

My goal is to make a usable guide for those who want to normalize audio from a dvd sound track

On commercial DVDs, that requires cracking the encryption. We do not discuss that here!

An installer program for plugins called LADSPA which I do not know how to use
ReplayGain.ny

The Nyquist (.NY) plugins are different from the LADSPA plugins. I’ve used ReplayGain, but I’ve never tried the Audacity plug-in.

Note that the movie standard is 6 dB lower than the replay gain default of 89dB.

I have used one procedure with Goldwave to do normalization after having some difficulty with handling Replay Gain in native mode.

Goldwave can target an average level, but is not as good as ReplayGain (or EBU R128) beause it does not take human perception of the equal loudness curve into account.

after having some difficulty with handling Replay Gain in native mode.

I don’t know what native mode is… There are a couple of different ways of implimenting ReplayGain. The normal way is to “tag” the file with a ReplayGain adjustment. The actual audio data is not altered. A ReplayGain compatable player (such as Winamp) reads the tag and adjusts the volume during playback.

MP3gain does something similar, except it changes the standard volume-field in the MP3 frame/header so that a special player is not required, but the encoded audio data is not touched. (The “weakness” is that volume adjustments must be made in 1.5dB steps… And of course, it only works on MP3s and is of no use with DVDs.)

WAVgain directly changes the audio data (so again a special player is not required). That’s what Audacity is going to do and with DVDs, that’s the approach you have to take… You’ll have to adjust the actual audio volume, and if it’s AC3 you’ll have to re-compress.

DGIndex is a tool to extract the audio.

Does this new version of Audacity with plugins do that as well?

With the optional FFMPEG library, Audacity should be able to open the MPEG (.VOB) file and extract the AC3 audio. (LPCM audio shouldn’t require FFMPEG). You’ll also need the FFMPEG library to open AC3 extracted with a 3rd-party tool (unless the 3rd party tool decodes to WAV). If there are multiple audio tracks, you’ll (probably) need a demux tool to get them all.

My big question is… can you demux the audio, modify it, and then remux it without mucking-up the DVD structure? Can you keep the menus, subtitles, multiple audio tracks, etc? I’ve censored some DVDs and I had to create new menus and re-author.

I see I have another naming convention problem in the title since you brought it up:
Subject line would be Equal Loudness Normalizing for an AVI soundtrack.


Eventual output would be to AVI. No need here for multiple menus and subtitles. With this piece I had an encode made for the MKV standard and did not want the subtitles it seemed to hard code in using MakeMKV.

The work flow (I did manage to look up some of the Audacity manual but it does not show the technique for working with dvd hence video) is

Prepare the dvd (using those tools we won’t discuss.)
Demux the .VOB audio file from Video TS (or AVI)
Normalize the audio .VOB using an audio editor like Goldwave or Audacity with Replay gain
and increase overall volume which I saw has being low.

[in here I understand that working with a .WAV will be standard.]

Remux new audio to video
Enjoy without having to adjust volume constantly.

Right now I’m vague on where the AVI will be made in this sequence but the AVI should be the final output-- not a full dvd.

We could begin by saying I have the prepared TS folder.

I have Audacity.
The next step should be installing Replay Gain NY plugin correctly plus any other
plugins for this task.

Question: is the .NY Nyquist plugin installed to the NY Plugins folder or to Audacity Plugins?

Question: is the .NY Nyquist plugin installed to the NY Plugins folder or to Audacity Plugins?

Just copy ReplayGain.ny into your Plug-Ins folder with the other NY (and DLL) plugins. Then it should show-up in the Audacity Effect menu.

Enjoy without having to adjust volume constantly.

Hmmm… Constantly? ReplayGain makes ONE adjustment to the whole file. It does not reduce the dynamic range… ReplayGain is specifically designed NOT to mess-up the dynamics in music! If you are adjusting the volume during the movie, ReplayGain will NOT help at all. If you are adjusting the volume every time you start a new movie (or play a different song), ReplaGain is the answer.

If you want to keep the volume more-constant during a movie, dynamic compression (or automatic volume control, etc.) is the answer. There are compressor plug-ins for Audacity.

There is a Dynamic Range Control feature built into Dolby, and on your home theater receiver or (DVD playback software) you may have a “midnight” setting (or it might have a differnet name). But, it only works with Dolby soundtracks and a compatible player.

Ok this is helpful, though I may in the end use the normalization routine in Goldwave because I had success with it.

What then is the plugin for compression in Audacity? These two things are constanrly confusing.

From above we know that DGIndex will demux the audio from TS folder .VOB as I understand it.
(yes I’ve gone through it before but I’m still editing a long thread on it-- not a nice clean guide.)

How is this done in Audacity and what setup of the program is needed?

You can use the built-in Effect > Compressor but I do not recommend it if you need to document it in terms of explaining what it does.

Alternatively you can use Chris’s Compressor ( http://theaudacitytopodcast.com/chriss-dynamic-compressor-plugin-for-audacity/ ) which is a Nyquist plug-in like the replaygain.ny.

A DVD usually has multiple VOB files so unless you are directly editing the VOB’s you will probably want to demux the audio to a single audio file.

Audacity can import VOB files or demuxed audio if you install FFmpeg ( http://manual.audacityteam.org/o/man/faq_installation_and_plug_ins.html#ffdown ) .



Gale

Yes, this is something I would like to set up.

And I understand that normalization and compression are used interchangeably but incorrectly.

To do the entire job of this form of editing a movie track, there is assistance at videohelp.com and I can post the thread if there is interest. In that instructional thread one of the admins at videohelp also works with Audacity. I will find the link the poster has shown to set up Audacity to do this task.

If there is interest I can link to the topic. It only depends on if the Audacity community has not explored that and wants to do so. Nyquist is only familiar to me from loading VST plugins for audio that set up (IIRC) with Foobar2000.

Is there a tutorial or can we do that here? The goal is to use all free tools and perhaps write a guide which simplifies the procedure as steps rather than what usually is presented as meandering topic discussions. Please give how-to procedures rather than “leads.”

Recently I have learned that some guides are old and not very valuable WRT current tools available and so compiling a guide requires steps to follow.

I could envisage a Tutorial on our Wiki about using Audacity to edit audio from video files or DVD’s and replacing the audio on each. It’s something I have had in mind as a low priority aim for several years. I was not necessarily envisaging step-by-step help for completing the job in a particular video editor or DVD authoring app - rather explaining the Audacity part of the operation and giving pointers to the before and after steps.

I sense a complete tutorial giving all steps in all the software concerned could more properly be on Doom9 or a video help site. Which piece of software is more important in this process?

Nyquist and VST plug-ins are not related. No-one has mentioned VST in this thread before now.

Up to you if you want to write one - do you think this is better on the Audacity Wiki or on a video help site?

No-one here is offering to help with this tutorial of yours at the moment. This is a fringe activity to Audacity.

If you follow the pointers and encounter any problems in Audacity usage, let us know and we can help with that. After all if you cannot physically perform the steps yourself you cannot expect your readers to do so either. :wink:


Gale

Performing the steps can be a challenge. I do not work with editing every day or even every week. Properly done, the guide to fix sound in dvd movies would reside at videohelp. I go to them first and am not well acquainted with Doom9. But years ago I recall Doom9 was involved more with Linux

The guide is being roughed in. Then all these discussions will be filtered out for clarity.

My focus on these jobs is spoken word in recorded stage plays or filmed stage plays which are not the same thing.

In the example which follows (a long thread and again why a guide is needed) the film was directed from a stage play. Much of the discussion is actually pinpointing the problem: was it the dvd itself or a rip to avi which had all the problems?

The steps begin with anaylizing the source

The audio is teased out of the source: VIDEO TS folder called Demultiplexing or Demux

The audio is converted into a format usable by the editor

The audio is converted back for reintegration with the source called Remultiplexing or Remuxing and replacing the original.

This is all covered in a thread I started. Even so, after a year it is barely understandable and so I am engaged in another path of simplification. My earlier job is here:

http://forum.videohelp.com/threads/347485-How-to-reapir-audio-in-AVI

This job went to completion. It is not in guide form but two long ‘pages’ of postings.

It sounds like you want to write a complete tutorial mentioning all the steps with all the software of which Audacity may or may not be a part.

Nothing to do with us, I think, though we’ll help you to use Audacity in terms of import the audio, apply effects and export audio if you need that.


Gale

Nothing more is expected than the Audacity setup and procedure needed to do the Audio compression.

Previously I had used Goldwave which I bought more than ten years ago. I’ve used few of the functions but the Normalization routine is one of them. It’s not free ware though it is still in developement and will go to 64 bit Windows 7 development after the current release.

Yesterday I began reading the manual which is linked above and was mentioned at videohelp during the topic there.

I would ask this to begin: That guide mentioned a particular version of C++ needed to run Audacity and plugins. I have Audacity 2.03 the current version. I also have Microsoft c++ 10 on system. Is a particular version of the c++ distribution required to run the current Audacity?

I think the runtime library of C++ does not matter.
It is rather the compiler that isn’t supported or recommended that needs a special version.
VS 2008 (MS Windows) was for example widely recommended to build up Audacity (maybe it’s 2009 meanwhile) whereas VS 2010 has some bugs that doesn’t make it suitable.
However, I am no expert.

I strongly discourage asking your readers to compile Audacity. They can just download Audacity as you have done. If they just download Audacity, they don’t need to consider C++ or versions of Visual Studio.

The only possible consideration is that if Audacity does not launch after installation, they may need to install the 32-bit or 64-bit Microsoft Visual C++ 2008 SP1 Redistributable Package . Audacity already supplies the needed DLL’s in its own installation folder and Windows should find them there. The point of the package is only to place these DLL’s in a Windows system folder so that Windows can find them if it cannot see them in the Audacity installation folder.

If you meant DirectX this is included in Windows already and Audacity does not depend on any particular version of it.

As previously explained (if you now require compression rather than ReplayGain) it may be better to recommend Chris’ Compressor to your readers than the Audacity built-in Compressor.


Gale

Yes I did not mean to go through compiling code but wanted to confirm that your how-to for the 2008 c++ was accurate. I simply went to Microsoft and got it to make it part of my file list.

For those who have interest in doing this audio technique, I will be using something available in DGIndex which is a tool that is free and has a DRC routine as a trial run. Alternatively I’ll use the
technique given for Goldwave.

For Audacity I’ll leave it there for now if no DRC routine (that is dynamic range compression) of a WAV or MP3 is available.

The videohelp tutorial will continue.

The thread on that can be seen here:

http://forum.videohelp.com/threads/356570-Use-Auto-GK-or-DGIndex-to-Demux-to-MP3-or-WAV?p=2247186#post2247186

This is Audacity’s built-in dynamic range compressor: http://manual.audacityteam.org/o/man/compressor.html

There are also several optional plug-ins for Audacity that perform dynamic range compression, including:
Chris’s dynamic range compressor
(1.2.7 beta - open source version: https://forum.audacityteam.org/t/chris-capels-dynamic-compressor/20241/1 )
(1.2.6 - free but not GPL compatible version: http://theaudacitytopodcast.com/chriss-dynamic-compressor-plugin-for-audacity/)

AGC (Automatic Gain Control)
Broadcast Limiter II
Broadcast Limiter III
Hyperexp
Limiter
Limiter (2)
Brick Wall Limiter
Classic Compressor 1.17 (VST effect for Windows)

The one that I would recommend for “Equal Loudness Normalizing for a dvd soundtrack” would be the 1.2.6 version of Chris’s Compressor because it is very simple to use and does a very good job. (you would probably want to increase the “Amount of compression” control up to about 0.7 or 0.8 but the other controls can be left at their default values).

Thanks for adding to this. I actually was mistaken in thinking Chris’s Compressor had something to do with Goldwave yet since that is the developers name at Goldwave.

I am back and had success using Goldwave for the task that I’d now like to put to Audacity.

All of the other alchemy to separate audio and video and such is covered at videohelp.

To this point I have the current Audacity 2.03 (June 2013)
I have installed LAME 3.99 for Audacity.

We have settled on talking about Dynamic Range Compression (DRC)? Replay Gain remains inscrutable to me. However I had success using Goldwave’s Effects under Expander/Compressor and I’m writing this to ask how Audacity would do these effects:

Boost quiet parts
Lower loud parts

These two phrases are the names of prepared presets. The task was to get the spoken word up (meaning I didn’t have put everything on max to hear the words) and lower the loud parts of musical interludes especially a rousing dance number at the finale.

What ehnancements and plugins are needed to do DRC then?
If I start with Chris’s Compression plugin is that an all in one solution for the types of things above?

I have made some progress on this topic.

Chris’s Compressor is installed in Audacity. A how to is apparently on a podcast but I prefer written info and there were as I recall some dead links.

while doing that I found a software in as Freeware (most easily obtained from CNET as it is no longer developed) named with the catchy title The Levelator.

The Levelator was made and released as Freeware but no longer in development. It was made specifically for podcasts to balance different voice microphones for level matching. This has worked well with my project. Loud drumming and trumpet fanfares at scene changes are suppressed. I did not have to do any volume changing once a good level was found, overall level was raised.

More importantly there is no distortion in human speech which I started to hear with trying to raise the ‘floor’ and lower loud parts in Goldwave.

I have another test AVI in mind which is an anime with lots of firepower and explosions. Will see what The Levelator does with that one for late night viewing.

Here is a bit on The Levelator:

https://en.wikipedia.org/wiki/Levelator

Now for my Audacity question: Since The Levelator does Compression, Normalization and Limiting all at once, how would these things be broken down into discreet operations in Audacity? Example: is there a particular order of operation for each element? Perhaps a new topic called Compression, Normalization and Limiting etc.

The short answer:
Use Chris’s dynamic compressor (version 1.2.6): “Amount of compression” control up to about 0.7 or 0.8 (higher for more compression) the other controls left at their default values.

The long answer is a course in sound engineering :wink: but here are some starting points:
http://manual.audacityteam.org/o/man/compressor.html
http://wiki.audacityteam.org/wiki/Compressor
http://www.soundonsound.com/sos/sep09/articles/compressioneasyaudio.htm
http://www.soundonsound.com/sos/dec00/articles/adcompression.htm
http://www.soundonsound.com/sos/jan01/articles/advanced.asp

Ok. There’s also an Audacity book at my library-- circa 2011.