Aomenc: Difference between revisions

From wiki.selur.net
Jump to navigation Jump to search
VMAF tune works with the shipped aomenc (via update-page on MediaWiki MCP Server)
VMAF tune on all systems (via update-page on MediaWiki MCP Server)
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:


== Requirements ==
== Requirements ==
aomenc is part of Hybrid. Hybrid offers 8- and 10-bit 4:2:0 in the ''Main'' profile, which is what practically all AV1 decoders support; the profiles ''High'' and ''Professional'' change the offered color sampling and bit depth. The aomenc that comes with Hybrid on Windows is built with VMAF support (libvmaf) and the model <code>vmaf_v0.6.1.json</code>; on other systems the VMAF tune needs an aomenc built with VMAF support.
aomenc is part of Hybrid. Hybrid offers 8- and 10-bit 4:2:0 in the ''Main'' profile, which is what practically all AV1 decoders support; the profiles ''High'' and ''Professional'' change the offered color sampling and bit depth. The aomenc that comes with Hybrid (Windows, Linux AppImage, macOS bundle) is built with VMAF support (libvmaf) and ships the model <code>vmaf_v0.6.1.json</code>; a different aomenc needs VMAF support for the VMAF tune.


== Settings ==
== Settings ==
Line 69: Line 69:
| Profile || --profile || Main, High, Professional || Main || AV1 profile (0, 1, 2). Main covers 8/10-bit 4:2:0, High adds 4:4:4, Professional adds 4:2:2 and 12 bit. The choice changes what ''Color sampling'' and ''In-Output bit-depth'' offer: Main gives i420, High i444, Professional i422 and, with 12-bit, all three.
| Profile || --profile || Main, High, Professional || Main || AV1 profile (0, 1, 2). Main covers 8/10-bit 4:2:0, High adds 4:4:4, Professional adds 4:2:2 and 12 bit. The choice changes what ''Color sampling'' and ''In-Output bit-depth'' offer: Main gives i420, High i444, Professional i422 and, with 12-bit, all three.
|-
|-
| Tune || --tune || none, PSNR, SSIM, VMAF || none || Metric the encoder's decisions are optimized for. With VMAF Hybrid also passes the VMAF model that comes with it (<code>--vmaf-model-path</code>, Windows); aomenc then computes VMAF while encoding, which is noticeably slower.
| Tune || --tune || none, PSNR, SSIM, VMAF || none || Metric the encoder's decisions are optimized for. With VMAF Hybrid also passes the VMAF model that comes with it (<code>--vmaf-model-path</code>); aomenc then computes VMAF while encoding, which is noticeably slower.
|}
|}



Latest revision as of 08:18, 23 November 2026

aomenc is the command line encoder of libaom, the AV1 reference encoder of the Alliance for Open Media. AV1 is a royalty-free format that compresses clearly better than H.264 and competes with HEVC; libaom implements all of its coding tools and is slow in return. Hybrid exposes most of aomenc's options, including the switches for the single AV1 coding tools.

Base → Video: aomenc, then the aomenc tab

What it does

AV1 splits each frame into superblocks of 64×64 or 128×128 pixels and these into partitions down to 4×4. Every block is predicted from its neighbours (intra) or from up to seven reference frames (inter), optionally by combining two predictions (compound); what is left is transformed, quantized and entropy coded. Three in-loop filters (deblocking, CDEF, loop restoration) clean up the result. aomenc builds its groups of frames around golden and alternate reference frames: frames coded at higher quality, partly filtered over time and not shown themselves, which the other frames of the group refer to.

The rate control modes Hybrid offers:

  • specific filesize/bitrate (2-pass): a first pass analyses the video, the second distributes a given bit rate or file size over it. The two single-pass entries run only that pass.
  • constrained quality (2-pass or 1-pass): a quality level with an upper limit for the bit rate. The usual choice when no size has to be hit.
  • average bitrate (1-pass): one pass towards a bit rate, variable or constant.
  • constant quantizer (1-pass): one quality level for the whole video without any rate limit.
  • lossless (1-pass): the decoded video is identical to what the encoder received.

Most switches on the Advanced and Misc tabs turn single coding tools off. Turning a tool off makes encoding faster and compression worse; aomenc's own defaults, which Hybrid follows, have nearly all of them on.

