Author Topic: DRC and Normalization  (Read 316 times)

RoadRanger

  • Jr. Member
  • **
  • Posts: 57
DRC and Normalization
« on: March 01, 2018, 03:20:03 AM »
Do these options just look at the segment you are saving or the entire file? I don't see them working as expected :( . My input file is a 4 hour 12GB+ MTS file with AC-3 audio and I'm outputting to AAC, just a one minute segment at the moment. I'm using the nightly build from yesterday I think...
« Last Edit: March 01, 2018, 03:46:01 AM by RoadRanger »

RoadRanger

  • Jr. Member
  • **
  • Posts: 57
Re: DRC and Normalization
« Reply #1 on: March 01, 2018, 03:39:54 AM »
OK, verbalizing the problem led me to discover that the normalization looks at the ENTIRE input file and not just the segment being saved. How is this not a bug? In any case I can work around it for now...
« Last Edit: March 01, 2018, 03:46:38 AM by RoadRanger »

RoadRanger

  • Jr. Member
  • **
  • Posts: 57
Re: DRC and Normalization
« Reply #2 on: March 01, 2018, 03:45:23 AM »
Looking in the project file I see:
adm.audioSetDrc(0, 1)
adm.audioSetNormalize(0, 1, 10)

Is there a description of those parameters anywhere?

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1947
Re: DRC and Normalization
« Reply #3 on: March 01, 2018, 01:00:04 PM »
https://github.com/mean00/avidemux2/blob/master/avidemux_plugins/ADM_scriptEngines/tinyPy/src/ADM_pyAvidemux.h

Replace "audio" with "py". "gain100" is likely a typo (a harmless one), ADM_GAINMode is defined in https://github.com/mean00/avidemux2/blob/master/avidemux_core/ADM_coreAudioFilter/include/audiofilter_normalize_param.h.

So it is the first audio track, the mode is automatic, 1dB max (which is ignored in automatic mode and the hardcoded value of -3dB is used).

In audioSetDrc(0,1) the first parameter is the track, the second means DRC is enabled.

OK, verbalizing the problem led me to discover that the normalization looks at the ENTIRE input file and not just the segment being saved. How is this not a bug?

In most cases, saving different segments of a singe video and getting totally different, incompatible audio levels is not desirable. For your unusual use case, first save the chunk you are interested in in copy mode, then save it again with audio filter enabled.

RoadRanger

  • Jr. Member
  • **
  • Posts: 57
Re: DRC and Normalization
« Reply #4 on: March 02, 2018, 05:29:56 AM »
In most cases, saving different segments of a singe video and getting totally different, incompatible audio levels is not desirable. For your unusual use case, first save the chunk you are interested in in copy mode, then save it again with audio filter enabled.
Thanks for the explanation - and yes, that's my "workaround" :) .

RoadRanger

  • Jr. Member
  • **
  • Posts: 57
Re: DRC and Normalization
« Reply #5 on: March 02, 2018, 05:51:45 AM »
OTOH about a year ago I asked if Avidemux could someday support the "dynaudnorm" filter in FFMPEG as that seems to work a whole lot better than DRC + normalization for my band videos? I specifically need/use "-af dynaudnorm=b=1:n=0" :) . I record with a manual fixed gain that's fairly low so that I won't get any clipping...