Skip to content

Commit 42e9832

Browse files
committed
docs: convert options to headlines
1 parent b3d09fe commit 42e9832

1 file changed

Lines changed: 166 additions & 88 deletions

File tree

docs/usage/options.md

Lines changed: 166 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -2,190 +2,268 @@
22

33
## File Input/Output
44

5-
- `input`: Input media file(s)
5+
### `input`
66

7-
- `-o OUTPUT [OUTPUT ...], --output OUTPUT [OUTPUT ...]`: Output file names.
7+
Input media file(s)
88

9-
Will be applied per input file.
9+
### `-o OUTPUT [OUTPUT ...], --output OUTPUT [OUTPUT ...]`
1010

11-
If no output file name is specified for an input file, the output files
12-
will be written to the default output folder with the name `<input>.<ext>`, where `<ext>` is the output extension (see `-ext` option).
11+
Output file names.
1312

14-
Example: `ffmpeg-normalize 1.wav 2.wav -o 1n.wav 2n.wav`
13+
Will be applied per input file.
1514

16-
- `-of OUTPUT_FOLDER, --output-folder OUTPUT_FOLDER`: Output folder (default: `normalized`)
15+
If no output file name is specified for an input file, the output files
16+
will be written to the default output folder with the name `<input>.<ext>`, where `<ext>` is the output extension (see `-ext` option).
1717

18-
This folder will be used for input files that have no explicit output name specified.
18+
Example: `ffmpeg-normalize 1.wav 2.wav -o 1n.wav 2n.wav`
19+
20+
### `-of OUTPUT_FOLDER, --output-folder OUTPUT_FOLDER`
21+
22+
Output folder (default: `normalized`)
23+
24+
This folder will be used for input files that have no explicit output name specified.
1925

2026
## General
2127

22-
- `-f, --force`: Force overwrite existing files
28+
### `-f, --force`
29+
30+
Force overwrite existing files
31+
32+
### `-d, --debug`
33+
34+
Print debugging output
35+
36+
### `-v, --verbose`
37+
38+
Print verbose output
39+
40+
### `-q, --quiet`
41+
42+
Only print errors
2343

24-
- `-d, --debug`: Print debugging output
44+
### `-n, --dry-run`
2545

26-
- `-v, --verbose`: Print verbose output
46+
Do not run normalization, only print what would be done
2747

28-
- `-q, --quiet`: Only print errors
48+
### `-pr`, `--progress`
2949

30-
- `-n, --dry-run`: Do not run normalization, only print what would be done
50+
Show progress bar for files and streams
3151

32-
- `-pr`, `--progress`: Show progress bar for files and streams
52+
### `--version`
3353

34-
- `--version`: Print version and exit
54+
Print version and exit
3555

3656
## Normalization
3757

38-
- `-nt {ebu,rms,peak}, --normalization-type {ebu,rms,peak}`: Normalization type (default: `ebu`).
58+
### `-nt {ebu,rms,peak}, --normalization-type {ebu,rms,peak}`
3959

40-
EBU normalization performs two passes and normalizes according to EBU R128.
60+
Normalization type (default: `ebu`).
4161

42-
RMS-based normalization brings the input file to the specified RMS level.
62+
EBU normalization performs two passes and normalizes according to EBU R128.
4363

44-
Peak normalization brings the signal to the specified peak level.
64+
RMS-based normalization brings the input file to the specified RMS level.
4565

46-
- `-t TARGET_LEVEL, --target-level TARGET_LEVEL`: Normalization target level in dB/LUFS (default: -23).
66+
Peak normalization brings the signal to the specified peak level.
4767

48-
For EBU normalization, it corresponds to Integrated Loudness Target in LUFS. The range is -70.0 - -5.0.
68+
### `-t TARGET_LEVEL, --target-level TARGET_LEVEL`
4969

50-
Otherwise, the range is -99 to 0.
70+
Normalization target level in dB/LUFS (default: -23).
5171

52-
- `-p, --print-stats`: Print loudness statistics for both passes formatted as JSON to stdout.
72+
For EBU normalization, it corresponds to Integrated Loudness Target in LUFS. The range is -70.0 - -5.0.
5373