Requirements

aomenc is part of Hybrid. Hybrid offers 8- and 10-bit 4:2:0 in the Main profile, which is what practically all AV1 decoders support; the profiles High and Professional change the offered color sampling and bit depth. The aomenc that comes with Hybrid (Windows, Linux AppImage, macOS bundle) is built with VMAF support (libvmaf) and ships the model vmaf_v0.6.1.json; a different aomenc needs VMAF support for the VMAF tune.

Settings

The option column shows the aomenc option a control ends up as. Several controls are only written or only available in some encoding modes; the tables name the conditions.

Base

aomenc Base tab
aomenc Base tab

General Settings

Control aomenc option Range / values Hybrid default Meaning
Encoding mode --passes, --pass, --end-usage, --lossless specific filesize/bitrate (2-pass), 2pass - 1st pass, 2pass - 2nd pass, constrained quality (2-pass), average bitrate (1-pass), constant quantizer (1-pass), constrained quality (1-pass), lossless (1-pass) specific filesize/bitrate (2-pass) Rate control mode, see above. Constrained quality is written as --end-usage=cq, constant quantizer as --end-usage=q, lossless as --lossless=1 --end-usage=q with both quantizer limits at 0. The rows below the mode change with it.
Target mode – custom, 1/4 CD … 1 BD 50 custom Predefined file sizes for the 2-pass bit rate mode; custom lets you enter size or bit rate yourself.
Target size (MiB) --target-bitrate 0.2 MiB and up off, 700 Aim at a file size: Hybrid computes the video bit rate from the size, the length and the size of audio and other streams. Only with the 2-pass bit rate modes.
Bitrate (kbit/s) --target-bitrate 16 – 245760 on, 1500 Target bit rate of the bit rate based modes.
Bitrate mode --end-usage VBR, CBR VBR Variable or constant bit rate. CBR is meant for streaming over a link with fixed capacity and is only offered in the average bitrate (1-pass) mode; the 2-pass modes always use VBR.
Quantizer level --cq-level 0 – 63 10 Quality level of the constant quantizer and constrained quality modes; lower is better and bigger. Shown instead of the bit rate rows in these modes.
Maximum rate --target-bitrate 16 – 245760 15000 Upper limit for the bit rate (kbit/s) in the constrained quality modes: the encoder keeps the quality level as long as the rate stays below it. Locked in constant quantizer mode.

Speed/Multithreading

Control aomenc option Range / values Hybrid default Meaning
CPU utilization modifier --cpu-used 0 – 6 0 The speed setting and the most important switch for encoding time: 0 is the slowest and best, each step is noticeably faster and compresses a little worse. 0 – 6 is the range of aomenc's good-quality mode, which Hybrid uses.
Frame MT --fp-mt on/off off Frame parallel multi-threading: several frames are encoded at once, which scales better with many threads.
Threads --threads 0 – 64 0 Upper limit for the number of threads; the encoder may use fewer. 0 makes Hybrid pass twice the number of detected CPUs, at most 64.
Row MT --row-mt on/off on Row based multi-threading inside a tile; on in aomenc by default.
good quality deadline --good on/off off Explicitly selects aomenc's good-quality usage, which is also what it uses when nothing is given.
Tile (columns/rows) --tile-columns, --tile-rows 0 – 6 / 0 – 2 0 / 0 Splits the frame into independently coded tiles; the values are log2, so 2 means 4 columns. Tiles help multi-threaded encoding and decoding and cost a little compression. The row value is only available while Threads is 0.

Codec, Speed and Complexity

Control aomenc option Range / values Hybrid default Meaning
Codec – AV1 AV1 The codec aomenc encodes; AV1 is the only one.
Profile --profile Main, High, Professional Main AV1 profile (0, 1, 2). Main covers 8/10-bit 4:2:0, High adds 4:4:4, Professional adds 4:2:2 and 12 bit. The choice changes what Color sampling and In-Output bit-depth offer: Main gives i420, High i444, Professional i422 and, with 12-bit, all three.
Tune --tune none, PSNR, SSIM, VMAF none Metric the encoder's decisions are optimized for. With VMAF Hybrid also passes the VMAF model that comes with it (--vmaf-model-path); aomenc then computes VMAF while encoding, which is noticeably slower.

Format

