Skip to content

Commit bf69491

Browse files
committed
docs: update default concat method
also runs formatting on the md file
1 parent 7da9b1d commit bf69491

1 file changed

Lines changed: 100 additions & 101 deletions

File tree

site/src/Cli/encoding.md

Lines changed: 100 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
# Encoding
22

3-
Name | Flag | Type | Default
4-
--- | --- | --- | ---
5-
[Encoder](#encoder--e---encoder) | `-e`, `--encoder` | `ENCODER` | `svt-av1`
6-
[Video Parameters](#video-parameters--v---video-params) | `-v`, `--video-params` | String List | Based on Encoder
7-
[Passes](#passes--p---passes) | `-p`, `--passes` | Integer | 1
8-
[Tile Auto](#tile-auto---tile-auto) | `--tile-auto` ||
9-
[FFmpeg Parameters](#ffmpeg-filter-arguments--f---ffmpeg) | `-f`, `--ffmpeg` | String |
10-
[Audio Parameters](#audio-parameters--a---audio-params) | `-a`, `--audio-params` | String |
11-
[Ignore Frame Mismatch](#ignore-frame-mismatch---ignore-frame-mismatch) | `--ignore-frame-mismatch` |
12-
[Chunk Method](#chunk-method--m---chunk-method) | `-m`, `--chunk-method` | `CHUNK_METHOD` | `lsmash`
13-
[Chunk Order](#chunk-order---chunk-order) | `--chunk-order` | `CHUNK_ORDER` | `long-to-short`
14-
[Photon Noise](#photon-noise---photon-noise) | `--photon-noise` | Integer |
15-
[Chroma Noise](#chroma-noise---chroma-noise) | `--chroma-noise` ||
16-
[Photon Noise Width](#photon-noise-width---photon-noise-width) |`--photon-noise-width` | Integer |
17-
[Photon Noise Height](#photon-noise-height---photon-noise-height) | `--photon-noise-height` | Integer |
18-
[Concatenation Method](#concatenation-method--c---concat) | `-c`, `--concat` | `CONCAT` | `ffmpeg`
19-
[Pixel Format](#pixel-format---pix-format) | `--pix-format` | `PIX_FORMAT` | `yuv420p10le`
20-
[Zones](#zones---zones) | `-z`, `--zones` | Path |
3+
| Name | Flag | Type | Default |
4+
| ----------------------------------------------------------------------- | ------------------------- | -------------- | ---------------- |
5+
| [Encoder](#encoder--e---encoder) | `-e`, `--encoder` | `ENCODER` | `svt-av1` |
6+
| [Video Parameters](#video-parameters--v---video-params) | `-v`, `--video-params` | String List | Based on Encoder |
7+
| [Passes](#passes--p---passes) | `-p`, `--passes` | Integer | 1 |
8+
| [Tile Auto](#tile-auto---tile-auto) | `--tile-auto` | |
9+
| [FFmpeg Parameters](#ffmpeg-filter-arguments--f---ffmpeg) | `-f`, `--ffmpeg` | String |
10+
| [Audio Parameters](#audio-parameters--a---audio-params) | `-a`, `--audio-params` | String |
11+
| [Ignore Frame Mismatch](#ignore-frame-mismatch---ignore-frame-mismatch) | `--ignore-frame-mismatch` |
12+
| [Chunk Method](#chunk-method--m---chunk-method) | `-m`, `--chunk-method` | `CHUNK_METHOD` | `lsmash` |
13+
| [Chunk Order](#chunk-order---chunk-order) | `--chunk-order` | `CHUNK_ORDER` | `long-to-short` |
14+
| [Photon Noise](#photon-noise---photon-noise) | `--photon-noise` | Integer |
15+
| [Chroma Noise](#chroma-noise---chroma-noise) | `--chroma-noise` | |
16+
| [Photon Noise Width](#photon-noise-width---photon-noise-width) | `--photon-noise-width` | Integer |
17+
| [Photon Noise Height](#photon-noise-height---photon-noise-height) | `--photon-noise-height` | Integer |
18+
| [Concatenation Method](#concatenation-method--c---concat) | `-c`, `--concat` | `CONCAT` | `mkvmerge` |
19+
| [Pixel Format](#pixel-format---pix-format) | `--pix-format` | `PIX_FORMAT` | `yuv420p10le` |
20+
| [Zones](#zones---zones) | `-z`, `--zones` | Path |
2121

2222
## Encoder `-e`, `--encoder`
2323

2424
Video encoder to use.
2525

2626
### Possible Values
2727

28-
* `aom` - [aomenc](https://aomedia.googlesource.com/aom/)
29-
* `rav1e` - [rav1e](https://github.com/xiph/rav1e)
30-
* `vpx` - [vpxenc](https://chromium.googlesource.com/webm/libvpx/)
31-
* `svt-av1` - [SvtAv1EncApp](https://gitlab.com/AOMediaCodec/SVT-AV1)
32-
* `x264` - [x264](https://www.videolan.org/developers/x264.html)
33-
* `x265` - [x265](https://www.videolan.org/developers/x265.html)
28+
- `aom` - [aomenc](https://aomedia.googlesource.com/aom/)
29+
- `rav1e` - [rav1e](https://github.com/xiph/rav1e)
30+
- `vpx` - [vpxenc](https://chromium.googlesource.com/webm/libvpx/)
31+
- `svt-av1` - [SvtAv1EncApp](https://gitlab.com/AOMediaCodec/SVT-AV1)
32+
- `x264` - [x264](https://www.videolan.org/developers/x264.html)
33+
- `x265` - [x265](https://www.videolan.org/developers/x265.html)
3434

3535
### Default
3636

@@ -72,9 +72,8 @@ Any of the valid FFmpeg [Video Filter Options](https://ffmpeg.org/ffmpeg.html#Vi
7272

7373
### Examples
7474

75-
* `> av1an -i input.mkv -o output.mkv -f "-vf crop=100:100:100:100"` - Crops the video by 100 pixels from the top, left, bottom, and right
76-
* `> av1an -i input.mkv -o output.mkv -f "-vf scale=1920:1080"` - Scales the video to 1920x1080
77-
75+
- `> av1an -i input.mkv -o output.mkv -f "-vf crop=100:100:100:100"` - Crops the video by 100 pixels from the top, left, bottom, and right
76+
- `> av1an -i input.mkv -o output.mkv -f "-vf scale=1920:1080"` - Scales the video to 1920x1080
7877

7978
## Audio Parameters `-a`, `--audio-params`
8079

@@ -94,8 +93,8 @@ If not specified, `-c:a copy` is used.
9493

9594
### Examples
9695

97-
* `> av1an -i input.mkv -o output.mkv -a "-c:a libopus -b:a 128k"` - Encodes all audio tracks with [libopus][ffmpeg-libopus] at 128k
98-
* `> av1an -i input.mkv -o output.mkv --audio-params "-c:a:0 libopus -b:a:0 128k -c:a:1 aac -ac:a:1 1 -b:a:1 24k"` - Encodes the first audio track with [libopus][ffmpeg-libopus] at 128k and the second audio track with [aac][ffmpeg-aac] at 24k and downmixed to a single channel
96+
- `> av1an -i input.mkv -o output.mkv -a "-c:a libopus -b:a 128k"` - Encodes all audio tracks with [libopus][ffmpeg-libopus] at 128k
97+
- `> av1an -i input.mkv -o output.mkv --audio-params "-c:a:0 libopus -b:a:0 128k -c:a:1 aac -ac:a:1 1 -b:a:1 24k"` - Encodes the first audio track with [libopus][ffmpeg-libopus] at 128k and the second audio track with [aac][ffmpeg-aac] at 24k and downmixed to a single channel
9998

10099
## Ignore Frame Mismatch `--ignore-frame-mismatch`
101100

@@ -109,77 +108,77 @@ Some methods require external VapourSynth plugins to be installed. The rest only
109108

110109
### Possible Values
111110

112-
* `lsmash` - [L-SMASH-Works](https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works)
113-
* Requires VapourSynth plugin
114-
* Generally the best and most accurate method
115-
* Does not require intermediate files
116-
* Errors generally only occur if the input file itself is broken (for example, if the video bitstream is invalid in some way, video players usually try to recover from the errors as much as possible even if it results in visible artifacts, while lsmash will instead throw an error)
117-
* `ffms2` - [FFmpegSource](https://github.com/FFMS/ffms2)
118-
* Requires VapourSynth plugin
119-
* Accurate
120-
* Slightly faster than lsmash for y4m input
121-
* Does not require intermediate files
122-
* Can sometimes have bizarre bugs that are not present in lsmash (that can cause artifacts in the piped output)
123-
* `dgdecnv` - [DGDecNV](https://www.rationalqm.us/dgdecnv/dgdecnv.html)
124-
* Requires VapourSynth plugin
125-
* Requires `dgindexnv` to be present in system path
126-
* Requires an NVIDIA GPU that supports CUDA video decoding
127-
* Very fast but only decodes AVC, HEVC, MPEG-2, and VC1
128-
* `bestsource` - [BestSource](https://github.com/vapoursynth/bestsource)
129-
* Requires VapourSynth plugin
130-
* Slow but most accurate
131-
* Linearly decodes input files
132-
* Does not require intermediate files
133-
* `hybrid` - Hybrid (Segment + Select)
134-
* Requires FFmpeg
135-
* Usually accurate but requires intermediate files (which can be large)
136-
* Avoids decoding irrelevant frames by seeking to the first keyframe before the requested frame and decoding only a (usually very small) number of irrelevant frames until relevant frames are decoded and piped to the encoder
137-
* `select` - Select
138-
* Requires FFmpeg
139-
* Extremely slow, but accurate
140-
* Does not require intermediate files
141-
* Decodes from the first frame to the requested frame, without skipping irrelevant frames (causing quadratic decoding complexity)
142-
* `segment` - Segment
143-
* Requires FFmpeg
144-
* Create chunks based on keyframes in the source
145-
* Not frame exact, as it can only split on keyframes in the source
146-
* Requires intermediate files (which can be large)
111+
- `lsmash` - [L-SMASH-Works](https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works)
112+
- Requires VapourSynth plugin
113+
- Generally the best and most accurate method
114+
- Does not require intermediate files
115+
- Errors generally only occur if the input file itself is broken (for example, if the video bitstream is invalid in some way, video players usually try to recover from the errors as much as possible even if it results in visible artifacts, while lsmash will instead throw an error)
116+
- `ffms2` - [FFmpegSource](https://github.com/FFMS/ffms2)
117+
- Requires VapourSynth plugin
118+
- Accurate
119+
- Slightly faster than lsmash for y4m input
120+
- Does not require intermediate files
121+
- Can sometimes have bizarre bugs that are not present in lsmash (that can cause artifacts in the piped output)
122+
- `dgdecnv` - [DGDecNV](https://www.rationalqm.us/dgdecnv/dgdecnv.html)
123+
- Requires VapourSynth plugin
124+
- Requires `dgindexnv` to be present in system path
125+
- Requires an NVIDIA GPU that supports CUDA video decoding
126+
- Very fast but only decodes AVC, HEVC, MPEG-2, and VC1
127+
- `bestsource` - [BestSource](https://github.com/vapoursynth/bestsource)
128+
- Requires VapourSynth plugin
129+
- Slow but most accurate
130+
- Linearly decodes input files
131+
- Does not require intermediate files
132+
- `hybrid` - Hybrid (Segment + Select)
133+
- Requires FFmpeg
134+
- Usually accurate but requires intermediate files (which can be large)
135+
- Avoids decoding irrelevant frames by seeking to the first keyframe before the requested frame and decoding only a (usually very small) number of irrelevant frames until relevant frames are decoded and piped to the encoder
136+
- `select` - Select
137+
- Requires FFmpeg
138+
- Extremely slow, but accurate
139+
- Does not require intermediate files
140+
- Decodes from the first frame to the requested frame, without skipping irrelevant frames (causing quadratic decoding complexity)
141+
- `segment` - Segment
142+
- Requires FFmpeg
143+
- Create chunks based on keyframes in the source
144+
- Not frame exact, as it can only split on keyframes in the source
145+
- Requires intermediate files (which can be large)
147146

148147
### Default
149148

150149
If not specified, the first available method is used in this order:
151150

152-
* `lsmash`
153-
* `ffms2`
154-
* `dgdecnv`
155-
* `bestsource`
156-
* `hybrid`
151+
- `lsmash`
152+
- `ffms2`
153+
- `dgdecnv`
154+
- `bestsource`
155+
- `hybrid`
157156

158157
### Examples
159158

160-
* `> av1an -i input.mkv -o output.mkv -m lsmash` - Use L-SMASH-Works for chunking
161-
* `> av1an -i input.mkv -o output.mkv -m ffms2` - Use FFmpegSource for chunking
162-
* `> av1an -i input.mkv -o output.mkv -m hybrid` - Use hybrid for chunking
159+
- `> av1an -i input.mkv -o output.mkv -m lsmash` - Use L-SMASH-Works for chunking
160+
- `> av1an -i input.mkv -o output.mkv -m ffms2` - Use FFmpegSource for chunking
161+
- `> av1an -i input.mkv -o output.mkv -m hybrid` - Use hybrid for chunking
163162

164163
## Chunk Order `--chunk-order`
165164

166165
The order in which Av1an will encode chunks.
167166

168167
### Possible Values
169168

170-
* `long-to-short` - The longest chunks will be encoded first. This method results in the smallest amount of time with idle cores, as the encode will not be waiting on a very long chunk to finish at the end of the encode after all other chunks have finished.
171-
* `short-to-long` - The shortest chunks will be encoded first.
172-
* `sequential` - The chunks will be encoded in the order they appear in the video.
173-
* `random` - The chunks will be encoded in a random order. This will provide a more accurate estimated filesize sooner in the encode.
169+
- `long-to-short` - The longest chunks will be encoded first. This method results in the smallest amount of time with idle cores, as the encode will not be waiting on a very long chunk to finish at the end of the encode after all other chunks have finished.
170+
- `short-to-long` - The shortest chunks will be encoded first.
171+
- `sequential` - The chunks will be encoded in the order they appear in the video.
172+
- `random` - The chunks will be encoded in a random order. This will provide a more accurate estimated filesize sooner in the encode.
174173

175174
### Default
176175

177176
If not specified, `long-to-short` is used.
178177

179178
### Examples
180179

181-
* `> av1an -i input.mkv -o output.mkv --chunk-order short-to-long` - Encodes the shortest chunks first
182-
* `> av1an -i input.mkv -o output.mkv --chunk-order random` - Encodes the chunks in a random order
180+
- `> av1an -i input.mkv -o output.mkv --chunk-order short-to-long` - Encodes the shortest chunks first
181+
- `> av1an -i input.mkv -o output.mkv --chunk-order random` - Encodes the chunks in a random order
183182

184183
## Photon Noise `--photon-noise`
185184

@@ -199,8 +198,8 @@ If not specified, `0` is used.
199198

200199
### Examples
201200

202-
* `> av1an -i input.mkv -o output.mkv --photon-noise 1` - Applies a ISO 100 photon noise table
203-
* `> av1an -i input.mkv -o output.mkv --photon-noise 12` - Applies a ISO 1200 photon noise table
201+
- `> av1an -i input.mkv -o output.mkv --photon-noise 1` - Applies a ISO 100 photon noise table
202+
- `> av1an -i input.mkv -o output.mkv --photon-noise 12` - Applies a ISO 1200 photon noise table
204203

205204
## Chroma Noise `--chroma-noise`
206205

@@ -228,16 +227,16 @@ Determines method used for concatenating encoded chunks and audio into output fi
228227

229228
### Possible Values
230229

231-
* `ffmpeg` - FFmpeg
232-
* Unfortunately, ffmpeg sometimes produces file with partially broken audio seeking, so `mkvmerge` should generally be preferred if available. FFmpeg concatenation also produces broken files with the `--enable-keyframe filtering=2` option in aomenc, so it is disabled if that option is used. However, FFmpeg can mux into formats other than Matroska (`.mkv`), such as WebM. To output WebM, use a `.webm` extension in the output file.
233-
* `mkvmerge` - Matroska
234-
* Generally the best concatenation method (as it does not have either of the aforementioned issues that ffmpeg has), but can only produce matroska (.mkv) files. Requires mkvmerge to be installed.
235-
* `ivf` - IVF
236-
* Experimental concatenation method implemented in Av1an itself to concatenate to an IVF file (which only supports VP8, VP9, and AV1, and does not support audio).
230+
- `ffmpeg` - FFmpeg
231+
- Unfortunately, ffmpeg sometimes produces file with partially broken audio seeking, so `mkvmerge` should generally be preferred if available. FFmpeg concatenation also produces broken files with the `--enable-keyframe filtering=2` option in aomenc, so it is disabled if that option is used. However, FFmpeg can mux into formats other than Matroska (`.mkv`), such as WebM. To output WebM, use a `.webm` extension in the output file.
232+
- `mkvmerge` - Matroska
233+
- Generally the best concatenation method (as it does not have either of the aforementioned issues that ffmpeg has), but can only produce matroska (.mkv) files. Requires mkvmerge to be installed.
234+
- `ivf` - IVF
235+
- Experimental concatenation method implemented in Av1an itself to concatenate to an IVF file (which only supports VP8, VP9, and AV1, and does not support audio).
237236

238237
### Default
239238

240-
If not specified, `ffmpeg` is used.
239+
If not specified, `mkvmerge` is used.
241240

242241
## Pixel Format `--pix-format`
243242

@@ -249,9 +248,9 @@ Any valid pixel format name. See [FFmpeg](https://www.ffmpeg.org/doxygen/0.11/pi
249248

250249
### Examples
251250

252-
* `> av1an -i input.mkv -o output.mkv` - Use YUV420P10LE by default
253-
* `> av1an -i input.mkv -o output.mkv --pix-format yuv420p` - Use YUV420P
254-
* `> av1an -i input.mkv -o output.mkv --pix-format yuv444p` - Use YUV444P
251+
- `> av1an -i input.mkv -o output.mkv` - Use YUV420P10LE by default
252+
- `> av1an -i input.mkv -o output.mkv --pix-format yuv420p` - Use YUV420P
253+
- `> av1an -i input.mkv -o output.mkv --pix-format yuv444p` - Use YUV444P
255254

256255
### Default
257256

@@ -277,23 +276,23 @@ The `reset` keyword instructs Av1an to ignore any settings which affect the enco
277276

278277
The video parameters which may be specified include any parameters that are allowed by the encoder, as well as the following Av1an options:
279278

280-
* [Extra Split Frames](./scene_detection.md#extra-split-frames--x---extra-split) `-x`, `--extra-split`
281-
* [Minimum Scene Length](./scene_detection.md#minimum-scene-length---min-scene-len) `--min-scene-len`
282-
* [Passes](#passes--p---passes) `-p`, `--passes`
283-
* [Photon Noise](#photon-noise---photon-noise) `--photon-noise` (aomenc/rav1e/SvtAv1EncApp only)
284-
* [Photon Noise Width](#photon-noise-width---photon-noise-width) `--photon-noise-width` (aomenc/rav1e/SvtAv1EncApp only)
285-
* [Photon Noise Height](#photon-noise-height---photon-noise-height) `--photon-noise-height` (aomenc/rav1e/SvtAv1EncApp only)
286-
* [Chroma Noise](#chroma-noise---chroma-noise) `--chroma-noise` (aomenc/rav1e/SvtAv1EncApp only)
279+
- [Extra Split Frames](./scene_detection.md#extra-split-frames--x---extra-split) `-x`, `--extra-split`
280+
- [Minimum Scene Length](./scene_detection.md#minimum-scene-length---min-scene-len) `--min-scene-len`
281+
- [Passes](#passes--p---passes) `-p`, `--passes`
282+
- [Photon Noise](#photon-noise---photon-noise) `--photon-noise` (aomenc/rav1e/SvtAv1EncApp only)
283+
- [Photon Noise Width](#photon-noise-width---photon-noise-width) `--photon-noise-width` (aomenc/rav1e/SvtAv1EncApp only)
284+
- [Photon Noise Height](#photon-noise-height---photon-noise-height) `--photon-noise-height` (aomenc/rav1e/SvtAv1EncApp only)
285+
- [Chroma Noise](#chroma-noise---chroma-noise) `--chroma-noise` (aomenc/rav1e/SvtAv1EncApp only)
287286

288287
For segments where no zone is specified, the settings passed to av1an itself will be used.
289288

290-
291289
### Examples
292290

293-
* `> av1an -i input.mkv -o output.mkv --zones zones.txt` - Use the zones file `./zones.txt`
294-
* `> av1an -i input.mkv -o output.mkv --zones C:\custom\configuration\zones.txt` - Use the zones file `C:\custom\configuration\zones.txt`
291+
- `> av1an -i input.mkv -o output.mkv --zones zones.txt` - Use the zones file `./zones.txt`
292+
- `> av1an -i input.mkv -o output.mkv --zones C:\custom\configuration\zones.txt` - Use the zones file `C:\custom\configuration\zones.txt`
295293

296294
#### `./zones.txt`:
295+
297296
```
298297
136 169 aom --photon-noise 4 --cq-level=32
299298
169 1330 rav1e reset -s 3 -q 42
@@ -307,4 +306,4 @@ in Av1an, and append or overwrite the additional zone settings.
307306
Line 2 will encode frames 169-1329 using rav1e with only the arguments `-s 3 -q 42`.
308307

309308
[ffmpeg-libopus]: https://ffmpeg.org/ffmpeg-codecs.html#libopus-1
310-
[ffmpeg-aac]: https://ffmpeg.org/ffmpeg-codecs.html#aac
309+
[ffmpeg-aac]: https://ffmpeg.org/ffmpeg-codecs.html#aac

0 commit comments

Comments
 (0)