Skip to content

aomenc

currentMigrated from docs/encoders/aomenc.mdx at 37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0

aomenc is the command-line encoder of libaom, the Alliance for Open Media’s reference AV1 library. The same library is FFmpeg’s libaom-av1 encoder and libavif’s aom codec.

People use it today for:

  • Quality-first video encodes. A single aomenc process threads poorly, so it is usually run through Av1an, which splits the source at scene changes and encodes many chunks in parallel.
  • AVIF and other still images, where libaom’s all-intra mode and image tunes are strong.
  • A base for community forks with perceptual tuning (see community forks).

For most video, SVT-AV1 is the more practical encoder: it is much faster at comparable presets and parallelises well on its own. Mainline libaom also defaults to --tune=psnr, so good perceptual results depend on the settings below.

Linux distributions, Homebrew and MSYS2 package libaom with aomenc, and most FFmpeg builds include libaom-av1. Packaged builds normally lack the optional VMAF and Butteraugli tunes, which need -DCONFIG_TUNE_VMAF=1 or -DCONFIG_TUNE_BUTTERAUGLI=1 (plus libvmaf or libjxl) at build time.

To build the current release:

Terminal window
git clone --depth 1 --branch v3.15.1 https://aomedia.googlesource.com/aom
cmake -S aom -B aom_build -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=0 -DENABLE_DOCS=0
cmake --build aom_build -j"$(nproc)"

The encoder is aom_build/aomenc. If you add -march=native to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS, do not share the binary with machines that have a different CPU: it can crash on instructions they lack.

Terminal window
aomenc --end-usage=q --cq-level=24 --cpu-used=4 --bit-depth=10 -o output.webm input.y4m
  • --end-usage=q --cq-level=N selects constant quality. cq-level runs from 0 to 63; lower is higher quality. Without --end-usage, aomenc does 256 kbit/s VBR. Values in the 20s are typical for high-quality encodes; the scale does not match x264, x265 or SVT-AV1 CRF numbers.
  • --cpu-used is the speed preset (0–6 in the default good-quality mode; lower is slower and more efficient). The default, 0, is extremely slow. 4 is the usual balance, 3 if you have time, 6 when speed matters.
  • --bit-depth=10 encodes 8-bit sources at 10 bits, which improves efficiency and reduces banding. A 10-bit Y4M input is encoded at 10 bits automatically.
  • Good-quality mode runs two passes by default. Keep them: libaom uses first-pass statistics even in constant-quality mode.
  • Output is WebM by default; --ivf and --obu select other formats. Mux the result into MKV or MP4 with mkvmerge or FFmpeg.

To feed aomenc from FFmpeg, pipe Y4M. aomenc cannot read a pipe twice, so the default two-pass mode fails with a WebM finalisation error and leaves an empty file. Use --passes=1:

Terminal window
ffmpeg -i input.mkv -f yuv4mpegpipe - | aomenc - --passes=1 --end-usage=q --cq-level=24 --cpu-used=4 --bit-depth=10 -o output.webm

For two passes, run the pipe twice, once with --passes=2 --pass=1 --fpf=stats.log and once with --pass=2 and the same --fpf. To pipe a source that is already 10-bit, add -pix_fmt yuv420p10le -strict -1 before -f yuv4mpegpipe, because FFmpeg refuses to write high-bit-depth Y4M without -strict -1.

Av1an runs aomenc in two passes and pipes 10-bit yuv420p10le by default. Give each worker a couple of threads and let Av1an’s scene detection place keyframes:

Terminal window
av1an -i input.mkv -e aom -v "--end-usage=q --cq-level=24 --cpu-used=4 --threads=2 --lag-in-frames=48 --tune=ssim --enable-qm=1 --enable-chroma-deltaq=1 --deltaq-mode=0" -o output.mkv

Av1an adds --disable-kf --kf-max-dist=9999 itself, so aomenc does not place keyframes inside a chunk. Each chunk starts with a keyframe, and Av1an splits scenes longer than 10 seconds by default (--extra-split-sec). The perceptual options are explained in the next section. Av1an’s --photon-noise=N adds synthetic film grain; see film grain.

Defaults below are for good-quality mode in libaom 3.15.1.

OptionDefaultWhat it does and how people set it
--tunepsnrssim is the usual choice for video. iq and ssimulacra2 are image tunes: they turn on quantisation matrices, --sharpness=7, Variance Boost (--deltaq-mode=6), chroma delta-q and adaptive CDEF. Since 3.14 they also work outside all-intra mode, for layered images. vmaf* and butteraugli require a build with those tunes enabled; VMAF tunes also need --vmaf-model-path.
--tune-contentdefaultscreen for screen recordings and slides. film turns on film-grain synthesis with a fixed grain pattern.
--deltaq-mode1Per-superblock quantiser modulation. Mode 1 uses the temporal (TPL) model to optimise objective quality, and community settings commonly turn it off with 0. Mode 6 is Variance Boost, from SVT-AV1-PSY, which gives flat, low-variance areas more bits to fight banding and blocking. Mode 6 works in good-quality mode since 3.14, and --deltaq-strength scales it.
--enable-qm, --qm-min, --qm-max0, 5, 9Quantisation matrices quantise high frequencies more coarsely than low ones. They are off by default and commonly enabled for perceptual encodes. The levels run from 0 to 15, and a lower level means a less flat matrix.
--enable-chroma-deltaq0Automatic chroma quantiser offsets. With --tune=iq or ssimulacra2 they depend on subsampling; with other tunes (including ssim) chroma qindex is only raised by 2.
--sharpness00–7. Biases rate–distortion decisions towards keeping detail; in all-intra mode it also reduces loop filtering. Higher values retain texture at the cost of more ringing.
--arnr-strength, --arnr-maxframes5, 7Strength and length of the temporal denoising filter applied to alt-ref frames. It smooths fine detail. Community guides lower the strength to 1–2 for animation and clean CGI and keep the default or higher for noisy live action and low bitrates.
--lag-in-frames35Lookahead for frame-type and rate-control decisions. The maximum in mainline is 48, so older guides’ --lag-in-frames=64 is rejected with “g_lag_in_frames out of range”. Some forks allow more.
--enable-keyframe-filtering1Temporal filtering on keyframes. 2 adds an overlay frame and is marked experimental because it can break seeking. Leave it at 1.
--kf-max-dist, --enable-fwd-kf9999, 0For standalone encodes, set --kf-max-dist to the seek granularity you want (e.g. 10 seconds’ worth of frames). Av1an disables aomenc’s keyframe placement itself.
--denoise-noise-level, --enable-dnl-denoising, --film-grain-table0, 1, unsetFilm-grain synthesis. See below.
--threads, --row-mt, --tile-columns, --tile-rows0 (one thread), 1, 0, 0aomenc does not thread unless you set --threads. Tile values are log2: --tile-columns=2 means four columns. Tiles speed up encoding and decoding but cost some efficiency. With Av1an, use no tiles and --threads=2. For standalone encodes, a common rule is no tiles up to 1080p, --tile-columns=1 at 1440p, and --tile-columns=2 --tile-rows=1 at 2160p.