Control aomenc option Range / values Hybrid default Meaning
In-Output bit-depth --input-bit-depth, --bit-depth 8-bit, 10-bit (12-bit with Professional) 8-bit Bit depth of the video that is fed to aomenc and of the stream. Hybrid converts the source to it if necessary. 10 bit reduces banding even for 8-bit sources.
Color sampling --i420, --i422, --i444 depends on the profile i420 Chroma format of input and output.

Frame

aomenc Frame tab
aomenc Frame tab

Keyframe Placement

Control aomenc option Range / values Hybrid default Meaning
Forward key frames --enable-fwd-kf on/off off Allows forward reference key frames: a key frame that is coded ahead of the frames shown before it, so that these can refer to it.
Max reference frames --max-reference-frames 3 – 7 7 How many reference frames a frame may use. Fewer makes encoding faster and compression worse.
GOP size min/max --kf-min-dist, --kf-max-dist 0 – 10000 each 0 / 250 Shortest and longest distance between key frames in frames. Key frames are the points a player can seek to; a larger maximum saves bits and makes seeking coarser.
Pyramid height (max) --kf-max-pyr-height -1 – 5 -1 Limits the height of the frame pyramid in the group that starts with a key frame. -1 has no effect; otherwise the lower one of this value and the maximum on the Golden Frames side is used.

Golden Frames

Control aomenc option Range / values Hybrid default Meaning
Golden frame cbr boost --gf-cbr-boost 0 – 1000 0 Extra bits for golden frames in percent. Only written, and only unlocked, when Bitrate mode is CBR.
Golden frame dist (min/max) --min-gf-interval, --max-gf-interval 0 – 1000 each 0 / 0 Shortest and longest distance between golden/alternate reference frames. 0 leaves the choice to the encoder.
Pyramid height (min/max) --gf-min-pyr-height, --gf-max-pyr-height 0 – 5 each 0 / 5 Lowest and highest number of layers of the frame pyramid inside a golden frame group. A higher pyramid compresses better; a lower one reduces the frame reordering.

Advanced Frame Settings

Control aomenc option Range / values Hybrid default Meaning
Temporal key frame filtering --enable-keyframe-filtering on/off on Filters key frames over time before coding them, which makes them a better reference for the following frames.
Overlay frames --enable-overlay on/off on Allows overlay frames, the shown counterpart of a filtered alternate reference frame.
Parallel decoding --frame-parallel on/off off Codes the frames so that a decoder can decode several of them in parallel; costs some compression.
Max frames to lag --lag-in-frames 0 – 250 25 How many frames the encoder may look ahead before it has to output a frame. The lookahead is what makes alternate reference frames and the temporal dependency model possible; 0 switches it off and is only for low-latency use.
Frame drop (%) --drop-frame 0 – 99 0 Lets the encoder drop frames when the buffer fill falls below this percentage. 0 never drops frames; keep it for anything but real-time streaming.
Min compression ratio --min-cr 0 – 100 0 If not 0, the encoder tries to keep the compression ratio of every frame above this value divided by 100. Locked in lossless mode.
Stereo mode --stereo-mode none, left-right, bottom-top, right-left off, none Flags the stream as 3D and states how the two views are packed. The picture itself is not changed.
use reduced reference set --reduced-reference-set on/off off Uses a smaller set of single and compound reference combinations; faster, slightly worse.

Quantization/Filtering

aomenc Quantization/Filtering tab
aomenc Quantization/Filtering tab

Quantization

