{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/tools/software-encoders/rav1e",
  "collection": "docs",
  "title": "rav1e",
  "description": "rav1e is Xiph's Rust AV1 encoder; this page covers where it stands today, recommended settings, and its FFmpeg wrapper.",
  "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/tools/software-encoders/rav1e.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/tools/software-encoders/rav1e.md",
  "status": "current",
  "tags": [
    "migrated"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "rav1e v0.8.1 release",
      "url": "https://github.com/xiph/rav1e/releases/tag/v0.8.1",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "rav1e v0.8.1 README",
      "url": "https://github.com/xiph/rav1e/blob/v0.8.1/README.md",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "rav1e v0.8.1 CLI definitions and defaults",
      "url": "https://github.com/xiph/rav1e/blob/v0.8.1/src/bin/common.rs",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "rav1e v0.8.1 C API configuration keys",
      "url": "https://github.com/xiph/rav1e/blob/v0.8.1/src/capi.rs",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "rav1e commit history",
      "url": "https://github.com/xiph/rav1e/commits/master",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "rav1e pull request 3000 (HDR10+ JSON input)",
      "url": "https://github.com/xiph/rav1e/pull/3000",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg n9.0.2 librav1e wrapper",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/librav1e.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "mendevi dataset — libsvtav1 vs librav1e vs libaom-av1",
      "url": "https://mendevi.readthedocs.io/1.3.5/dataset/explore/svtav1_vs_rav1e_vs_aom.html",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/encoders/rav1e.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/encoders/rav1e.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Where rav1e stands",
      "anchor": "where-rav1e-stands"
    },
    {
      "depth": 2,
      "text": "Install",
      "anchor": "install"
    },
    {
      "depth": 2,
      "text": "Encode",
      "anchor": "encode"
    },
    {
      "depth": 3,
      "text": "Two-pass target bitrate",
      "anchor": "two-pass-target-bitrate"
    },
    {
      "depth": 2,
      "text": "Options that matter",
      "anchor": "options-that-matter"
    },
    {
      "depth": 2,
      "text": "HDR",
      "anchor": "hdr"
    },
    {
      "depth": 2,
      "text": "FFmpeg (librav1e)",
      "anchor": "ffmpeg-librav1e"
    },
    {
      "depth": 2,
      "text": "FFmpeg librav1e private options (n9.0.2)",
      "anchor": "ffmpeg-librav1e-private-options-n902"
    },
    {
      "depth": 2,
      "text": "Complete native parameter reference",
      "anchor": "complete-native-parameter-reference"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/_preamble.md",
      "checksum": "10a48ef6f37227648fa0f6cba0f2feba93ed49b43ea3821661a3d6f0151fe548",
      "bytes": 661
    },
    {
      "id": "where-rav1e-stands",
      "title": "Where rav1e stands",
      "depth": 2,
      "anchor": "where-rav1e-stands",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/#where-rav1e-stands",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/where-rav1e-stands.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/where-rav1e-stands.md",
      "checksum": "f9ec66ba008572ce1ca1feb7d15d9a5a1e9122a37310337604a4f58b4eba3a48",
      "bytes": 840
    },
    {
      "id": "install",
      "title": "Install",
      "depth": 2,
      "anchor": "install",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/#install",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/install.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/install.md",
      "checksum": "60c0e3393ef09085234405fb75b299023bbccf10d1de7abe2d56037f866995a7",
      "bytes": 633
    },
    {
      "id": "encode",
      "title": "Encode",
      "depth": 2,
      "anchor": "encode",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/#encode",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/encode.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/encode.md",
      "checksum": "76becbe79a92f467ac2e91e15fd54b0a5ad28bce7b465b6acee21a3de8fe1225",
      "bytes": 1517
    },
    {
      "id": "two-pass-target-bitrate",
      "title": "Two-pass target bitrate",
      "depth": 3,
      "anchor": "two-pass-target-bitrate",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/#two-pass-target-bitrate",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/two-pass-target-bitrate.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/two-pass-target-bitrate.md",
      "checksum": "92a3e641c9d64b310f2a6744553d1d56ed6705f3e3d3395038a73224d0bbce94",
      "bytes": 513
    },
    {
      "id": "options-that-matter",
      "title": "Options that matter",
      "depth": 2,
      "anchor": "options-that-matter",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/#options-that-matter",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/options-that-matter.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/options-that-matter.md",
      "checksum": "6473c01fc3ec605a74b81c0f8e2ad1b654b7f9e5924ec392d45d1bb831a894a5",
      "bytes": 4950
    },
    {
      "id": "hdr",
      "title": "HDR",
      "depth": 2,
      "anchor": "hdr",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/#hdr",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/hdr.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/hdr.md",
      "checksum": "e6cb0f3f58bc8c596f8d8c8dccbd37688c42361ecb9b5eb0ccfeb6db84a7ed2a",
      "bytes": 709
    },
    {
      "id": "ffmpeg-librav1e",
      "title": "FFmpeg (librav1e)",
      "depth": 2,
      "anchor": "ffmpeg-librav1e",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/#ffmpeg-librav1e",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/ffmpeg-librav1e.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/ffmpeg-librav1e.md",
      "checksum": "5d5b71b907da6fe6e1ad0f92a71524bde56af4c5f3b148bfae756ca4076d2085",
      "bytes": 819
    },
    {
      "id": "ffmpeg-librav1e-private-options-n902",
      "title": "FFmpeg librav1e private options (n9.0.2)",
      "depth": 2,
      "anchor": "ffmpeg-librav1e-private-options-n902",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/#ffmpeg-librav1e-private-options-n902",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/ffmpeg-librav1e-private-options-n902.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/ffmpeg-librav1e-private-options-n902.md",
      "checksum": "d111464ab6b22756e276e6802a2a3717ab820ce094a1c580b8b2a08d828b0bac",
      "bytes": 3061
    },
    {
      "id": "complete-native-parameter-reference",
      "title": "Complete native parameter reference",
      "depth": 2,
      "anchor": "complete-native-parameter-reference",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/rav1e/#complete-native-parameter-reference",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/complete-native-parameter-reference.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/rav1e/complete-native-parameter-reference.md",
      "checksum": "55ed42b94c897d0d86c4fdff86ea46ffba544d3732b560587eb6dff389f17645",
      "bytes": 15469
    }
  ],
  "outboundReferences": [
    "/tools/software-encoders/aomenc/",
    "/tools/software-encoders/svt-av1/",
    "/tools/utilities/av1an/",
    "/tools/utilities/mkvtoolnix/",
    "https://github.com/kornelski/cavif-rs",
    "https://github.com/xiph/rav1e",
    "https://github.com/xiph/rav1e/pull/3000",
    "https://github.com/xiph/rav1e/releases",
    "https://github.com/xiph/rav1e/releases/tag/v0.8.1",
    "https://mendevi.readthedocs.io/1.3.5/dataset/explore/svtav1_vs_rav1e_vs_aom.html"
  ],
  "checksum": "b9ad6392af0bcfa52c982ad4460e6801f7f46210a68f614dbbeb81d3fd1f8f06",
  "contentFormat": "markdown",
  "markdown": "> **Repository:** [xiph/rav1e](https://github.com/xiph/rav1e). The fastest and safest AV1 encoder. Latest release: [v0.8.1](https://github.com/xiph/rav1e/releases/tag/v0.8.1), Jun 16, 2025. Last commit: Aug 31, 2026. License: BSD-2-Clause. Stars: 4,160.\n\n[rav1e](https://github.com/xiph/rav1e) is an AV1 encoder written in Rust with hand-written assembly, developed by Xiph.org and Mozilla. It is BSD-2-Clause licensed. Its defaults are sensible, it is easy to build, and it is the AV1 encoder behind several Rust and AVIF tools: libavif can use it (`avifenc -c rav1e`), and the [cavif/ravif](https://github.com/kornelski/cavif-rs) AVIF encoder is built on it.\n\n## Where rav1e stands\n\nThe latest stable release is **v0.8.1** (June 2025). The weekly pre-release builds stopped in September 2025. Since then the repository has seen mostly maintenance commits (toolchain bumps, lint fixes) rather than encoder work.\n\nFor video, most encoders now use [SVT-AV1](/tools/software-encoders/svt-av1/) (or one of its community forks) or [aomenc](/tools/software-encoders/aomenc/). rav1e is considerably slower than SVT-AV1, and the [mendevi encoder dataset](https://mendevi.readthedocs.io/1.3.5/dataset/explore/svtav1_vs_rav1e_vs_aom.html) found SVT-AV1 better at equal encoding time. rav1e has changed little since, while SVT-AV1 has kept improving. rav1e is still a reasonable choice if you need a pure-Rust library or already use it through libavif or GStreamer. For a new video workflow, start with SVT-AV1.\n\n## Install\n\nPrebuilt binaries are on the [releases page](https://github.com/xiph/rav1e/releases), and most distributions package `rav1e`. To build v0.8.1 you need a Rust toolchain and, on x86-64, NASM 2.14.02 or newer:\n\n```sh\ncargo install --locked rav1e\n```\n\nOr build the tagged release from source:\n\n```sh\ngit clone --branch v0.8.1 https://github.com/xiph/rav1e.git\ncd rav1e\ncargo build --release\n```\n\nThe binary is at `target/release/rav1e`. rav1e picks its SIMD code paths at runtime, so a normal build already uses your CPU's AVX2/AVX-512. `RUSTFLAGS=\"-C target-cpu=native\"` produces a binary that only runs on CPUs like yours.\n\n## Encode\n\nrav1e reads Y4M and writes IVF. The input is a **positional** argument: `-i` is the minimum keyframe interval, not an input switch, so older commands like `rav1e -i input.y4m` do not work.\n\n```sh\nrav1e input.y4m -o output.ivf --quantizer 80 --speed 6\n```\n\nPipe from FFmpeg to encode anything else. 10-bit output is more efficient and bands less, even from 8-bit sources:\n\n```sh\nffmpeg -i input.mkv -pix_fmt yuv420p10le -strict -1 -f yuv4mpegpipe - | \\\n  rav1e - -o output.ivf --quantizer 80 --speed 6 --photon-noise 8\n```\n\nFFmpeg still needs `-strict -1` to write Y4M above 8 bits. Mux the IVF into MKV or MP4 afterwards (for example `ffmpeg -i output.ivf -i input.mkv -map 0:v -map 1:a -c copy final.mkv`), or use [mkvmerge](/tools/utilities/mkvtoolnix/).\n\nFor 4K, add tiles. They help both encoding speed and decoding speed:\n\n```sh\nffmpeg -i input.mkv -pix_fmt yuv420p10le -strict -1 -f yuv4mpegpipe - | \\\n  rav1e - -o output.ivf --quantizer 72 --speed 6 --tile-cols 2 --photon-noise 8\n```\n\n### Two-pass target bitrate\n\n```sh\nrav1e input.y4m -o /dev/null --bitrate 3000 --first-pass stats.bin\nrav1e input.y4m -o output.ivf --bitrate 3000 --second-pass stats.bin\n```\n\n`--bitrate` is in kbit/s. The first pass also writes a video file, so send it to `/dev/null` (otherwise the second pass stops to ask before overwriting). In bitrate mode `--quantizer` becomes the worst (maximum) quantizer allowed, and `--min-quantizer` the best. Each pass reads the input, so use a file or regenerate an identical pipe.\n\n## Options that matter\n\n| Option                                             | Default                    | Notes                                                                                                                                                                                                                                                          |\n| -------------------------------------------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--quantizer N`                                    | 100                        | Constant quantizer, 1–255 (0 aborts: lossless is not implemented). Lower is higher quality. This is the AV1 `base_q_idx` scale (see below).                                                                                                                                                            |\n| `--speed N`, `-s`                                  | 6                          | 0 (slowest) to 10 (fastest). Faster speeds also shorten the RDO lookahead (40 frames at speeds 0–2, 30 at 3–5, 20 at 6–7, 10 at 8–10).                                                                                                                         |\n| `--photon-noise N`                                 | 0 (off)                    | AV1 film-grain synthesis, strength 0–64. The decoder adds the noise, so it costs almost no bitrate and can mask banding. It does not copy the source's grain. It also lowers full-reference metric scores, so turn it off when comparing encodes with metrics. |\n| `--tile-cols N`, `--tile-rows N`, `--tiles N`      | automatic                  | Tile **counts** (powers of two), not log2 values. `--tiles` sets a minimum total and cannot be combined with the other two. More tiles raise thread utilisation and decoder parallelism at a small efficiency cost.                                            |\n| `--threads N`                                      | all logical CPUs           | Thread pool size. A single rav1e encode does not use many cores well without more tiles. On many-core machines, running several chunked encodes (e.g. via [Av1an](/tools/utilities/av1an/)) scales better.                                                     |\n| `--keyint N`, `-I` / `--min-keyint N`, `-i`        | 240 / 12                   | Maximum and minimum keyframe distance in frames. Scene-cut keyframes are on by default.                                                                                                                                                                        |\n| `--tune`                                           | `Psychovisual`             | `Psnr` optimises for the metric and looks worse. Leave the default.                                                                                                                                                                                            |\n| `--bitrate N`, `--first-pass`, `--second-pass`     | quantizer mode             | Bitrate targeting, single or two-pass.                                                                                                                                                                                                                         |\n| `--no-scene-detection`                             | off                        | For chunked encoders that place keyframes themselves.                                                                                                                                                                                                          |\n| `--primaries`, `--transfer`, `--matrix`, `--range` | unspecified, limited range | Colour signalling written into the stream. It labels the colour; it does not convert it.                                                                                                                                                                       |\n| `--mastering-display`, `--content-light`           | unset                      | HDR10 static metadata.                                                                                                                                                                                                                                         |\n\n> **Tip — Converting from aomenc or SVT-AV1.**\n>\n> aomenc's `--cq-level` and SVT-AV1's `--crf` use a 0–63 scale that maps to AV1's 0–255 quantizer index at roughly ×4. rav1e's `--quantizer` is that index directly. A 0–63 value multiplied by 4 (`--crf 20` → `--quantizer 80`) therefore lands on a similar base quantizer. Each encoder distributes bits differently around that base, so file size and quality will not match exactly.\n## HDR\n\nFor HDR10, signal the colour and static metadata from your source:\n\n```sh\nrav1e input.y4m -o output.ivf --quantizer 80 --speed 6 \\\n  --primaries BT2020 --transfer SMPTE2084 --matrix BT2020NCL \\\n  --mastering-display \"G(0.17,0.797)B(0.131,0.046)R(0.708,0.292)WP(0.3127,0.329)L(1000,0.0001)\" \\\n  --content-light 1000,400\n```\n\nReplace the mastering-display and content-light values with your source's. `ffprobe -show_frames -read_intervals \"%+#1\"` prints them as fractions, which you need to convert to decimals and cd/m². HDR10+ dynamic metadata is not supported in a release: quietvoid's [pull request #3000](https://github.com/xiph/rav1e/pull/3000), which adds `--hdr10plus-json`, is still unmerged.\n\n## FFmpeg (`librav1e`)\n\n```sh\nffmpeg -i input.mkv -c:v librav1e -qp 80 -speed 6 -c:a libopus output.mkv\n```\n\n`-qp` maps to `--quantizer`, and `-tiles`/`-tile-rows`/`-tile-columns` map to the tile options. Other settings go through `-rav1e-params key=value:key=value`, which only accepts rav1e's C API keys: `speed`, `quantizer`, `min_quantizer`, `bitrate`, `key_frame_interval`, `min_key_frame_interval`, `switch_frame_interval`, `reservoir_frame_delay`, `rdo_lookahead_frames`, `low_latency`, `no_scene_detection`, `tune`, `tiles`, `tile_rows`, `tile_cols`, `threads`, `still_picture`, `level` and `enable_timing_info`.\n\n> **Caution.**\n>\n> Photon noise is not one of those keys, so grain synthesis is only available through the rav1e CLI. FFmpeg prints a warning for an unknown `-rav1e-params` key but encodes anyway.\n## FFmpeg librav1e private options (n9.0.2)\n\nThese are the private options of the `librav1e` encoder in FFmpeg 9.0.2. Generic FFmpeg options also reach rav1e: `-g` and `-keyint_min` set the keyframe interval, `-b:v` (bit/s) switches to bitrate mode with `-qmax` (default 255) and `-qmin` as quantizer limits, `-pass 1`/`-pass 2` run a two-pass encode (needs `-b:v`), `-threads` sets the thread pool, and the input's colour range, primaries, transfer and matrix are signalled automatically. `-rav1e-params` is applied first, so these and the private options below override the same setting given there.\n\n<details>\n<summary>Private AVOptions (6 options)</summary>\n\n| Option          | Default | Type and range | What it does                                                                                                                                                                                                                                              |\n| --------------- | ------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `-qp`           | -1      | int, -1–255    | Constant quantizer, same scale as `--quantizer`. -1 leaves rav1e's default of 100. Takes priority over `-b:v` if both are given.                                                                                                                          |\n| `-speed`        | -1      | int, -1–10     | Speed preset, as `--speed`. -1 leaves rav1e's default of 6. Setting it resets the speed-derived keys `rdo_lookahead_frames` and `no_scene_detection` given in `-rav1e-params`.                                                                            |\n| `-tiles`        | 0       | int, ≥ -1      | Minimum total tile count, as `--tiles`; rav1e picks the rows and columns and ignores `-tile-rows`/`-tile-columns`. 0 or -1 leaves tiling to rav1e.                                                                                                       |\n| `-tile-rows`    | 0       | int, ≥ -1      | Number of tile rows: a count (power of two), not log2. 0 or -1 leaves it automatic.                                                                                                                                                             |\n| `-tile-columns` | 0       | int, ≥ -1      | Number of tile columns, same rules as `-tile-rows`. The FFmpeg name is `-tile-columns`, not `-tile-cols`.                                                                                                                                                 |\n| `-rav1e-params` | unset   | dictionary     | `key=value` pairs separated by `:`, using rav1e's C API keys (listed above), not CLI flag names. Booleans must be `true` or `false`, and `bitrate` is in bit/s. Put `speed` first: it resets lookahead and scene-detection keys. Bad keys only warn. |\n\n</details>\n\n## Complete native parameter reference\n\nEvery option of the `rav1e` 0.8.1 command-line encoder. Options of the `advanced` subcommand go after the main options and the `advanced` keyword (`rav1e in.y4m -o out.ivf advanced --save-config enc.toml`). Named values such as `Psnr`, `Full` or `BT2020` are case-insensitive.\n\n<details>\n<summary>Input and output (7 options)</summary>\n\n| Option            | Default        | What it does                                                                                                                            |\n| ----------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `INPUT`           | required       | Y4M input file, or `-` for stdin. It is positional: `-i` is `--min-keyint`, not an input flag.                                          |\n| `--output`, `-o`  | required       | IVF output file, or `-` for stdout. A file name must end in `.ivf` or have no extension.                                                |\n| `-y`              | off            | Overwrite an existing output file. Without it rav1e asks for confirmation on stdin, so an encode with piped input exits instead.        |\n| `--limit`, `-l`   | 0 (all frames) | Stop after this many frames. `--still-picture` allows at most 1.                                                                        |\n| `--skip`          | 0              | Read and discard this many frames from the start of the input before encoding.                                                          |\n| `--help`, `-h`    | —              | Print help; `-h` gives the short form.                                                                                                  |\n| `--version`, `-V` | —              | Print the version. `--version` also shows the compiler, assembly level and whether threading and unstable features were built in. |\n\n</details>\n\n<details>\n<summary>Rate control and speed (9 options)</summary>\n\n| Option                    | Default                              | What it does                                                                                                                                                   |\n| ------------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--quantizer`             | 100 (255 with `--bitrate`)           | Quantizer index 1–255; lower is higher quality. 0 (lossless) is not implemented and aborts. With `--bitrate` it is the highest quantizer rate control may use. |\n| `--min-quantizer`         | 0                                    | Lowest quantizer (best quality) rate control may use in bitrate mode, 0–255.                                                                                   |\n| `--bitrate`, `-b`         | unset (quantizer mode)               | Target bitrate in kbit/s. Switches from constant quantizer to rate control.                                                                                    |\n| `--first-pass`            | unset                                | Run the first pass of a two-pass encode and write its statistics to this file. Needs `--bitrate`.                                                              |\n| `--second-pass`           | unset                                | Run the second pass using statistics from `--first-pass`. Needs `--bitrate` and the same input.                                                                 |\n| `--reservoir-frame-delay` | min(240, 1.5 × keyint), at least 12  | Window, in frames, over which rate control spreads its bit reservoir; minimum 12. A longer window lets the bitrate vary more between scenes.                   |\n| `--speed`, `-s`           | 6                                    | Preset 0–10; 0 is slowest and best. Slower presets search more partition sizes, transform types and motion vectors. Upstream does not recommend 0 or 10.       |\n| `--rdo-lookahead-frames`  | 20 at speed 6                        | Frames analysed ahead for rate–distortion decisions. The preset sets 40 at speeds 0–2, 30 at 3–5, 20 at 6–7 and 10 at 8–10.                                    |\n| `--tune`                  | Psychovisual                         | `Psychovisual` or `Psnr`. `Psnr` optimises for the metric and looks worse.                                                                                     |\n\n</details>\n\n<details>\n<summary>Keyframes and frame structure (7 options)</summary>\n\n| Option                          | Default            | What it does                                                                                                                                       |\n| ------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--keyint`, `-I`                | 240                | Maximum frames between keyframes. 0 removes the limit, leaving only scene-cut keyframes.                                                           |\n| `--min-keyint`, `-i`            | 12                 | Minimum frames between scene-cut keyframes; capped at `--keyint`.                                                                                  |\n| `--no-scene-detection`          | off                | Turn off scene-cut keyframes. Use it when a chunking tool such as Av1an already splits at scene cuts; on a full encode it costs quality.            |\n| `--scd-speed`                   | 0 (1 at speed 10)  | Scene-detection mode: 0 standard, 1 fast.                                                                                                          |\n| `--switch-frame-interval`, `-S` | 0 (off)            | Insert an AV1 switch frame at most every N frames. A player can change to another stream of the same content at a switch frame.                  |\n| `--low-latency`                 | off                | Disable frame reordering so no frame waits for later ones, for real-time use. Compresses much less efficiently.                                    |\n| `--still-picture`               | off                | Encode only the first frame, with the AV1 still-picture sequence header. The output is still IVF; use an AVIF encoder such as avifenc or cavif for images. |\n\n</details>\n\n<details>\n<summary>Film grain (2 options)</summary>\n\n| Option                                       | Default | What it does                                                                                                                                                                                                                       |\n| -------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--photon-noise`                             | 0 (off) | Add synthetic luma grain at strength 0–64 (strength × 100 is the simulated ISO, so 8 ≈ ISO 800). The decoder renders it through AV1 film-grain synthesis; it does not model the source's grain. Cannot combine with a grain table. |\n| `--film-grain-table`, `--photon-noise-table` | unset   | Apply grain from a film-grain table file, in the text format aomenc and SVT-AV1 also read. `--photon-noise-table` is a hidden alias.                                                                                              |\n\n</details>\n\n<details>\n<summary>Threading and tiles (5 options)</summary>\n\n| Option        | Default             | What it does                                                                                                                                                                 |\n| ------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--threads`   | 0 (logical CPUs)    | Maximum worker threads. One encode needs several tiles to keep many threads busy.                                                                                            |\n| `--tile-cols` | 0 (automatic)       | Number of tile columns: a count (power of two, up to 64), not log2. 0 uses the fewest the frame size allows, and rav1e adjusts other values to fit the frame.                |\n| `--tile-rows` | 0 (automatic)       | Number of tile rows, same rules as `--tile-cols`.                                                                                                                            |\n| `--tiles`     | unset               | Minimum total tile count; rav1e picks the rows and columns. Cannot be combined with `--tile-rows` or `--tile-cols`.                                                         |\n| `--slots`     | 0 (off)             | Encode up to N GOPs in parallel; values above 1 enable it. Requires a build with the `unstable` feature, and only the `rav1e-ch` binary (also needing `channel-api`) uses it. |\n\n</details>\n\n<details>\n<summary>Colour and HDR metadata (6 options)</summary>\n\nThese options only label the stream. They do not convert pixels.\n\n| Option                | Default     | What it does                                                                                                                                                                                         |\n| --------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--range`             | Limited     | `Limited` or `Full`. rav1e does not read the range from the Y4M header, so set `Full` yourself for full-range input.                                                                                 |\n| `--primaries`         | Unspecified | `BT709`, `BT470M`, `BT470BG`, `BT601`, `SMPTE240`, `GenericFilm`, `BT2020`, `XYZ`, `SMPTE431`, `SMPTE432`, `EBU3213` or `Unspecified`.                                                              |\n| `--transfer`          | Unspecified | `BT709`, `BT470M`, `BT470BG`, `BT601`, `SMPTE240`, `Linear`, `Log100`, `Log100Sqrt10`, `IEC61966`, `BT1361`, `SRGB`, `BT2020_10Bit`, `BT2020_12Bit`, `SMPTE2084` (PQ), `SMPTE428`, `HLG` or `Unspecified`. |\n| `--matrix`            | Unspecified | `Identity`, `BT709`, `FCC`, `BT470BG`, `BT601`, `SMPTE240`, `YCgCo`, `BT2020NCL`, `BT2020CL`, `SMPTE2085`, `ChromatNCL`, `ChromatCL`, `ICtCp` or `Unspecified`.                                     |\n| `--mastering-display` | unset       | HDR mastering display as `G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)`: CIE xy chromaticities as decimals 0–1, luminance in cd/m².                                                                           |\n| `--content-light`     | unset       | MaxCLL and MaxFALL in cd/m², as `max_cll,max_fall` (for example `1000,400`). `0,0` writes nothing.                                                                                                   |\n\n</details>\n\n<details>\n<summary>Frame rate and level (3 options)</summary>\n\n| Option         | Default         | What it does                                                                                                                                                                                      |\n| -------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--frame-rate` | from Y4M header | Override the output frame rate's numerator; needs `--time-scale` (`--frame-rate 24000 --time-scale 1001` is 23.976 fps). Changes timestamps only.                                                |\n| `--time-scale` | 0 (unset)       | Frame-rate denominator for `--frame-rate`; use 1 for whole-number rates. Ignored without `--frame-rate`.                                                                                         |\n| `--level`      | auto            | AV1 level to signal and enforce: 2.0, 2.1, 3.0, 3.1, 4.0, 4.1, 5.0–5.3 or 6.0–6.3. `auto` and `unconstrained` both write level 31 (no level). The encode fails if the frame size exceeds the level. |\n\n</details>\n\n<details>\n<summary>Statistics and debugging (7 options)</summary>\n\n| Option                   | Default | What it does                                                                                                     |\n| ------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------- |\n| `--verbose`, `-v`        | off     | Print statistics for every frame. Cannot combine with `--quiet`.                                                 |\n| `--quiet`, `-q`          | off     | Print no progress or summary.                                                                                    |\n| `--benchmark`            | off     | Print a timing summary at the end.                                                                               |\n| `--psnr`                 | off     | Report PSNR of the reconstruction against the input. Cannot combine with `--metrics`.                            |\n| `--metrics`              | off     | Report PSNR, PSNR-HVS, SSIM, MS-SSIM and CIEDE2000 against the input. Slows the encode.                          |\n| `--reconstruction`, `-r` | unset   | Also write the encoder's reconstructed frames (what a decoder outputs) to this Y4M file.                         |\n| `--high-bitdepth`        | off     | Use the high-bit-depth code path for 8-bit input too. For debugging.                                             |\n\n</details>\n\n<details>\n<summary>Advanced subcommand (4 options)</summary>\n\n| Option                                  | Default | What it does                                                                                                                                         |\n| --------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `advanced --completion`, `advanced -c`  | unset   | Print a shell completion script for `bash`, `elvish`, `fish`, `powershell` or `zsh`; `zsh` panics in 0.8.1. An input and `-o` are still required (`rav1e - -o - advanced -c bash`). |\n| `advanced --save-config`, `advanced -s` | unset   | Write the encoder configuration to a TOML file. Requires a build with the `serialize` feature, which default builds lack.                             |\n| `advanced --load-config`, `advanced -l` | unset   | Load the encoder configuration from a TOML file made by `--save-config`; encoder options on the command line are then ignored. Requires `serialize`. |\n| `advanced --help`, `advanced -h`        | —       | Print help for the subcommand.                                                                                                                       |\n\n</details>\n"
}