Options are applied in command-line order, and --tune=iq/--tune=ssimulacra2 set several of the options above. Put the tune first if you want to override any of them.

--denoise-noise-level=N (0–50) makes libaom estimate the source’s grain, denoise the frame, encode the cleaner picture and signal grain parameters that the decoder re-synthesises. Grain is expensive to encode, so this saves a lot of bitrate on grainy sources.

The built-in denoiser smears detail. Many encoders therefore add --enable-dnl-denoising=0: the grain is still estimated and synthesised, but the encoded frame is not denoised first. Keep the level low (single digits to about 10), because high values produce visible, patterned grain. As an alternative, pass a photon-noise table with --film-grain-table. Av1an’s --photon-noise=N generates one for you.

Grain synthesis lowers full-reference metric scores even when the result looks better, so turn it off when comparing encoders with metrics.

Terminal window
ffmpeg -i input.mkv -c:v libaom-av1 -crf 24 -cpu-used 4 -pix_fmt yuv420p10le -aom-params tune=ssim:enable-qm=1:enable-chroma-deltaq=1 -c:a copy output.mkv
  • -crf on its own selects constant-quality (q) mode. Adding -b:v turns it into constrained quality. FFmpeg’s -b:v is in bit/s, whereas aomenc’s --target-bitrate is in kbit/s.
  • The wrapper’s default -cpu-used is 1, which is very slow. Always set it.
  • FFmpeg runs a single pass unless you use -pass 1 and -pass 2.
  • -aom-params key=value:key=value passes libaom options that have no FFmpeg equivalent, using aomenc’s long option names. Options stored in libaom’s main encoder configuration (end usage, bitrate, min/max quantiser, lag, keyframe distances, bit depth, threads, frame limit) cannot be set this way; use FFmpeg’s own options for those.

For still images, use libavif’s avifenc, which uses libaom by default:

Terminal window
avifenc -q 65 -s 4 input.png output.avif

With libavif 1.4 and libaom 3.13 or newer, still images are encoded with libaom’s tune=iq image tune by default, so there is no need to pass it with -a. Speeds of 4 and below give the best compression. The AVIF page covers bit depth, chroma subsampling and the other avifenc options.

Mainline libaom defaults to PSNR-oriented decisions. Community forks change defaults and add perceptual tunes and controls:

  • aom-psy101 by Damian Höster follows current libaom. Its fork-specific work last changed in February 2025, and upstream libaom was last merged in June 2026.
  • aom-av1-lavish by Clybius is unmaintained. It is based on libaom 3.6.0 and was last committed to in November 2023.
  • aom-av1-psy by BlueSwordM is archived. Its last commit was on 13 January 2023.
  • aom-av1ador by porcino was last committed to on 31 May 2024.

Some psy-community work has since reached mainline. --tune=iq and Variance Boost (--deltaq-mode=6) were ported from SVT-AV1-PSY in libaom 3.12.

  • SVT-AV1 and rav1e are the other main open-source AV1 encoders.
  • Av1an handles chunked, parallel encoding with aomenc.
  • AVIF covers the image format.

FFmpeg libaom-av1 private options (n9.0.2)

Section titled “FFmpeg libaom-av1 private options (n9.0.2)”

Private options of the libaom-av1 encoder in FFmpeg n9.0.2. A value of -1 or auto keeps the libaom default, shown in brackets or listed in the native table below; the boolean coding-tool options take auto, 0 or 1. FFmpeg’s generic options set the rest: -b:v (bit/s, where aomenc uses kbit/s), -qmin/-qmax, -g, -keyint_min, -pass, -profile and -threads, which defaults to all CPU cores (up to 64) rather than aomenc’s single thread.