Control aomenc option Range / values Hybrid default Meaning
Quantizer min/max --min-q, --max-q 0 – 63 each 1 / 63 Best and worst quantizer the rate control may use. Written in the bit rate and constrained quality modes; locked in constant quantizer and lossless mode.
Adaptive quantization --aq-mode none, variance, complexity, cyclic refresh variance Shifts bits between the areas of a frame (modes 0 – 3). aomenc's own default is off. Not written and locked in constant quantizer and lossless mode.
DeltaQ Mode --deltaq-mode off, deltaq objective, deltaq placeholder, key frame visual quality, user rating based visual quality, HDR video, variance boost deltaq objective Lets the quantizer vary per superblock (modes 0 – 6 in this order). deltaq objective uses the temporal dependency model; the option is only written, and only unlocked, with RDO based on temp. frame dependency on the Advanced tab.
DeltaQ Chroma --enable-chroma-deltaq on/off off Allows separate quantizer offsets for chroma.
DeltaQ Strength --deltaq-strength 0 – 1000 100 Strength in percent for the modes user rating based visual quality and variance boost; locked for the other modes.
Disable auto intra --auto-intra-tools-off on/off off Belongs to aomenc's all-intra delta-q mode, which is not among the offered ones; it has no effect on the call.
adaptive B quantizer --quant-b-adapt on/off on Uses the adaptive variant of the coefficient quantizer.
DCT: Intra only, Inter only --use-intra-dct-only, --use-inter-dct-only on/off each off / off Restricts intra or inter blocks to the plain DCT instead of searching all transform types. Faster, slightly worse.
Statistics file --fpf file empty First pass statistics file of the 2-pass modes; empty uses a temporary file.

Filter

Control aomenc option Range / values Hybrid default Meaning
dual filtering --enable-dual-filter on/off on Allows different interpolation filters for the horizontal and the vertical direction.
constrained directional enhancement --enable-cdef on/off on The CDEF in-loop filter, which removes ringing along edges while keeping the edges.
loop restoration --enable-restoration on/off on The loop restoration filter (Wiener and self-guided filter) that brings back detail lost in quantization. Costly for encoder and decoder.
intra edge --enable-intra-edge-filter on/off on Filters the neighbouring pixels an intra prediction is built from.
Sharpness --sharpness 0 – 7 0 Biases the coefficient decisions towards sharper blocks; in aomenc's all-intra mode it also reduces the filtering of block edges. 0 is the encoder's default.
Denoise (Level/Blocksize), Encode --denoise-noise-level, --denoise-block-size, --enable-dnl-denoising 0 – 50 / 2 – 128 / on/off 0 / 32 / off Film grain synthesis: with a level above 0 aomenc estimates the noise of the source and stores it as grain parameters, which the decoder adds again. Encode decides whether the encoder codes the denoised picture instead of the original. Block size and Encode are only available with a level above 0.

Noise reduction

Control aomenc option Range / values Hybrid default Meaning
Noise filtering --noise-sensitivity 0 – 6 0 aomenc's simple temporal noise filter (number of frames to blur). A denoising filter before the encoder gives better results.
Max noise reduction reference frame count --arnr-maxframes 0 – 15 7 How many frames are blended into an alternate reference frame. Only written when alternate reference frames are on (Advanced tab).
Max noise reduction reference strength --arnr-strength 0 – 6 5 Strength of the temporal filter for alternate reference frames. Only written when alternate reference frames are on.

Quantization Matrix

Control aomenc option Range / values Hybrid default Meaning
Quantization Matrix --enable-qm on/off off Uses quantization matrices, which quantize high frequencies more coarsely than low ones instead of treating all coefficients alike.
Min, Max --qm-min, --qm-max 0 – 15 each 5 / 9 Flatness range of the matrices; 15 is flat, lower levels are steeper. Only with Quantization Matrix.

Advanced

aomenc Advanced tab
aomenc Advanced tab

Rate Control

Control aomenc option Range / values Hybrid default Meaning
CBR <-> VBR frame adjust (%) --bias-pct 0 – 100 70 How the 2-pass rate control distributes bits between easy and hard parts: 0 leans to a constant, 100 to a fully variable bit rate. 2-pass modes only.
Section min/max (%) --minsection-pct, --maxsection-pct 1 – 10000 each 15 / 10000 Lowest and highest bit rate of a group of frames in percent of the target bit rate. 2-pass modes only.
Max rate for I/P frames (%) --max-intra-rate, --max-inter-rate 0 – 10000 each 0 / 0 Upper limit for the size of a single intra and inter frame in percent of the average frame size; 0 means no limit. Written in the bit rate based modes.
Super block size --sb-size dynamic, 64, 128 dynamic Size of the largest coding unit. dynamic lets aomenc choose by resolution and speed.
RDO based on temp. frame dependency --enable-tpl-model off, backward source based backward source based The temporal dependency model: blocks that many later frames depend on get more bits. Needed for the delta-q modes.
Alternate reference reduction frame decision --auto-alt-ref 0 – 6 1 Automatic alternate reference frames; 0 switches them off, and with them the two noise reduction reference options.