54-
- `--replaygain`: Write [ReplayGain](https://en.wikipedia.org/wiki/ReplayGain) tags to the original file without normalizing.
74+
Otherwise, the range is -99 to 0.
5575

56-
This mode will overwrite the input file and ignore other options.
76+
### `-p, --print-stats`
5777

58-
Only works with EBU normalization, and only with .mp3, .mp4/.m4a, .ogg, .opus for now.
78+
Print loudness statistics for both passes formatted as JSON to stdout.
79+
80+
### `--replaygain`
81+
82+
Write [ReplayGain](https://en.wikipedia.org/wiki/ReplayGain) tags to the original file without normalizing.
83+
84+
This mode will overwrite the input file and ignore other options.
85+
86+
Only works with EBU normalization, and only with .mp3, .mp4/.m4a, .ogg, .opus for now.
5987

6088
## EBU R128 Normalization
6189

62-
- `-lrt LOUDNESS_RANGE_TARGET, --loudness-range-target LOUDNESS_RANGE_TARGET`: EBU Loudness Range Target in LUFS (default: 7.0).
90+
### `-lrt LOUDNESS_RANGE_TARGET, --loudness-range-target LOUDNESS_RANGE_TARGET`
91+
92+
EBU Loudness Range Target in LUFS (default: 7.0).
93+
94+
Range is 1.0 - 50.0.
95+
96+
### `--keep-loudness-range-target`
97+
98+
Keep the input loudness range target to allow for linear normalization.
99+
100+
### `--keep-lra-above-loudness-range-target`
101+
102+
Keep input loudness range above loudness range target.
63103

64-
Range is 1.0 - 50.0.
104+
Can be used as an alternative to `--keep-loudness-range-target` to allow for linear normalization.
65105

66-
- `--keep-loudness-range-target`: Keep the input loudness range target to allow for linear normalization.
106+
### `-tp TRUE_PEAK, --true-peak TRUE_PEAK`
67107

68-
- `--keep-lra-above-loudness-range-target`: Keep input loudness range above loudness range target.
108+
EBU Maximum True Peak in dBTP (default: -2.0).
69109

70-
Can be used as an alternative to `--keep-loudness-range-target` to allow for linear normalization.
110+
Range is -9.0 - +0.0.
71111

72-
- `-tp TRUE_PEAK, --true-peak TRUE_PEAK`: EBU Maximum True Peak in dBTP (default: -2.0).
112+
### `--offset OFFSET`
73113

74-
Range is -9.0 - +0.0.
114+
EBU Offset Gain (default: 0.0).
75115

76-
- `--offset OFFSET`: EBU Offset Gain (default: 0.0).
116+
The gain is applied before the true-peak limiter in the first pass only. The offset for the second pass will be automatically determined based on the first pass statistics.
77117

78-
The gain is applied before the true-peak limiter in the first pass only. The offset for the second pass will be automatically determined based on the first pass statistics.
118+
Range is -99.0 - +99.0.
79119

80-
Range is -99.0 - +99.0.
120+
### `--lower-only`
81121

82-
- `--lower-only`: Whether the audio should not increase in loudness.
122+
Whether the audio should not increase in loudness.
83123

84-
If the measured loudness from the first pass is lower than the target loudness then normalization pass will be skipped for the measured audio source.
124+
If the measured loudness from the first pass is lower than the target loudness then normalization pass will be skipped for the measured audio source.
85125

86-
- `--auto-lower-loudness-target`: Automatically lower EBU Integrated Loudness Target.
126+
### `--auto-lower-loudness-target`
87127

88-
Automatically lower EBU Integrated Loudness Target to prevent falling back to dynamic filtering.
128+
Automatically lower EBU Integrated Loudness Target.
89129

90-
Makes sure target loudness is lower than measured loudness minus peak loudness (input_i - input_tp) by a small amount.
130+
Automatically lower EBU Integrated Loudness Target to prevent falling back to dynamic filtering.
91131

92-
- `--dual-mono`: Treat mono input files as "dual-mono".
132+
Makes sure target loudness is lower than measured loudness minus peak loudness (input_i - input_tp) by a small amount.
93133

94-
If a mono file is intended for playback on a stereo system, its EBU R128 measurement will be perceptually incorrect. If set, this option will compensate for this effect. Multi-channel input files are not affected by this option.
134+
### `--dual-mono`
95135

96-
- `--dynamic`: Force dynamic normalization mode.
136+
Treat mono input files as "dual-mono".
97137

98-
Instead of applying linear EBU R128 normalization, choose a dynamic normalization. This is not usually recommended.
138+
If a mono file is intended for playback on a stereo system, its EBU R128 measurement will be perceptually incorrect. If set, this option will compensate for this effect. Multi-channel input files are not affected by this option.
99139

100-
Dynamic mode will automatically change the sample rate to 192 kHz. Use `-ar`/`--sample-rate` to specify a different output sample rate.
140+
### `--dynamic`
141+
142+
Force dynamic normalization mode.
143+
144+
Instead of applying linear EBU R128 normalization, choose a dynamic normalization. This is not usually recommended.
145+
146+
Dynamic mode will automatically change the sample rate to 192 kHz. Use `-ar`/`--sample-rate` to specify a different output sample rate.
101147

102148
## Audio Encoding
103149

104-
- `-c:a AUDIO_CODEC, --audio-codec AUDIO_CODEC`: Audio codec to use for output files.
150+
### `-c:a AUDIO_CODEC, --audio-codec AUDIO_CODEC`
151+
152+
Audio codec to use for output files.
153+
154+
See `ffmpeg -encoders` for a list.
155+
156+
Will use PCM audio with input stream bit depth by default.
157+
158+
### `-b:a AUDIO_BITRATE, --audio-bitrate AUDIO_BITRATE`
159+
160+
Audio bitrate in bits/s, or with K suffix.
161+
162+
If not specified, will use codec default.
163+
164+
### `-ar SAMPLE_RATE, --sample-rate SAMPLE_RATE`
105165

106-
See `ffmpeg -encoders` for a list.
166+
Audio sample rate to use for output files in Hz.
107167

108-
Will use PCM audio with input stream bit depth by default.
168+
Will use input sample rate by default, except for EBU normalization, which will change the input sample rate to 192 kHz.
109169

110-
- `-b:a AUDIO_BITRATE, --audio-bitrate AUDIO_BITRATE`: Audio bitrate in bits/s, or with K suffix.
170+
### `-ac`, `--audio-channels`
111171

112-
If not specified, will use codec default.
172+
Set the number of audio channels. If not specified, the input channel layout will be used. This is equivalent to `-ac` in ffmpeg.
113173

114-
- `-ar SAMPLE_RATE, --sample-rate SAMPLE_RATE`: Audio sample rate to use for output files in Hz.
174+
### `-koa, --keep-original-audio`
115175

116-
Will use input sample rate by default, except for EBU normalization, which will change the input sample rate to 192 kHz.
176+
Copy original, non-normalized audio streams to output file
117177

118-
- `-ac`, `--audio-channels`: Set the number of audio channels. If not specified, the input channel layout will be used. This is equivalent to `-ac` in ffmpeg.
178+
### `-prf PRE_FILTER, --pre-filter PRE_FILTER`
119179

120-
- `-koa, --keep-original-audio`: Copy original, non-normalized audio streams to output file
180+
Add an audio filter chain before applying normalization.
121181

122-
- `-prf PRE_FILTER, --pre-filter PRE_FILTER`: Add an audio filter chain before applying normalization.
182+
Multiple filters can be specified by comma-separating them.
123183

124-
Multiple filters can be specified by comma-separating them.
184+
### `-pof POST_FILTER, --post-filter POST_FILTER`
125185

126-
- `-pof POST_FILTER, --post-filter POST_FILTER`: Add an audio filter chain after applying normalization.
186+
Add an audio filter chain after applying normalization.
127187

128-
Multiple filters can be specified by comma-separating them.
188+
Multiple filters can be specified by comma-separating them.
129189

130-
For EBU, the filter will be applied during the second pass.
190+
For EBU, the filter will be applied during the second pass.
131191

132192
## Other Encoding Options
133193

134-
- `-vn, --video-disable`: Do not write video streams to output
194+
### `-vn, --video-disable`
135195

136-
- `-c:v VIDEO_CODEC, --video-codec VIDEO_CODEC`: Video codec to use for output files (default: 'copy').
196+
Do not write video streams to output
137197

138-
See `ffmpeg -encoders` for a list.
198+
### `-c:v VIDEO_CODEC, --video-codec VIDEO_CODEC`
139199

140-
Will attempt to copy video codec by default.
200+
Video codec to use for output files (default: 'copy').
141201

142-
- `-sn, --subtitle-disable`: Do not write subtitle streams to output
202+
See `ffmpeg -encoders` for a list.
143203

144-
- `-mn, --metadata-disable`: Do not write metadata to output
204+
Will attempt to copy video codec by default.
145205

146-
- `-cn, --chapters-disable`: Do not write chapters to output
206+
### `-sn, --subtitle-disable`
207+
208+
Do not write subtitle streams to output
209+
210+
### `-mn, --metadata-disable`
211+
212+
Do not write metadata to output
213+
214+
### `-cn, --chapters-disable`
215+
216+
Do not write chapters to output
147217

148218
## Input/Output Format
149219

150-
- `-ei EXTRA_INPUT_OPTIONS, --extra-input-options EXTRA_INPUT_OPTIONS`: Extra input options list.
220+
### `-ei EXTRA_INPUT_OPTIONS, --extra-input-options EXTRA_INPUT_OPTIONS`
221+
222+
Extra input options list.
223+
224+
A list of extra ffmpeg command line arguments valid for the input, applied before ffmpeg's `-i`.
225+
226+
You can either use a JSON-formatted list (i.e., a list of comma-separated, quoted elements within square brackets), or a simple string of space-separated arguments.
227+
228+
If JSON is used, you need to wrap the whole argument in quotes to prevent shell expansion and to preserve literal quotes inside the string. If a simple string is used, you need to specify the argument with `-e=`.
151229

152-
A list of extra ffmpeg command line arguments valid for the input, applied before ffmpeg's `-i`.
230+
Examples: `-ei '[ "-f", "mpegts", "-r", "24" ]'` or `-ei="-f mpegts -r 24"`
153231

154-
You can either use a JSON-formatted list (i.e., a list of comma-separated, quoted elements within square brackets), or a simple string of space-separated arguments.
232+
### `-e EXTRA_OUTPUT_OPTIONS, --extra-output-options EXTRA_OUTPUT_OPTIONS`
155233

156-
If JSON is used, you need to wrap the whole argument in quotes to prevent shell expansion and to preserve literal quotes inside the string. If a simple string is used, you need to specify the argument with `-e=`.
234+
Extra output options list.
157235

158-
Examples: `-ei '[ "-f", "mpegts", "-r", "24" ]'` or `-ei="-f mpegts -r 24"`
236+
A list of extra ffmpeg command line arguments valid for the output.
159237

160-
- `-e EXTRA_OUTPUT_OPTIONS, --extra-output-options EXTRA_OUTPUT_OPTIONS`: Extra output options list.
238+
You can either use a JSON-formatted list (i.e., a list of comma-separated, quoted elements within square brackets), or a simple string of space-separated arguments.
161239

162-
A list of extra ffmpeg command line arguments valid for the output.
240+
If JSON is used, you need to wrap the whole argument in quotes to prevent shell expansion and to preserve literal quotes inside the string. If a simple string is used, you need to specify the argument with `-e=`.
163241

164-
You can either use a JSON-formatted list (i.e., a list of comma-separated, quoted elements within square brackets), or a simple string of space-separated arguments.
242+
Examples: `-e '[ "-vbr", "3", "-preset:v", "ultrafast" ]'` or `-e="-vbr 3 -preset:v ultrafast"`
165243

166-
If JSON is used, you need to wrap the whole argument in quotes to prevent shell expansion and to preserve literal quotes inside the string. If a simple string is used, you need to specify the argument with `-e=`.
244+
### `-ofmt OUTPUT_FORMAT, --output-format OUTPUT_FORMAT`
167245

168-
Examples: `-e '[ "-vbr", "3", "-preset:v", "ultrafast" ]'` or `-e="-vbr 3 -preset:v ultrafast"`
246+
Media format to use for output file(s).
169247

170-
- `-ofmt OUTPUT_FORMAT, --output-format OUTPUT_FORMAT`: Media format to use for output file(s).
248+
See `ffmpeg -formats` for a list.
171249

172-
See `ffmpeg -formats` for a list.
250+
If not specified, the format will be inferred by ffmpeg from the output file name. If the output file name is not explicitly specified, the extension will govern the format (see '--extension' option).
173251

174-
If not specified, the format will be inferred by ffmpeg from the output file name. If the output file name is not explicitly specified, the extension will govern the format (see '--extension' option).
252+
### `-ext EXTENSION, --extension EXTENSION`
175253

176-
- `-ext EXTENSION, --extension EXTENSION`: Output file extension to use for output files that were not explicitly specified. (Default: `mkv`)
254+
Output file extension to use for output files that were not explicitly specified. (Default: `mkv`)
177255

178256
## Environment Variables
179257

180258
The program additionally respects environment variables:
181259

182-
- `TMP` / `TEMP` / `TMPDIR`
260+
### `TMP` / `TEMP` / `TMPDIR`
183261

184-
Sets the path to the temporary directory in which files are
185-
stored before being moved to the final output directory.
186-
Note: You need to use full paths.
262+
Sets the path to the temporary directory in which files are
263+
stored before being moved to the final output directory.
264+
Note: You need to use full paths.
187265

188-
- `FFMPEG_PATH`
266+
### `FFMPEG_PATH`
189267

190-
Sets the full path to an `ffmpeg` executable other than
191-
the system default or you can provide a file name available on $PATH
268+
Sets the full path to an `ffmpeg` executable other than
269+
the system default or you can provide a file name available on $PATH

0 commit comments

Comments
 (0)