Speed, usage and tuning (4 options)
OptionDefaultDescription
-cpu-used1Speed preset, as aomenc --cpu-used. FFmpeg limits it to 0–8; realtime speeds 9–12 need -aom-params cpu-used=N. The default 1 is very slow, so always set it.
-usagegood (0)good (0), realtime (1) or allintra (2), as aomenc --usage.
-tune-1 (libaom: psnr)psnr or ssim. Other tunes, such as iq or ssimulacra2, go through -aom-params tune=….
-still-picture0 (off)Single-frame mode for AVIF: one frame, no lookahead, keyframes only, and libaom writes the reduced still-picture header.
Rate control (8 options)
OptionDefaultDescription
-crf-1 (32 without -b:v)Quality level 0–63 (aomenc --cq-level). On its own it selects q mode; with -b:v it selects constrained quality (cq). -crf 0 without -qmax is lossless.
-aq-mode-1 (libaom: 0)Segment-based adaptive quantisation: none (0), variance (1), complexity (2) or cyclic (3).
-undershoot-pct-1 (libaom: 25)Allowed bitrate undershoot in percent, 0–100 (aomenc --undershoot-pct).
-overshoot-pct-1 (libaom: 25)Allowed bitrate overshoot in percent (aomenc --overshoot-pct). FFmpeg accepts up to 1000, libaom only 100.
-minsection-pct-1 (libaom: 0)Two-pass minimum GOP bitrate in percent of the target. When unset it is derived from -minrate.
-maxsection-pct-1 (libaom: 2000)Two-pass maximum GOP bitrate in percent of the target. When unset and -maxrate is given, it is derived from -maxrate.
-drop-threshold0 (off)Drop frames when the rate buffer falls below this fill level in percent (aomenc --drop-frame). Used with CBR.
-static-thresh0Passed to libaom, which does not use it for AV1.
Lookahead, alt-refs and denoising (6 options)
OptionDefaultDescription
-lag-in-frames-1 (libaom: 35)Lookahead in frames, 0–48 (aomenc --lag-in-frames). FFmpeg forces 0 in the first pass of a two-pass encode.
-auto-alt-ref-1 (libaom: 1)Alternate reference frames, 0 or 1 (aomenc --auto-alt-ref).
-arnr-max-frames-1 (libaom: 7)Frames averaged by the alt-ref temporal filter, 0–15 (aomenc --arnr-maxframes).
-arnr-strength-1 (libaom: 5)Alt-ref temporal filter strength, 0–6. Lower values keep more fine detail.
-denoise-noise-level-1 (libaom: 0)Film-grain synthesis level, 0–50 (aomenc --denoise-noise-level). Add -aom-params enable-dnl-denoising=0 to encode the original frame rather than the denoised one.
-denoise-block-size-1 (libaom: 32)Block size in pixels for the grain estimator.
Tiles, threads and error resilience (6 options)
OptionDefaultDescription
-tilesunsetTile grid as actual columns × rows, e.g. 4x2. FFmpeg uses uniform tiling when it can and explicit tile sizes otherwise.
-tile-columns-1 (libaom: 0)Number of tile columns as log2, 0–6.
-tile-rows-1 (libaom: 0)Number of tile rows as log2, 0–6.
-row-mtautoRow-based multithreading inside tiles; needs -threads above 1.
-frame-parallelautoDisable backward probability adaptation so that a decoder can decode frames in parallel.
-error-resilience0 (off)default turns on error-resilient frames (aomenc --global-error-resilient).
Coding tools (32 options)
OptionDefaultDescription
-enable-cdefautoCDEF deringing filter, on or off. Modes 2 and 3 of aomenc --enable-cdef need -aom-params enable-cdef=N.
-enable-restorationautoLoop restoration (Wiener and self-guided filters). Slow to search; always off in realtime mode.
-enable-global-motionautoFrame-level global motion models for camera pans, zooms and rotation.
-enable-intrabcautoIntra block copy from an already coded area of the same frame. Used only in intra frames with screen-content tools.
-enable-rect-partitionsautoRectangular partitions (horizontal and vertical halves).
-enable-1to4-partitionsauto1:4 and 4:1 partitions (four horizontal or vertical strips).
-enable-ab-partitionsautoAB partitions: a split into one half and two quarters.
-enable-angle-deltaautoFine angle offsets (up to ±3 steps of 3°) on directional modes.
-enable-cfl-intraautoChroma from luma: chroma predicted from the reconstructed luma.
-enable-filter-intraautoFilter-intra modes: recursive filtered prediction in 4×2 cells, for smooth texture.
-enable-intra-edge-filterautoSmoothing and upsampling of the reference edge used for directional prediction.
-enable-smooth-intraautoSmooth, smooth-horizontal and smooth-vertical intra modes, which interpolate between edges.
-enable-paeth-intraautoPaeth intra predictor, which picks the left, top or top-left neighbour per pixel.
-enable-paletteautoPalette mode, which codes a block as up to eight colours. Used only when screen-content tools are active.
-enable-flip-idtxautoExtended transform types: flipped ADST, identity and one-dimensional (horizontal or vertical) transforms.
-enable-tx64auto64-point transforms for blocks of 64 pixels and larger.
-reduced-tx-type-setautoSearch a reduced set of transform types, which is faster.
-use-intra-dct-onlyautoUse only the DCT for intra blocks.
-use-inter-dct-onlyautoUse only the DCT for inter blocks.
-use-intra-default-tx-onlyautoUse only the default transform type of each intra mode.
-enable-ref-frame-mvsautoTemporal motion-vector prediction from the motion fields of reference frames.
-enable-reduced-reference-setautoSearch a reduced set of single and compound references, which is faster.
-enable-obmcautoOverlapped block motion compensation: blends in predictions made with neighbouring blocks’ motion to soften block edges.
-enable-dual-filterautoSeparate interpolation filters for horizontal and vertical sub-pixel motion.
-enable-diff-wtd-compautoDifference-weighted compound, with a mask derived from the difference between the two predictions.
-enable-dist-wtd-compautoDistance-weighted compound prediction, weighting two references by their temporal distance. Off when order hints are off.
-enable-onesided-compautoCompound prediction from two references on the same side (both past or both future).
-enable-interinter-wedgeautoWedge-shaped masks for compound prediction from two references.
-enable-interintra-wedgeautoWedge-shaped masks for inter-intra prediction.
-enable-masked-compautoMasked compound prediction (wedge and difference-weighted); 0 turns both off.
-enable-interintra-compautoInter-intra prediction: an inter prediction blended with an intra prediction.
-enable-smooth-interintraautoSmooth (gradual) blending for inter-intra prediction.
Metadata and pass-through (2 options)
OptionDefaultDescription
-dolbyvisionautoWrite Dolby Vision RPUs from frame side data; auto does so when the input carries a Dolby Vision configuration.
-aom-paramsunsetAny libaom encoder control by its aomenc long name, as key=value:key=value (e.g. tune=iq:enable-qm=1). Rate-control mode, bitrate, quantiser limits, keyframe interval, bit depth and threads cannot be set this way; use FFmpeg’s own options for those.