Compound

Compound prediction combines two predictions for one block. Each switch allows one way of doing so.

Control aomenc option Range / values Hybrid default Meaning
distance-weighted --enable-dist-wtd-comp on/off on Weights the two predictions by the distance of their reference frames instead of averaging them.
masked (wedge/diff-wtd) --enable-masked-comp on/off on Joins two predictions along a mask instead of blending them evenly; the master switch for the wedge and difference-weighted forms.
inter-intra --enable-interintra-comp on/off on Combines an inter with an intra prediction.
smooth inter-intra --enable-smooth-interintra on/off on The smooth blend between an inter and an intra prediction.
one sided --enable-onesided-comp on/off on Compound prediction from two reference frames that lie on the same side in time.
inter-inter wedge --enable-interinter-wedge on/off on Wedge-shaped mask between two inter predictions.
difference-weighted --enable-diff-wtd-comp on/off on Mask derived from the difference between the two predictions.
intra-inter wedge --enable-interintra-wedge on/off on Wedge-shaped mask between an inter and an intra prediction.

Predictions

Control aomenc option Range / values Hybrid default Meaning
smooth --enable-smooth-intra on/off on The smooth intra modes, which interpolate between the block edges.
Paeth --enable-paeth-intra on/off on The Paeth intra mode, which picks the best fitting neighbour per pixel.
filter --enable-filter-intra on/off on Recursive filter based intra prediction.
chroma from luma --enable-cfl-intra on/off on Predicts chroma from the reconstructed luma of the same block.
intra angle delta --enable-angle-delta on/off on Fine angle offsets for the directional intra modes.
diagonal --enable-diagonal-intra on/off on The diagonal directional intra modes (D45 to D203).
intra block copy prediction mode --enable-intrabc on/off on Copies a block from another place of the same frame. A screen content tool.
palette prediction mode --enable-palette on/off on Codes a block as a small color palette plus indices. A screen content tool.

Partitions

Control aomenc option Range / values Hybrid default Meaning
rectangular --enable-rect-partitions on/off on Allows non-square partitions.
AB --enable-ab-partitions on/off on Allows the AB shapes: one half of a block plus two quarters.
1to4 --enable-1to4-partitions on/off on Allows the narrow 1:4 and 4:1 partitions.
Partitions size (min/max) --min-partition-size, --max-partition-size 4x4, 8x8, 16x16, 32x32, 64x64, 128x128 each 4x4 / 128x128 Smallest and largest partition the search may use. A narrower range is faster and compresses worse. At 4K and above and at high speed settings aomenc uses at least 8 as the minimum.

Update frequency

Control aomenc option Range / values Hybrid default Meaning
Coefficient cost --coeff-cost-upd-freq SB, SB Row per Tile, Tile SB How often the cost table for coefficients is updated during the search: per superblock, per superblock row of a tile or per tile. More often is more precise and slower.
Mode cost --mode-cost-upd-freq SB, SB Row per Tile, Tile SB The same for the cost table of the prediction modes.
MV cost --mv-cost-upd-freq SB, SB Row per Tile, Tile SB The same for the cost table of the motion vectors.

Misc

aomenc Misc tab
aomenc Misc tab

Miscellaneous

Control aomenc option Range / values Hybrid default Meaning
Order hint --enable-order-hint on/off on Writes the display order of the frames into the stream. Several tools depend on it, e.g. distance-weighted compound and temporal motion vector prediction.
global motion --enable-global-motion on/off on Describes the motion of the whole frame (pan, zoom, rotation) once per reference frame.
64-pt transform --enable-tx64 on/off on Allows the 64-point transform, which helps in large flat areas. Fixed to on when Color sampling is not i420.
Reduce transform type set --reduced-tx-type-set on/off on Uses a reduced set of transform types instead of the full set of 16.
Default transform intra only --use-intra-default-tx-only on/off off Intra blocks only use the default transform of their prediction mode.
Use full header for still picture --full-still-picture-hdr on/off off Writes the full instead of the reduced sequence header into a still picture.
Force video mode --force-video-mode on/off on Codes the stream as video even when it has only one frame. aomenc's own default is off.
Delta LF --delta-lf-mode on/off off Lets the strength of the deblocking filter vary per superblock.
warped motion --enable-warped-motion on/off on Local warped motion: a block may be rotated, scaled or sheared, not only shifted.
Rectangle transform --enable-rect-tx on/off on Allows rectangular transforms.
Extended transform type --enable-flip-idtx on/off on Allows the extended transform types (flipped ADST variants, identity and the one-dimensional transforms).
CDF update mode --cdf-update-mode no, all, some all Whether the probability tables of the entropy coder are updated: never, on all frames or only on selected frames.
OBMC --enable-obmc on/off on Overlapped block motion compensation: the prediction of a block is blended with those of its neighbours.
Tile groups --num-tile-groups 1 – 16 1 Maximum number of tile groups the tiles of a frame are packed into.
MTU size --mtu-size 0 – 65535 0 Target size for a tile group in bytes; 0 means no size target. Overrides Tile groups.
MV temp prediction --enable-ref-frame-mvs 0 – 1 1 Temporal motion vector prediction: motion vectors are predicted from those of reference frames. 0 switches it off; on in aomenc by default.

