History

avfilter/af_dynaudnorm: add more descriptive aliases for options

Paul B Mahol committed 7 years ago

Commit 73afea31 parent a081a6d2 files · +27 −18Browse files

Unified · Split

2 files
  1. doc/filters.texi +9 −9
  2. libavfilter/af_dynaudnorm.c +18 −9
doc/filters.texi+9−9
@@ -3135,7 +3135,7 @@ this goal *without* applying "dynamic range compressing". It will retain 100% · 3134 unmodified lines
3135of the dynamic range *within* each section of the audio file.3135of the dynamic range *within* each section of the audio file.
3136 3136
3137@table @option3137@table @option
3138@item f3138@item framelen, f
3139Set the frame length in milliseconds. In range from 10 to 8000 milliseconds.3139Set the frame length in milliseconds. In range from 10 to 8000 milliseconds.
3140Default is 500 milliseconds.3140Default is 500 milliseconds.
3141The Dynamic Audio Normalizer processes the input audio in small chunks,3141The Dynamic Audio Normalizer processes the input audio in small chunks,
@@ -3150,7 +3150,7 @@ been found to give good results with most files. · 8 unmodified lines
3150Note that the exact frame length, in number of samples, will be determined3150Note that the exact frame length, in number of samples, will be determined
3151automatically, based on the sampling rate of the individual input audio file.3151automatically, based on the sampling rate of the individual input audio file.
3152 3152
3153@item g3153@item gausssize, g
3154Set the Gaussian filter window size. In range from 3 to 301, must be odd3154Set the Gaussian filter window size. In range from 3 to 301, must be odd
3155number. Default is 31.3155number. Default is 31.
3156Probably the most important parameter of the Dynamic Audio Normalizer is the3156Probably the most important parameter of the Dynamic Audio Normalizer is the
@@ -3167,7 +3167,7 @@ Normalizer will behave like a "traditional" normalization filter. On the · 10 unmodified lines
3167contrary, the more you decrease this value, the more the Dynamic Audio3167contrary, the more you decrease this value, the more the Dynamic Audio
3168Normalizer will behave like a dynamic range compressor.3168Normalizer will behave like a dynamic range compressor.
3169 3169
3170@item p3170@item peak, p
3171Set the target peak value. This specifies the highest permissible magnitude3171Set the target peak value. This specifies the highest permissible magnitude
3172level for the normalized audio input. This filter will try to approach the3172level for the normalized audio input. This filter will try to approach the
3173target peak magnitude as closely as possible, but at the same time it also3173target peak magnitude as closely as possible, but at the same time it also
@@ -3176,7 +3176,7 @@ A frame's maximum local gain factor is imposed directly by the target peak · 2 unmodified lines
3176magnitude. The default value is 0.95 and thus leaves a headroom of 5%*.3176magnitude. The default value is 0.95 and thus leaves a headroom of 5%*.
3177It is not recommended to go above this value.3177It is not recommended to go above this value.
3178 3178
3179@item m3179@item maxgain, m
3180Set the maximum gain factor. In range from 1.0 to 100.0. Default is 10.0.3180Set the maximum gain factor. In range from 1.0 to 100.0. Default is 10.0.
3181The Dynamic Audio Normalizer determines the maximum possible (local) gain3181The Dynamic Audio Normalizer determines the maximum possible (local) gain
3182factor for each input frame, i.e. the maximum gain factor that does not3182factor for each input frame, i.e. the maximum gain factor that does not
@@ -3194,7 +3194,7 @@ Instead, a "sigmoid" threshold function will be applied. This way, the · 11 unmodified lines
3194gain factors will smoothly approach the threshold value, but never exceed that3194gain factors will smoothly approach the threshold value, but never exceed that
3195value.3195value.
3196 3196
3197@item r3197@item targetrms, r
3198Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 - disabled.3198Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 - disabled.
3199By default, the Dynamic Audio Normalizer performs "peak" normalization.3199By default, the Dynamic Audio Normalizer performs "peak" normalization.
3200This means that the maximum local gain factor for each frame is defined3200This means that the maximum local gain factor for each frame is defined
@@ -3212,7 +3212,7 @@ factor is defined as the factor that would result in exactly that RMS value. · 11 unmodified lines
3212Note, however, that the maximum local gain factor is still restricted by the3212Note, however, that the maximum local gain factor is still restricted by the
3213frame's highest magnitude sample, in order to prevent clipping.3213frame's highest magnitude sample, in order to prevent clipping.
3214 3214
3215@item n3215@item coupling, n
3216Enable channels coupling. By default is enabled.3216Enable channels coupling. By default is enabled.
3217By default, the Dynamic Audio Normalizer will amplify all channels by the same3217By default, the Dynamic Audio Normalizer will amplify all channels by the same
3218amount. This means the same gain factor will be applied to all channels, i.e.3218amount. This means the same gain factor will be applied to all channels, i.e.
@@ -3224,7 +3224,7 @@ the gain factor will be determined independently for each channel, depending · 5 unmodified lines
3224only on the individual channel's highest magnitude sample. This allows for3224only on the individual channel's highest magnitude sample. This allows for
3225harmonizing the volume of the different channels.3225harmonizing the volume of the different channels.
3226 3226
3227@item c3227@item correctdc, c
3228Enable DC bias correction. By default is disabled.3228Enable DC bias correction. By default is disabled.
3229An audio signal (in the time domain) is a sequence of sample values.3229An audio signal (in the time domain) is a sequence of sample values.
3230In the Dynamic Audio Normalizer these sample values are represented in the3230In the Dynamic Audio Normalizer these sample values are represented in the
@@ -3243,7 +3243,7 @@ are centered around 0.0 again. Also, in order to avoid "gaps" at the frame · 12 unmodified lines
3243boundaries, the DC correction offset values will be interpolated smoothly3243boundaries, the DC correction offset values will be interpolated smoothly
3244between neighbouring frames.3244between neighbouring frames.
3245 3245
3246@item b3246@item altboundary, b
3247Enable alternative boundary mode. By default is disabled.3247Enable alternative boundary mode. By default is disabled.
3248The Dynamic Audio Normalizer takes into account a certain neighbourhood3248The Dynamic Audio Normalizer takes into account a certain neighbourhood
3249around each frame. This includes the preceding frames as well as the3249around each frame. This includes the preceding frames as well as the
@@ -3258,7 +3258,7 @@ to deal with this situation. The default boundary mode assumes a gain factor · 8 unmodified lines
3258of exactly 1.0 for the missing frames, resulting in a smooth "fade in" and3258of exactly 1.0 for the missing frames, resulting in a smooth "fade in" and
3259"fade out" at the beginning and at the end of the input, respectively.3259"fade out" at the beginning and at the end of the input, respectively.
3260 3260
3261@item s3261@item compress, s
3262Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.3262Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
3263By default, the Dynamic Audio Normalizer does not apply "traditional"3263By default, the Dynamic Audio Normalizer does not apply "traditional"
3264compression. This means that signal peaks will not be pruned and thus the3264compression. This means that signal peaks will not be pruned and thus the
libavfilter/af_dynaudnorm.c+18−9
@@ -82,15 +82,24 @@ typedef struct DynamicAudioNormalizerContext { · 81 unmodified lines
82#define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM82#define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
83 83
84static const AVOption dynaudnorm_options[] = {84static const AVOption dynaudnorm_options[] = {
85 { "f", "set the frame length in msec", OFFSET(frame_len_msec), AV_OPT_TYPE_INT, {.i64 = 500}, 10, 8000, FLAGS },85 { "framelen", "set the frame length in msec", OFFSET(frame_len_msec), AV_OPT_TYPE_INT, {.i64 = 500}, 10, 8000, FLAGS },
86 { "g", "set the filter size", OFFSET(filter_size), AV_OPT_TYPE_INT, {.i64 = 31}, 3, 301, FLAGS },86 { "f", "set the frame length in msec", OFFSET(frame_len_msec), AV_OPT_TYPE_INT, {.i64 = 500}, 10, 8000, FLAGS },
87 { "p", "set the peak value", OFFSET(peak_value), AV_OPT_TYPE_DOUBLE, {.dbl = 0.95}, 0.0, 1.0, FLAGS },87 { "gausssize", "set the filter size", OFFSET(filter_size), AV_OPT_TYPE_INT, {.i64 = 31}, 3, 301, FLAGS },
88 { "m", "set the max amplification", OFFSET(max_amplification), AV_OPT_TYPE_DOUBLE, {.dbl = 10.0}, 1.0, 100.0, FLAGS },88 { "g", "set the filter size", OFFSET(filter_size), AV_OPT_TYPE_INT, {.i64 = 31}, 3, 301, FLAGS },
89 { "r", "set the target RMS", OFFSET(target_rms), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 1.0, FLAGS },89 { "peak", "set the peak value", OFFSET(peak_value), AV_OPT_TYPE_DOUBLE, {.dbl = 0.95}, 0.0, 1.0, FLAGS },
90 { "n", "set channel coupling", OFFSET(channels_coupled), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },90 { "p", "set the peak value", OFFSET(peak_value), AV_OPT_TYPE_DOUBLE, {.dbl = 0.95}, 0.0, 1.0, FLAGS },
91 { "c", "set DC correction", OFFSET(dc_correction), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },91 { "maxgain", "set the max amplification", OFFSET(max_amplification), AV_OPT_TYPE_DOUBLE, {.dbl = 10.0}, 1.0, 100.0, FLAGS },
92 { "b", "set alternative boundary mode", OFFSET(alt_boundary_mode), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },92 { "m", "set the max amplification", OFFSET(max_amplification), AV_OPT_TYPE_DOUBLE, {.dbl = 10.0}, 1.0, 100.0, FLAGS },
93 { "s", "set the compress factor", OFFSET(compress_factor), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 30.0, FLAGS },93 { "targetrms", "set the target RMS", OFFSET(target_rms), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 1.0, FLAGS },
94 { "r", "set the target RMS", OFFSET(target_rms), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 1.0, FLAGS },
95 { "coupling", "set channel coupling", OFFSET(channels_coupled), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },
96 { "n", "set channel coupling", OFFSET(channels_coupled), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },
97 { "correctdc", "set DC correction", OFFSET(dc_correction), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
98 { "c", "set DC correction", OFFSET(dc_correction), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
99 { "altboundary", "set alternative boundary mode", OFFSET(alt_boundary_mode), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
100 { "b", "set alternative boundary mode", OFFSET(alt_boundary_mode), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
101 { "compress", "set the compress factor", OFFSET(compress_factor), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 30.0, FLAGS },
102 { "s", "set the compress factor", OFFSET(compress_factor), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 30.0, FLAGS },
94 { NULL }103 { NULL }
95};104};
96 105

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t