Author Topic: Automatic gain mode problem  (Read 259 times)

TCmullet

  • Full Member
  • ***
  • Posts: 109
Automatic gain mode problem
« on: August 27, 2018, 03:33:04 AM »
When I reencode audio, it's to AAC (lav).  (I wish I knew a reason to pick lav vs FDK; I can't seem to find any documentation about that issue.  But I am using lav and it seems to be okay.)  There are times I need to boost the audio.  As there is no GUI for seeing the waveform, I can't boost a fixed db as then I'd have to export to .wav and load to a wav editor to SEE whether my guess of boost db was appropriate.  If not okay, then try another value.
 This wastes scads of time.  But when I use automatic, it maxs out at -3db. As the peaks I have are rather transient and severe, the overall effect is to not boost it ENOUGH.  I would like the ability to use some other maximum value, such as -1 or 0.  Maybe even a plus value.  Is the -3 stored in the registry somewhere?  I am very comfortable making registry changes as long as the labels and values straight forward.  Isn't there a list somewhere of ALL settings that are configurable in the registry but not settable within the Avidemux GUI?  There should be, IMHO.  (Or if not, then make this "auto gain" a user configurable setting.  ANY db value for Max should be settable, please.)

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6052
Re: Automatic gain mode problem
« Reply #1 on: August 27, 2018, 05:22:07 AM »
or you could use:
- Latest Version of Audacity
- FFmpeg import/export library <= required
–– Allows Audacity to import and export many additional audio formats such as AC3, AMR(NB), M4A and WMA, and to import audio from video files.
Then just drag and drop on to audacity canvas

apply filter
- normalize 0 dB
- Amplify

export

TCmullet

  • Full Member
  • ***
  • Posts: 109
Re: Automatic gain mode problem
« Reply #2 on: August 27, 2018, 03:44:11 PM »
It's all those extra steps (and they are very time consuming) that I'm trying to avoid and wish to avoid by having Avidemux allow control over that hard -3db value.

What I have to do now is actually easier than Audacity.  Avidemux-->export to wav.  Load wav to my fav Cooledit, Normalize.  Import back to Avidemux. SO much more work than audio-reencode WITHIN Avidemux.  (My files are huge, and there are many of them. so each of these numerous steps is big and they add up.  They add up so badly that I often am forced to decide NOT to improve the sound simply due to lack of adequate time.)  The -3db really should be configurable, whether in the GUI, an .ini file, or a registry entry.  So easy to implement, yet would save SO much time.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2290
Re: Automatic gain mode problem
« Reply #3 on: August 27, 2018, 06:28:59 PM »
While they are not, you could get the desired higher value instantly by modifying the line avidemux/common/ADM_audioFilter/src/audiofilter_normalize.cpp:142 accordingly and building Avidemux from source. This is trivial on Ubuntu and easy on any other current Linux distribution. This is considerably more complicated on Mac and almost unfeasible on Windows (Avidemux for Windows is cross-compiled on Linux).

TCmullet

  • Full Member
  • ***
  • Posts: 109
Re: Automatic gain mode problem
« Reply #4 on: August 28, 2018, 05:42:24 AM »
I have VS 2008 and could get VS 2010 (or whatever the current one is).  If ADM exists as a VS solution (.sln) already and I could plop it in, make the one line change and compile, I'd do it.  But beyond that, I'm not able.  I really hope you'll make this very valuable addition to Avidemux, esp. as conceptually, it should be a very simple addition, once you can decide on which way you want to store the auto-db value.  (Any way you can store it and allow us to set it and leave it set for all our runs would be very acceptable.)

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2290
Re: Automatic gain mode problem
« Reply #5 on: August 28, 2018, 09:13:19 AM »
conceptually, it should be a very simple addition

[audioFilter/normalize] Make max level in automatic gain mode customizable

But the merge will be probably reverted as the necessary scripting API change breaks compatibility to existing project scripts and people will face ugly tinyPy error dialogs popping up.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6052
Max level Automatic gain mode
« Reply #6 on: August 28, 2018, 10:14:53 AM »
Max level in automatic gain mode customizable by eumagga0x2a:

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2290
Re: Automatic gain mode problem
« Reply #7 on: August 28, 2018, 10:54:54 AM »
The problem is that all project scripts created with earlier Avidemux versions (practically all, including the currently latest official nightlies) which include audio filter normalize will trigger an error message and won't load properly.