Gimmick

Control aomenc option Range / values Hybrid default Meaning
Static threshold --static-thresh 0 – 10000 0 Motion detection threshold: blocks that change less than this are skipped. Speeds up nearly static content, but any value above 0 can leave parts of the picture not updated.
Monochrome --monochrome on/off off Encodes luma only; the stream has no chroma planes.
Error resilience --error-resilient on/off off Makes frames decodable independently of the state of earlier frames, for transmission over lossy links. Costs compression; not for files.
PSNR --psnr on/off off Lets aomenc show the PSNR in its status line.
Minimize command line – on/off on Leaves out options whose value Hybrid regards as aomenc's default, which shortens the call considerably.
No too small warning – on/off off No warning when the computed file size is below 1 MB.

Client Requirements

The buffer model of the rate control. The values describe the decoder's buffer in time units.

Control aomenc option Range / values Hybrid default Meaning
Initial buffer size (ms) --buf-initial-sz 0 – 60000 4000 How much data the client buffers before playback starts.
Optimal buffer size (ms) --buf-optimal-sz 0 – 60000 5000 Buffer fill the encoder tries to keep.
Buffer size (ms) --buf-sz 0 – 60000 6000 Total size of the client buffer.
Undershoot datarate --undershoot-pct 0 – 100 0 How far the rate control may stay below the target bit rate, in percent.
Overshoot datarate --overshoot-pct 0 – 100 0 How far it may go above the target bit rate, in percent.

Signal VUI

The color description of the stream. It does not change the picture, only the flags a player reads. The four options are written when the group is checked.

Control aomenc option Range / values Hybrid default Meaning
Signal VUI – on/off off Writes the four values below into the stream.
Primaries --color-primaries unspecified, bt709, bt470m, bt470bg, bt601, smpte240, film, bt2020, xyz, smpte431, smpte432, ebu3213 unspecified Color primaries; bt709 for HD, bt2020 for UHD/HDR.
Transfer --transfer-characteristics unspecified, bt709, bt470m, bt470bg, bt601, smpte240, lin, log100, log100sq10, iec61966, bt1361, srgb, bt2020-10bit, bt2020-12bit, smpte2084, hlg, smpte428 unspecified Transfer function; smpte2084 is PQ (HDR10), hlg is Hybrid Log-Gamma.
Color Matrix --matrix-coefficients bt709, unspecified, fcc73, bt470bg, bt601, smpte240, ycgco, bt2020ncl, bt2020cl, smpte2085, chromncl, chromcl, ictcp unspecified Matrix for the YUV ↔ RGB conversion. identity is added for 4:4:4.
Chroma Loc. --chroma-sample-position unknown, vertical, colocated vertical Position of the chroma samples in 4:2:0 relative to luma.

Command line addition

Control aomenc option Range / values Hybrid default Meaning
Command line addition – text empty Text that is added to the end of the call unchanged, for options Hybrid does not offer. It is not checked and not shortened.

The Configuration row below the tabs saves, loads and deletes named sets of all aomenc settings.

Example

2-pass with 1500 kbit/s, profile Main, 8 bit, speed 0, on a 10-bit YUV 4:2:0 source (640x352, 25 fps), with Minimize command line on. Both passes get the same options; the first writes the statistics file and no video:

vspipe "encodingTempSynthSkript.vpy" - --outputindex 0 -c y4m --progress | aomenc --passes=2 --pass=1 --target-bitrate=1500 --end-usage=vbr --fpf="video.stats" --profile=0 --cpu-used=0 --min-q=1 --max-q=63 --lag-in-frames=25 --bias-pct=70 --minsection-pct=15 --maxsection-pct=10000 --undershoot-pct=0 --overshoot-pct=0 --drop-frame=0 --kf-min-dist=0 --kf-max-dist=250 --auto-alt-ref=1 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --static-thresh=0 --noise-sensitivity=0 --tune-content=default --tile-columns=0 --tile-rows=0 --mtu-size=0 --aq-mode=1 --min-gf-interval=0 --max-gf-interval=0 --gf-min-pyr-height=0 --threads=64 --width=640 --height=352 --input-bit-depth=8 --bit-depth=8 --min-partition-size=4 --max-partition-size=128 --sb-size=dynamic --max-reference-frames=7 --disable-trellis-quant=0 --force-video-mode=1 --reduced-tx-type-set=1 --use-intra-dct-only=0 --use-inter-dct-only=0 --use-intra-default-tx-only=0 --quant-b-adapt=1 --coeff-cost-upd-freq=0 --mode-cost-upd-freq=0 --mv-cost-upd-freq=0 -o NUL -
vspipe "encodingTempSynthSkript.vpy" - --outputindex 0 -c y4m --progress | aomenc --passes=2 --pass=2 --target-bitrate=1500 --end-usage=vbr --fpf="video.stats" --profile=0 --cpu-used=0 --min-q=1 --max-q=63 --lag-in-frames=25 --bias-pct=70 --minsection-pct=15 --maxsection-pct=10000 --undershoot-pct=0 --overshoot-pct=0 --drop-frame=0 --kf-min-dist=0 --kf-max-dist=250 --auto-alt-ref=1 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --static-thresh=0 --noise-sensitivity=0 --tune-content=default --tile-columns=0 --tile-rows=0 --mtu-size=0 --aq-mode=1 --min-gf-interval=0 --max-gf-interval=0 --gf-min-pyr-height=0 --threads=64 --width=640 --height=352 --input-bit-depth=8 --bit-depth=8 --min-partition-size=4 --max-partition-size=128 --sb-size=dynamic --max-reference-frames=7 --disable-trellis-quant=0 --force-video-mode=1 --reduced-tx-type-set=1 --use-intra-dct-only=0 --use-inter-dct-only=0 --use-intra-default-tx-only=0 --quant-b-adapt=1 --coeff-cost-upd-freq=0 --mode-cost-upd-freq=0 --mv-cost-upd-freq=0 -o "video.ivf" -

How Hybrid calls it

  • The filter script (Vapoursynth or AviSynth) is piped into aomenc as y4m; without a script ffmpeg decodes the source and pipes it.
  • The script delivers the bit depth and color sampling set on the Base tab; the 10-bit source of the example is converted to 8 bit there.
  • aomenc writes an IVF file; Hybrid muxes it into the chosen container in a separate job.
  • In the 2-pass modes Hybrid creates one job per pass (--passes=2 with --pass=1 and --pass=2) and removes the statistics file afterwards. The first pass writes to NUL.
  • Frame size, bit depth and thread count are always written. Hybrid also passes --tune-content=default, --frame-boost=0 and --disable-trellis-quant=0, for which the tab has no controls; with Minimize command line on, --frame-boost=0 is left out as aomenc's default.
  • With Minimize command line on, the switches for the single coding tools disappear from the call as long as they are at their default; with it off every switch is written with 0 or 1.
  • The Command line addition is appended after the minimizing and directly before the output file.

Background

Which mode

For a file that just has to look good, constrained quality with a generous Maximum rate is the simplest choice: the Quantizer level sets the quality and the size follows from the content. The 2-pass bit rate mode is for hitting a size. At the same resulting size both give similar quality; they differ in what is fixed.

Speed

aomenc is slow at low CPU utilization modifier values. The step from 0 to 2 or 3 saves most of the time for a small loss; Row MT and tiles let it use more cores. The tool switches on the Advanced and Misc tabs are meant for experiments and special cases, not as speed controls.

Sources