Every option aomenc 3.15.1 accepts, including those that need optional build features and a few that --help does not list (--tile-width, --tile-height, --use-fixed-qp-offsets, --fixed-qp-offsets, --two-pass-input, --two-pass-width and --two-pass-height). Defaults are for good-quality mode; realtime and all-intra defaults are given where they differ.

Application and output (19 options)
OptionDefaultDescription
--help—Print the full option list and exit.
--cfg, -cunsetRead low-level tool settings from a key–value file in the format of libaom’s Sample.cfg. Only the first --cfg is used.
--debug, -DoffLeave the application version out of the WebM tags so that repeated encodes are byte-identical.
--output, -orequiredOutput file. A .ivf or .obu extension selects that format unless --webm is given; any other name gets WebM.
--codecav1Encoder to use. libaom builds contain only av1.
--limit0 (all frames)Stop after this many input frames.
--skip0Skip this many input frames before encoding.
--quiet, -qoffDo not print progress.
--verbose, -voffPrint the encoder configuration before encoding.
--psnr0 (off)Report PSNR: 1 at the input bit depth, 2 at the stream bit depth. --psnr without a value means 1.
--test-decodeoffDecode every frame while encoding and compare it with the encoder’s reconstruction: warn reports a mismatch, fatal stops the encode.
--webmonWebM output. Requires a build with WebM I/O (CONFIG_WEBM_IO, on by default); without it the default output is raw OBU.
--ivfoffIVF output, the minimal frame container used by libaom’s own tools and test vectors.
--obuoffRaw low-overhead OBU stream (AV1 Section 5) with no container.
--annexb0 (off)Write the length-delimited Annex B bitstream format instead of Section 5 OBUs. Range 0–1.
--q-hist0 (off)After encoding, print a histogram of frame quantisers with this many buckets.
--rate-hist0 (off)After encoding, print a histogram of frame bitrates with this many buckets.
--disable-warningsoffSuppress the warnings about questionable settings.
--disable-warning-prompt, -yoffPrint those warnings but do not stop to ask whether to continue.
Usage modes and passes (12 options)
OptionDefaultDescription
--goodselectedGood-quality mode (--usage=0), the normal mode for offline video.
--rtoffRealtime mode (--usage=1): one pass, no lookahead, speeds 5–12, for low-latency streaming and conferencing.
--allintraoffAll-intra mode (--usage=2): every frame is a keyframe, no lookahead, speeds 0–9. Meant for still images and image sequences; it also turns CDEF off and changes the QM range and screen-content detection defaults.
--usage, -u0 (good)Usage mode by number: 0 good quality, 1 realtime, 2 all-intra. Same as --good, --rt and --allintra.
--passes, -p2 (1 in realtime and all-intra)Number of passes, 1–3. Two-pass good-quality encodes use the first-pass statistics even in q mode; realtime and all-intra always run one pass. Three passes add a half-resolution second pass whose decisions guide the final pass.
--passall passesRun only pass 1, 2 or 3 of a multi-pass encode, so that the passes can run as separate processes (each needs the same --fpf).
--fpfin memoryFirst-pass statistics file. Needed when passes run as separate processes; otherwise the statistics stay in memory.
--two-pass-output<output>_pass2_<n>.ivfThree-pass encoding: IVF file that receives the second (downscaled) pass.
--second-pass-log, -spfunsetThree-pass encoding: file in which the second pass stores its GOP and TPL decisions for the third pass.
--two-pass-inputunsetThree-pass encoding: an already-downscaled source to read in the second pass instead of scaling the input to half size.
--two-pass-width0 (half the input)Three-pass encoding: frame width of the second pass (and of raw --two-pass-input).
--two-pass-height0 (half the input)Three-pass encoding: frame height of the second pass (and of raw --two-pass-input).
Input format (20 options)
OptionDefaultDescription
--i420on for raw inputRaw input is 4:2:0 planar (I420). Y4M input takes its format from the header.
--yv12offRaw input is YV12 (4:2:0 planar with V before U).
--nv12offRaw input is NV12 (4:2:0 with interleaved U and V).
--i422offRaw input is 4:2:2 planar.
--i444offRaw input is 4:4:4 planar.
--width, -wfrom Y4MFrame width in pixels. Required for raw input.
--height, -hfrom Y4MFrame height in pixels. Required for raw input.
--fpsfrom Y4M (raw: 30/1)Frame rate as a fraction, e.g. 24000/1001.
--timebase1/fpsTimestamp precision in fractional seconds. aomenc overwrites it with the inverse frame rate before encoding, so setting it has no effect.
--bit-depth, -b8 (or the input’s, if higher)Bit depth of the encoded stream: 8, 10 or 12. Encoding 8-bit sources at 10 bits reduces banding and usually improves efficiency.
--input-bit-depthfrom Y4M (raw: --bit-depth)Bit depth of raw input when it differs from the stream bit depth.
--input-chroma-subsampling-x0Horizontal chroma subsampling (0 or 1) of 12-bit raw input in profile 2. Y4M input supplies it from the header.
--input-chroma-subsampling-y0Vertical chroma subsampling (0 or 1) of 12-bit raw input in profile 2.
--profile0 (Main)AV1 profile: 0 Main (4:2:0 and monochrome, 8–10 bit), 1 High (adds 4:4:4), 2 Professional (adds 4:2:2 and 12 bit). aomenc raises it when the input needs a higher profile.
--monochromeoffEncode luma only, with no chroma planes.
--use-16bit-internaloff (on above 8 bit)Use the high-bit-depth (16-bit) pipeline for an 8-bit encode.
--validate-hbd-input1 (on)Check that every high-bit-depth input sample lies within the range of the bit depth. Range 0–1.
--stereo-modemonoStereo 3D layout written to the WebM header: mono, left-right, bottom-top, top-bottom or right-left. Requires a build with WebM I/O.
--forced_max_frame_width0 (first frame)Maximum frame width written to the sequence header, so that later frames (for example after a resize) may be wider than the first.
--forced_max_frame_height0 (first frame)Maximum frame height written to the sequence header.
Rate control (24 options)
OptionDefaultDescription
--end-usagevbr (q in all-intra, cbr in realtime)Rate-control mode: vbr, cbr, cq (constrained quality: --cq-level capped by --target-bitrate) or q (constant quality at --cq-level). Quality-targeted encodes use q.
--target-bitrate256Target bitrate in kbit/s for vbr and cbr, and the bitrate cap in cq mode.
--cq-level10Quality level for q and cq modes, 0–63; lower is better. It maps to qindex 4×N (255 at 63). The scale does not match x264, x265 or SVT-AV1 CRF values.
--min-q0Best (lowest) quantiser rate control may use, 0–63. In q mode --cq-level must not be below it.
--max-q63Worst (highest) quantiser rate control may use, 0–63.
--lossless0 (off)Mathematically lossless coding (qindex 0 with the lossless transform). Range 0–1.
--undershoot-pct25 (50 in realtime)How far below the target bitrate a GOP may fall, in percent (0–100), before rate control compensates.
--overshoot-pct25 (50 in realtime)How far above the target bitrate a GOP may go, in percent (0–100), before rate control compensates.
--buf-sz6000 (1000 in realtime)Decoder buffer size in milliseconds at the target bitrate, for the rate-control buffer model.
--buf-initial-sz4000 (600 in realtime)Initial decoder buffer fill in milliseconds.
--buf-optimal-sz5000 (600 in realtime)Target decoder buffer fill in milliseconds.
--bias-pct50Two-pass VBR bit distribution, 0–100: 0 spreads bits evenly like CBR, 100 follows frame complexity fully. Ignored in one pass.
--minsection-pct0Lowest bitrate a GOP may get in two-pass VBR, as a percentage of the target. Ignored in one pass.
--maxsection-pct2000Highest bitrate a GOP may get in two-pass VBR, as a percentage of the target. Ignored in one pass.
--drop-frame0 (off)Drop frames when the rate buffer falls below this fill level (percent, 0–100). Used with CBR.
--max-intra-rate0 (unlimited)Cap on keyframe size as a percentage of the average frame size (450 allows 4.5 frames’ worth).
--max-inter-rate0 (unlimited)Cap on inter-frame size as a percentage of the average frame size.
--gf-cbr-boost0 (off)Extra bits for golden frames in CBR mode, as a percentage of the average frame bitrate.
--frame-boost0 (off)Periodic quantiser boost (0–1). The setting is accepted but the AV1 encoder does not use it.
--vbr-corpus-complexity-lap0 (off)One-pass VBR with lookahead only: average complexity per macroblock of the content corpus (0–10000), used to distribute bits.
--min-cr0 (off)Minimum compression ratio per frame ×100 (850 means 8.5:1), used to stay within level limits.
--use-fixed-qp-offsets0 (adaptive)q mode only: 0 derives per-layer quantiser offsets from --cq-level adaptively, 1 uses fixed offsets, 2 codes every frame at --cq-level with no offsets.
--fixed-qp-offsetsunsetMeant to give five offsets (keyframe, ALTREF and three internal alt-ref levels). aomenc only uses it to switch on --use-fixed-qp-offsets=1 and ignores the values.
--sb-qp-sweep0 (off)Try several quantisers per superblock and keep the one with the lowest RD cost. Intended for libaom’s unit tests; very slow.
Keyframes and GOP structure (12 options)
OptionDefaultDescription
--kf-min-dist0Minimum keyframe interval in frames. Set it equal to --kf-max-dist for a fixed interval.
--kf-max-dist9999 (0 in all-intra)Maximum keyframe interval in frames; scene-cut keyframes can come sooner. For standalone encodes set it to the seek granularity you want, e.g. ten seconds of frames.
--disable-kfoffPlace no keyframes after the first frame. Av1an sets this for each chunk.
--enable-fwd-kf0 (off)Forward keyframes (open GOP): the keyframe is coded early as an alt-ref, so frames shown before it can reference it. Range 0–1.
--fwd-kf-dist-1 (off)Distance in frames between repeated forward keyframes.
--sframe-dist0 (off)Insert a switch frame (S-frame, a point where a player can switch between streams) every N frames.
--sframe-mode1S-frame placement, 1–2: 1 turns the frame into an S-frame only if it is an alt-ref, 2 uses the next alt-ref.
--min-gf-interval0 (auto)Shortest golden-frame group (distance between alt-refs) in frames, up to 47.
--max-gf-interval0 (auto)Longest golden-frame group in frames, 2–47.
--gf-min-pyr-height0Minimum depth of the hierarchical reference pyramid in a GF group, 0–5.
--gf-max-pyr-height5Maximum depth of the hierarchical reference pyramid in a GF group, 0–5. Lower values mean fewer reference layers and less temporal quality variation.
--kf-max-pyr-height-1 (off)Maximum pyramid depth for the GF group that starts at a keyframe, −1–5; the smaller of this and --gf-max-pyr-height applies.
Lookahead, alt-refs and temporal filtering (7 options)
OptionDefaultDescription
--lag-in-frames35 (0 in realtime and all-intra)Lookahead in frames for frame-type, alt-ref and rate-control decisions, 0–48. Larger values use more memory. Older guides’ --lag-in-frames=64 is rejected as out of range.
--auto-alt-ref1 (on)Use alternate reference frames: hidden, temporally filtered frames that the frames around them predict from. Values above 1 are treated as 1.
--enable-overlay1 (on)Code an overlay frame where a filtered alt-ref is displayed. With 0 the filtered alt-ref is shown as it is.
--enable-tpl-model1 (on)Temporal dependency model (TPL): estimates how much later frames reference each block and spends bits accordingly. Required by --deltaq-mode=1.
--enable-keyframe-filtering1Temporal filtering of keyframes: 0 off, 1 on, 2 on with an overlay frame (experimental; can break seeking in players).
--arnr-maxframes7Number of frames, 0–15, that the alt-ref temporal filter averages; 0 or 1 disables filtering.
--arnr-strength5Alt-ref temporal filter strength, 0–6. Lower values keep more fine detail; community guides use 1–2 for animation and clean CGI.
Speed and tuning (11 options)
OptionDefaultDescription
--cpu-used0Speed preset; lower is slower and more efficient. Good-quality mode uses 0–6 (the library accepts up to 9, but nothing changes beyond 6), realtime 5–12, all-intra 0–9. 4 is a common balance.
--tunepsnrMetric that RD decisions optimise: psnr, ssim (the usual choice for video), iq and ssimulacra2 (image tunes, accepted in every usage mode since 3.14), butteraugli (requires -DCONFIG_TUNE_BUTTERAUGLI=1), the vmaf* tunes (require -DCONFIG_TUNE_VMAF=1 and --vmaf-model-path) and vmaf_saliency_map (requires -DCONFIG_SALIENCY_MAP=1). iq and ssimulacra2 also set QMs, --sharpness=7, --deltaq-mode=6, chroma delta-q, QM-PSNR and adaptive CDEF, so give them before any option you want to override.
--tune-contentdefaultContent type: screen enables screen-content tools for desktop recordings and slides; film adds film-grain synthesis with a fixed built-in grain pattern.
--dist-metricpsnrDistortion measure inside block decisions: psnr, or qm-psnr, which weights errors by the quantisation matrices (set by --tune=iq and ssimulacra2).
--sharpness0Bias, 0–7, of coefficient RD decisions towards keeping block detail. In all-intra mode it also sets the bitstream’s loop-filter sharpness, which weakens deblocking on block edges.
--enable-adaptive-sharpness0 (off)Vary the effective sharpness with the frame quantiser, using --sharpness as the maximum; reduces blocking at low and medium quality. No effect while --sharpness is 0. --tune=iq turns it on.
--screen-detection-mode1 (2 in all-intra)Screen-content detection: 1 standard, 2 also recognises anti-aliased text and graphics.
--enable-low-complexity-decode0 (off)Restrict tools so the stream is cheaper to decode. It only applies to good-quality speeds 1–3 when the shorter frame side is 608–1080 pixels and --sharpness is not 3.
--static-thresh0Motion threshold inherited from VP8/VP9. The setting is accepted but the AV1 encoder does not use it.
--noise-sensitivity0 (off)Temporal denoiser strength, 0–6, for realtime encodes. Requires a build with -DCONFIG_AV1_TEMPORAL_DENOISING=1 and only acts on 8-bit encodes at speed 8 and above.
--vmaf-model-path/usr/local/share/model/vmaf_v0.6.1.jsonVMAF model file used by the vmaf* tunes. Requires a build with -DCONFIG_TUNE_VMAF=1.
Adaptive quantisation and delta-q (8 options)
OptionDefaultDescription
--deltaq-mode1 (objective)Per-superblock quantiser modulation: 0 off; 1 objective, from the TPL model (needs --enable-tpl-model=1); 2 perceptual (wavelet energy); 3 perceptual for all-intra; 4 user-rating-based (all-intra); 5 HDR (only for 10-bit BT.2020 input); 6 Variance Boost, which gives flat, low-variance areas more bits against banding and blocking. Community video settings often use 0 or 6.
--deltaq-strength100Strength of --deltaq-mode=4 and 6, in percent (0–1000).
--delta-lf-mode0 (off)Also vary the loop-filter level per superblock. Only works with a non-zero --deltaq-mode. Range 0–1.
--aq-mode0 (off)Segment-based adaptive quantisation, separate from delta-q: 0 off, 1 variance, 2 complexity, 3 cyclic refresh (realtime).
--enable-chroma-deltaq0 (off)Chroma quantiser offsets. With --tune=iq or ssimulacra2 they depend on subsampling (finer chroma for 4:2:0, coarser chroma AC for 4:2:2 and 4:4:4); with other tunes chroma qindex is simply raised by 2.
--enable-rate-guide-deltaq0 (off)All-intra only: rate-guided delta-q from a per-16×16-block rate file given with --rate-distribution-info. Needs --deltaq-mode=3.
--rate-distribution-info./rate_map.txtRate-distribution file for --enable-rate-guide-deltaq.
--auto-intra-tools-off0 (off)All-intra with --deltaq-mode=3: let the encoder switch off intra tools that rarely pay off.
Quantisation (5 options)
OptionDefaultDescription
--enable-qm0 (off)Quantisation matrices: quantise high frequencies more coarsely than low ones. Commonly enabled for perceptual encodes.
--qm-min5 (4 in all-intra)Lowest QM level, 0–15 (15 is flat, lower levels weight frequencies more strongly). The level used rises with the quantiser from --qm-min to --qm-max.
--qm-max9 (10 in all-intra)Highest QM level, 0–15.
--quant-b-adapt0 (off)Adaptive quantiser: a wider dead zone for the trailing (highest-frequency) coefficients of each block, and a lone ±1 coefficient is dropped. Saves bits on fine noise.
--disable-trellis-quant3Trellis (RD-optimised) coefficient quantisation: 0 always, 1 never, 2 not during the RD search, 3 not in the fast luma RD estimate.
Threads and tiles (11 options)
OptionDefaultDescription
--threads, -t0 (one thread)Maximum number of worker threads. aomenc stays single-threaded unless this is set.
--row-mt1 (on)Row-based multithreading inside tiles; needs --threads above 1. Range 0–1.
--fp-mt0 (off)Frame-parallel multithreading: encode several frames at once for more speed with many threads, at a small efficiency cost. Range 0–1.
--tile-columns0Number of tile columns as log2, 0–6 (2 means four columns). Tiles let encoder and decoder work in parallel but cost some efficiency; the frame width limits how many are possible.
--tile-rows0Number of tile rows as log2, 0–6.
--auto-tiles0 (off)Choose tile columns and rows from the thread count and frame size, replacing --tile-columns and --tile-rows. Range 0–1.
--tile-widthunset (uniform)Non-uniform tile widths in superblocks, comma-separated; the list repeats across the frame. Needs --tile-height as well.
--tile-heightunset (uniform)Non-uniform tile heights in superblocks, comma-separated; the list repeats down the frame.
--large-scale-tile0 (off)Large-scale tile coding for random access to individual tiles (light-field and VR use). IVF output only. Range 0–1.
--num-tile-groups1Maximum number of tile groups (OBUs) per frame. --mtu-size overrides it.
--mtu-size0 (off)Maximum bytes per tile group, for packetised transport. A single tile larger than this still goes in one group.
Partitioning and superblocks (7 options)
OptionDefaultDescription
--sb-sizedynamicSuperblock size: dynamic (the encoder picks 64×64 or 128×128 from resolution and speed), 64 or 128.
--enable-rect-partitions1 (on)Rectangular partitions (horizontal and vertical halves).
--enable-ab-partitions1 (on)AB partitions: a split into one half and two quarters.
--enable-1to4-partitions1 (on)1:4 and 4:1 partitions (four horizontal or vertical strips).
--min-partition-size4Smallest block size searched: 4, 8, 16, 32, 64 or 128. At 4K and above, or at faster speeds, it is at least 8.
--max-partition-size128Largest block size searched: 4, 8, 16, 32, 64 or 128.
--partition-info-path.Directory for partition statistics read and written by libaom’s partition experiments.
Intra prediction (11 options)
OptionDefaultDescription
--enable-directional-intra1 (on)Directional (angular) intra modes.
--enable-diagonal-intra1 (on)The diagonal subset of directional modes (D45 to D203). No effect when directional modes are off.
--enable-angle-delta1 (on)Fine angle offsets (up to ±3 steps of 3°) on directional modes.
--enable-intra-edge-filter1 (on)Smoothing and upsampling of the reference edge used for directional prediction.
--enable-smooth-intra1 (on)Smooth, smooth-horizontal and smooth-vertical intra modes, which interpolate between edges.
--enable-paeth-intra1 (on)Paeth intra predictor, which picks the left, top or top-left neighbour per pixel.
--enable-filter-intra1 (on)Filter-intra modes: recursive filtered prediction in 4×2 cells, for smooth texture.
--enable-cfl-intra1 (on)Chroma from luma: chroma predicted from the reconstructed luma.
--enable-palette1 (on)Palette mode, which codes a block as up to eight colours. Used only when screen-content tools are active.
--enable-intrabc1 (on)Intra block copy from an already coded area of the same frame. Used only in intra frames with screen-content tools.
--force-video-mode0 (off)Use video coding settings even when only one frame is encoded, instead of still-picture settings.
Inter prediction (16 options)
OptionDefaultDescription
--max-reference-frames7Maximum number of reference frames searched per frame, 3–7.
--reduced-reference-set0 (off)Search a reduced set of single and compound references, which is faster.
--enable-order-hint1 (on)Frame order hints. Distance-weighted compound, temporal motion-vector projection and reference sign bias depend on them.
--enable-ref-frame-mvs1 (on)Temporal motion-vector prediction from the motion fields of reference frames.
--enable-dual-filter1 (on)Separate interpolation filters for horizontal and vertical sub-pixel motion.
--enable-global-motion1 (on)Frame-level global motion models for camera pans, zooms and rotation.
--enable-warped-motion1 (on)Local warped motion: a per-block affine model derived from neighbouring motion vectors.
--enable-obmc1 (on)Overlapped block motion compensation: blends in predictions made with neighbouring blocks’ motion to soften block edges.
--enable-dist-wtd-comp1 (on)Distance-weighted compound prediction, weighting two references by their temporal distance. Off when order hints are off.
--enable-onesided-comp1 (on)Compound prediction from two references on the same side (both past or both future).
--enable-masked-comp1 (on)Masked compound prediction (wedge and difference-weighted); 0 turns both off.
--enable-diff-wtd-comp1 (on)Difference-weighted compound, with a mask derived from the difference between the two predictions.
--enable-interinter-wedge1 (on)Wedge-shaped masks for compound prediction from two references.
--enable-interintra-comp1 (on)Inter-intra prediction: an inter prediction blended with an intra prediction.
--enable-smooth-interintra1 (on)Smooth (gradual) blending for inter-intra prediction.
--enable-interintra-wedge1 (on)Wedge-shaped masks for inter-intra prediction.
Transforms (8 options)
OptionDefaultDescription
--enable-tx641 (on)64-point transforms for blocks of 64 pixels and larger.
--enable-flip-idtx1 (on)Extended transform types: flipped ADST, identity and one-dimensional (horizontal or vertical) transforms.
--enable-rect-tx1 (on)Rectangular transforms. They need rectangular partitions.
--enable-tx-size-search1 (on)Search the transform size per block. With 0 each block uses its largest possible transform.
--reduced-tx-type-set0 (off)Search a reduced set of transform types, which is faster.
--use-intra-dct-only0 (off)Use only the DCT for intra blocks.
--use-inter-dct-only0 (off)Use only the DCT for inter blocks.
--use-intra-default-tx-only0 (off)Use only the default transform type of each intra mode.
Loop filters (3 options)
OptionDefaultDescription
--loopfilter-control1 (all frames)Deblocking filter: 0 off, 1 all frames, 2 skip non-reference frames, 3 skip low-motion frames.
--enable-cdef1 (0 in all-intra)CDEF, the constrained directional enhancement (deringing) filter: 0 off, 1 all frames, 2 reference frames only, 3 adaptive, which weakens it at high quality.
--enable-restoration1 (0 in realtime)Loop restoration (Wiener and self-guided filters). It is slow to search and is always off in realtime mode.
Resize and super-resolution (8 options)
OptionDefaultDescription
--resize-mode0 (off)Code frames at a lower resolution while the render size keeps the original: 0 off, 1 fixed (--resize-denominator), 2 random (testing), 3 dynamic (realtime CBR).
--resize-denominator8Resize factor 8/N for non-key frames, N = 8–16 (16 halves both dimensions).
--resize-kf-denominator8Resize factor 8/N for keyframes, N = 8–16.
--superres-mode0 (off)Super-resolution: code frames at reduced width and let the decoder upscale them in-loop: 0 off, 1 fixed, 2 random, 3 above a quantiser threshold, 4 automatic.
--superres-denominator8Horizontal super-resolution factor 8/N for non-key frames, N = 8–16.
--superres-kf-denominator8Horizontal super-resolution factor 8/N for keyframes, N = 8–16.
--superres-qthresh63Mode 3: use super-resolution on non-key frames whose quantiser (1–63) exceeds this.
--superres-kf-qthresh32Mode 3: the same threshold for keyframes.
Film grain and denoising (5 options)
OptionDefaultDescription
--denoise-noise-level0 (off)Film-grain synthesis: estimate the source grain, denoise before encoding and signal grain for the decoder to add back. 0–50; keep it low (single digits to about 10) to avoid patterned grain.
--denoise-block-size32Block size in pixels for the grain estimator.
--enable-dnl-denoising1 (on)Encode the denoised frame. With 0 the original frame is encoded and only the estimated grain parameters are added, which avoids the denoiser’s smearing.
--film-grain-tableunsetRead film-grain parameters from a table file, such as a photon-noise table from Av1an or grav1synth, instead of estimating them.
--film-grain-test0 (off)Use one of libaom’s 16 built-in film-grain test parameter sets (1–16).
Entropy coding and cost updates (5 options)
OptionDefaultDescription
--cdf-update-mode1Adaptation of the entropy-coding probabilities (CDFs): 0 never, 1 every frame, 2 selectively.
--coeff-cost-upd-freq0 (superblock)How often the encoder refreshes its coefficient rate estimates: 0 each superblock, 1 each superblock row, 2 each tile, 3 never. Higher values are faster.
--mode-cost-upd-freq0 (superblock)Refresh interval for mode rate estimates, with the same values.
--mv-cost-upd-freq0 (superblock)Refresh interval for motion-vector rate estimates, with the same values.
--dv-cost-upd-freq0 (superblock)Refresh interval for intra-block-copy vector rate estimates, with the same values.
Signalling, levels and error resilience (12 options)
OptionDefaultDescription
--color-primariesunspecifiedColour primaries (CICP) written to the sequence header; signalling only, no conversion. Values: bt709, unspecified, bt601, bt470m, bt470bg, smpte240, film, bt2020, xyz, smpte431, smpte432, ebu3213.
--transfer-characteristicsunspecifiedTransfer characteristics (CICP), e.g. bt709, smpte2084 (PQ) or hlg. Values: unspecified, bt709, bt470m, bt470bg, bt601, smpte240, lin, log100, log100sq10, iec61966, bt1361, srgb, bt2020-10bit, bt2020-12bit, smpte2084, hlg, smpte428.
--matrix-coefficientsunspecifiedMatrix coefficients (CICP). Values: identity, bt709, unspecified, fcc73, bt470bg, bt601, smpte240, ycgco, bt2020ncl, bt2020cl, smpte2085, chromncl, chromcl, ictcp, ipt-c2, ycgco-re, ycgco-ro.
--chroma-sample-positionunknown4:2:0 chroma siting: unknown, vertical (left, as MPEG-2) or colocated (top-left, as BT.2020).
--timing-infounspecifiedTiming information in the sequence header: unspecified, constant (fixed frame rate) or model (decoder model; not with hidden frames or super-resolution).
--target-seq-level-idx31 (unconstrained)Target level per operating point, written ABxy: operating point AB, level index xy, where index = (major − 2) × 4 + minor (8 is level 4.0, 19 is 6.3). The encoder limits its decisions to meet it.
--strict-level-conformance0 (off)Stop with an error if the stream cannot meet --target-seq-level-idx.
--set-tier-mask0 (Main)Bit mask of operating points that use the High tier instead of Main (bit n is point n).
--full-still-picture-hdroffFor single-frame encodes, write the full sequence header instead of the reduced still-picture header.
--error-resilient0 (off)Error-resilient frames, which stay decodable when references are lost. Range 0–1.
--global-error-resilient0 (off)Same effect as --error-resilient, set through the generic encoder configuration (the two are combined).
--frame-parallel0 (off)Disable backward probability adaptation so that a decoder can decode frames in parallel. Range 0–1.