> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decktalk.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Look up every DeckTalk tuning field, with its type, its default, and what it changes.

Tuning fields change how DeckTalk records, assembles, and checks a video. This page lists every
field, grouped by table, with its type, its default, and the values it accepts. A field whose Value
column is empty takes any value of its type, and a value outside the stated range fails the load
with the table and the field named.

A tuning table can go in the project's `decktalk.toml`. The same field can also come from an
environment variable.

```toml decktalk.toml theme={null}
[video]
preset = "veryfast"
```

```console theme={null}
DECKTALK_VIDEO_PRESET=veryfast decktalk build --no-voice
```

The scaffold builds with every default. Change `[video]` for faster drafts. Change `[verify]` when a
small reveal fails the cue check.

## Which value wins

Five layers can set a field. Each layer overrides the layers before it.

1. The default on this page.
2. The same table in the per-machine settings file.
3. The same table in the project's `decktalk.toml`.
4. An environment variable named `DECKTALK_<TABLE>_<FIELD>`, such as `DECKTALK_VIDEO_PRESET`.
5. A command-line flag, for one run.

The per-machine settings file is in a different place on each platform.

| Linux                                                                                                              | macOS                                                  | Windows                            |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------- |
| `$XDG_CONFIG_HOME/decktalk/decktalk.toml`, or `~/.config/decktalk/decktalk.toml` when `XDG_CONFIG_HOME` is not set | `~/Library/Application Support/decktalk/decktalk.toml` | `%APPDATA%\decktalk\decktalk.toml` |

Note: `DECKTALK_CONFIG` points at a different file. The per-machine file can hold only the tables on
this page, and any other table fails the load. `decktalk doctor` prints the path in its `config` row.

An environment variable for an array field takes comma-separated values, such as
`DECKTALK_VERIFY_PROBE_DELAYS=0.7,1.5`.

Four flags override a field for one run.

| Flag       | Commands            | Overrides                               |
| ---------- | ------------------- | --------------------------------------- |
| `--preset` | `assemble`, `build` | `[video] preset`                        |
| `--crf`    | `assemble`, `build` | `[video] crf`                           |
| `--settle` | `record`            | `[record] settle_seconds`               |
| `--model`  | `narrate`           | `[narration] model` and `[voice] model` |

Sections, the voice, mix levels, and soundscape prompts are project content, not tuning.
[decktalk.toml](/reference/decktalk-toml) lists those tables. Secrets go only in `.env`.

## `[video]`

These keys set the frame size and the encoding of every recording and of the final mp4. Environment variables start with `DECKTALK_VIDEO_`.

| Field           | Type      | Default      | Value                                                                                       | Meaning                                                                                                   |
| --------------- | --------- | ------------ | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `width`         | `integer` | `1920`       | must be above zero                                                                          | Frame width in pixels, for every recording and the final mp4.                                             |
| `height`        | `integer` | `1080`       | must be above zero                                                                          | Frame height in pixels, for every recording and the final mp4.                                            |
| `fps`           | `integer` | `25`         | must be above zero                                                                          | Frames per second. Chromium records at 25 fps, so 25 avoids a pulldown that duplicates every sixth frame. |
| `preset`        | `string`  | `"medium"`   | must be one of ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow | x264 preset. Use veryfast for drafts.                                                                     |
| `crf`           | `integer` | `18`         | must be an x264 quality between 0 and 51                                                    | x264 quality. A lower value gives higher quality and a larger file.                                       |
| `audio_bitrate` | `string`  | `"192k"`     |                                                                                             | AAC bitrate of the final mp4.                                                                             |
| `sample_rate`   | `integer` | `48000`      | must be above zero                                                                          | Audio sample rate of the final mp4. Every audio input is resampled to it once.                            |
| `channels`      | `integer` | `2`          | must be above zero                                                                          | Audio channels of the final mp4.                                                                          |
| `slate_color`   | `string`  | `"0x0e1116"` |                                                                                             | Color of the plain frame that plays when a slate image cannot be rendered.                                |

## `[narration]`

These keys govern how the script is turned into audio. Environment variables start with `DECKTALK_NARRATION_`.

| Field                     | Type      | Default                    | Value                | Meaning                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------- | --------- | -------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`                   | `string`  | `"eleven_multilingual_v2"` |                      | Speech model. `[voice] model` and `narrate --model` override it.                                                                                                                                                                                                                                                                                                     |
| `output_format`           | `string`  | `"mp3_44100_128"`          |                      | Audio format that the speech provider returns. It is part of the narration cache key.                                                                                                                                                                                                                                                                                |
| `mp3_bitrate`             | `string`  | `"128k"`                   |                      | Bitrate of the mp3 files that DeckTalk writes. They include click tracks and `narration.mp3`.                                                                                                                                                                                                                                                                        |
| `words_per_minute`        | `integer` | `140`                      | must be above zero   | Pacing of the estimated length in the `narrate` table.                                                                                                                                                                                                                                                                                                               |
| `silent_words_per_minute` | `integer` | `150`                      | must be above zero   | Pacing of the click track in a build without voice.                                                                                                                                                                                                                                                                                                                  |
| `lead_seconds`            | `number`  | `0.5`                      | must not be negative | Silence before the first word of every spoken section, so the picture changes before the voice speaks. A section's own `lead_seconds` replaces it.                                                                                                                                                                                                                   |
| `silent_beat_seconds`     | `number`  | `0.7`                      | must not be negative | Seconds each beat adds to a section's length in a build without voice.                                                                                                                                                                                                                                                                                               |
| `min_tail_seconds`        | `number`  | `0.7`                      | must not be negative | Silence after the last word of every spoken section, so a cut never falls on speech. The take is placed so that exactly this much follows its last sound. A section's own `tail_seconds` replaces it.                                                                                                                                                                |
| `cache_dir`               | `string`  | `""`                       |                      | Directory that holds the take files and their words files, each named by its content hash. It is empty for `build/narration/` inside the project, and a path here keeps the voiced takes when `build/` is deleted and lets many projects share one cache. The take index and the joined narration stay under `build/narration/`, because they belong to one project. |
| `context_chars`           | `integer` | `1500`                     | must not be negative | Characters of each neighbor section sent with a request, for continuous prosody.                                                                                                                                                                                                                                                                                     |
| `timeout_seconds`         | `integer` | `180`                      | must be above zero   | Seconds before a speech request times out.                                                                                                                                                                                                                                                                                                                           |

## `[record]`

These keys tune the headless Chromium recording, how narration t=0 is found in it, and its sanity check. Environment variables start with `DECKTALK_RECORD_`.

| Field                          | Type      | Default   | Value                                     | Meaning                                                                                                                                              |
| ------------------------------ | --------- | --------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `settle_seconds`               | `number`  | `0.5`     | must not be negative                      | Shortest wait after the page is ready and before narration t=0. `record --settle` overrides it.                                                      |
| `min_cover_seconds`            | `number`  | `1.5`     | must not be negative                      | Shortest time from the start of the recorder to narration t=0.                                                                                       |
| `browser_path`                 | `string`  | `""`      |                                           | Chromium executable that `record` drives. It is empty for the build that `decktalk install` fetched, and a path here is what a managed machine sets. |
| `color_scheme`                 | `string`  | `"light"` | must be one of light, dark, no-preference | Color scheme that Chromium reports to the page.                                                                                                      |
| `retries`                      | `integer` | `2`       | must not be negative                      | How many more times `record` records a section whose frames stalled.                                                                                 |
| `screenshot_settle_ms`         | `integer` | `400`     | must not be negative                      | Milliseconds that `decktalk screenshots` waits before each slide screenshot.                                                                         |
| `cover_scan_seconds`           | `number`  | `4.0`     | must not be negative                      | Seconds at the start of each recording that `record` scans for the magenta cover.                                                                    |
| `fallback_first_paint_seconds` | `number`  | `1.1`     | must not be negative                      | Guessed first paint if `record` finds no cover and no painted frame. `record` adds `settle_seconds` to it.                                           |
| `cover_luma_min`               | `number`  | `70`      | must be a luma between 0 and 255          | A cover frame has an average luma above this.                                                                                                        |
| `cover_luma_max`               | `number`  | `140`     | must be a luma between 0 and 255          | A cover frame has an average luma below this.                                                                                                        |
| `cover_chroma_min`             | `number`  | `165`     | must be a luma between 0 and 255          | A cover frame has an average U and an average V above this.                                                                                          |
| `painted_ymax`                 | `number`  | `60`      | must be a luma between 0 and 255          | A painted frame has a brightest luma above this.                                                                                                     |
| `painted_yavg_max`             | `number`  | `120`     | must be a luma between 0 and 255          | A painted frame has an average luma below this, so a white flash does not count.                                                                     |
| `black_ymax`                   | `number`  | `40`      | must be a luma between 0 and 255          | `record` reports `BLACK?` when the brightest luma of the middle frame is below this.                                                                 |
| `truncated_slack_seconds`      | `number`  | `0.5`     | must not be negative                      | Allowed shortfall of a recording against its requested length. A larger shortfall makes `record` report `TRUNCATED`.                                 |
| `stall_ms`                     | `integer` | `150`     | must be above zero                        | Longest frame gap after narration t=0, in milliseconds. A longer gap makes `record` try again and report `STALLED`.                                  |

## `[audio]`

These keys set the mix mechanics. Levels live in `[mix]` in `decktalk.toml`. Environment variables start with `DECKTALK_AUDIO_`.

| Field                       | Type     | Default | Value                | Meaning                                                              |
| --------------------------- | -------- | ------- | -------------------- | -------------------------------------------------------------------- |
| `duck_ramp_seconds`         | `number` | `0.5`   | must not be negative | Ramp of the music duck at each edge of a spoken span or a clip.      |
| `ambience_ramp_seconds`     | `number` | `1.0`   | must not be negative | Ramp of the ambience bed at each edge of its span.                   |
| `ambience_pad_seconds`      | `number` | `0.5`   | must not be negative | Seconds that the ambience bed extends past each edge of its section. |
| `marker_mute_ramp_seconds`  | `number` | `0.04`  | must not be negative | Ramp into and out of a marker's mute.                                |
| `marker_boost_ramp_seconds` | `number` | `0.3`   | must not be negative | Ramp into and out of a marker's swell.                               |

## `[verify]`

These keys tune the checks on the assembled mp4. Environment variables start with `DECKTALK_VERIFY_`.

| Field                    | Type               | Default      | Value                                  | Meaning                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------ | ------------------ | ------------ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `after_dip_seconds`      | `number`           | `0.2`        | must not be negative                   | Seconds after a section start to the frame that the start check reads.                                                                                                                                                                                                                                                                                                                         |
| `reference_lead_seconds` | `number`           | `0.1`        | must not be negative                   | Reference lead. It has an effect only above (`max_offset_frames` + 1.5) / `fps`, which is 0.14 s at the defaults.                                                                                                                                                                                                                                                                              |
| `probe_delays`           | `array of numbers` | `[0.7, 1.5]` | must be one or more delays above zero  | Seconds after the cue time for each probe. The later probe catches a slow reveal.                                                                                                                                                                                                                                                                                                              |
| `diff_level`             | `integer`          | `40`         | must be a luma between 0 and 255       | Luma difference that a pixel must exceed to count as changed, for probes and control shares.                                                                                                                                                                                                                                                                                                   |
| `min_changed_percent`    | `number`           | `0.1`        | must be a percentage between 0 and 100 | Smallest changed share, in percent, that the reported probe needs.                                                                                                                                                                                                                                                                                                                             |
| `min_margin_percent`     | `number`           | `0.1`        | must be a percentage between 0 and 100 | Smallest margin, in percentage points, that the reported probe needs.                                                                                                                                                                                                                                                                                                                          |
| `thin_change_factor`     | `number`           | `3.0`        | must be above zero                     | A passing cue whose changed share or margin is below this many times its floor reads `THIN CHANGE?`, an uncertain finding. 1 turns the warning off.                                                                                                                                                                                                                                            |
| `onset_percent`          | `number`           | `0.01`       | must be a percentage between 0 and 100 | Rise in changed share from one frame to the next that marks the onset. It is in percentage points. 0.01 is about 13 pixels.                                                                                                                                                                                                                                                                    |
| `onset_diff_level`       | `integer`          | `12`         | must be a luma between 0 and 255       | Luma difference that a pixel must exceed to count as changed, for the onset scan only.                                                                                                                                                                                                                                                                                                         |
| `click_search_seconds`   | `number`           | `0.25`       | must not be negative                   | Seconds on each side of the cued word's start that the click search covers.                                                                                                                                                                                                                                                                                                                    |
| `max_offset_frames`      | `integer`          | `2`          | must not be negative                   | Offset limit, in frames. The onset can sit this far from the cue time, early or late.                                                                                                                                                                                                                                                                                                          |
| `max_av_frames`          | `integer`          | `3`          | must not be negative                   | a/v limit, in frames, early or late. It is wider because the click carries encoding jitter too.                                                                                                                                                                                                                                                                                                |
| `visible_ymax`           | `number`           | `60`         | must be a luma between 0 and 255       | The start check reports `BLACK` when the brightest luma of its frame is at most this.                                                                                                                                                                                                                                                                                                          |
| `cut_window_seconds`     | `number`           | `0.15`       | must not be negative                   | Seconds of narration before each cut that the cut check measures.                                                                                                                                                                                                                                                                                                                              |
| `cut_max_db`             | `number`           | `-40.0`      |                                        | Loudest RMS level of the cut window, in dBFS, that passes the cut check.                                                                                                                                                                                                                                                                                                                       |
| `max_pop_percent`        | `number`           | `0.1`        | must be a percentage between 0 and 100 | Largest changed share, in percent, across the cut into a section that sets `seamless`. A larger share reads `POP AT CUT`.                                                                                                                                                                                                                                                                      |
| `probe_width`            | `integer`          | `480`        | must be above zero                     | Width in pixels that frames are scaled to before a comparison.                                                                                                                                                                                                                                                                                                                                 |
| `probe_height`           | `integer`          | `270`        | must be above zero                     | Height in pixels that frames are scaled to before a comparison.                                                                                                                                                                                                                                                                                                                                |
| `block_width`            | `integer`          | `240`        | must be above zero                     | Width in pixels of the block-averaged copy of each frame that confirms an onset. Each pixel then averages an 8 by 8 block of a 1080p frame, the size of an H.264 transform block. The encoder can shift a few pixels of a still picture by up to about 15 levels in the frames just before a change. The average cancels that ringing, so a frame is the onset only when a block also changed. |
| `block_height`           | `integer`          | `135`        | must be above zero                     | Height in pixels of the block-averaged copy of each frame that confirms an onset.                                                                                                                                                                                                                                                                                                              |

## `[elevenlabs]`

These keys point at the ElevenLabs API and size its soundscape requests. Environment variables start with `DECKTALK_ELEVENLABS_`.

| Field                       | Type      | Default                          | Value                   | Meaning                                                                                    |
| --------------------------- | --------- | -------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------ |
| `api_base`                  | `string`  | `"https://api.elevenlabs.io/v1"` |                         | Base URL of the ElevenLabs API.                                                            |
| `sound_model`               | `string`  | `"eleven_text_to_sound_v2"`      |                         | Model for ambience and sound effect requests. A soundscape table can name its own.         |
| `music_model`               | `string`  | `"music_v2"`                     |                         | Model for music requests. A soundscape table can name its own.                             |
| `music_bitrate`             | `string`  | `"192k"`                         |                         | Bitrate of the music file that `soundscape` joins from its chunks.                         |
| `max_music_chunk_seconds`   | `integer` | `300`                            | must be above zero      | Longest music request. Longer music is requested in chunks.                                |
| `music_crossfade_seconds`   | `integer` | `2`                              | must not be negative    | Crossfade between two music chunks.                                                        |
| `ambience_seconds`          | `number`  | `25.0`                           | must be above zero      | Length of a generated ambience bed. A soundscape table can set `duration_seconds` instead. |
| `ambience_prompt_influence` | `number`  | `0.3`                            | must be between 0 and 1 | Prompt influence of an ambience request. A soundscape table can set its own.               |
| `sfx_seconds`               | `number`  | `0.5`                            | must be above zero      | Length of a generated sound effect. A soundscape table can set `duration_seconds` instead. |
| `sfx_prompt_influence`      | `number`  | `0.5`                            | must be between 0 and 1 | Prompt influence of a sound effect request. A soundscape table can set its own.            |
| `timeout_seconds`           | `integer` | `600`                            | must be above zero      | Seconds before a sound or music request times out.                                         |

## `[output]`

These keys switch the files a build writes beside the final mp4. Environment variables start with `DECKTALK_OUTPUT_`.

| Field              | Type      | Default | Value | Meaning                                                            |
| ------------------ | --------- | ------- | ----- | ------------------------------------------------------------------ |
| `timestamped_copy` | `boolean` | `false` |       | Write a second copy of the final mp4 named with the date and time. |

## Related

* **Set sections, the voice, and the mix:** [decktalk.toml](/reference/decktalk-toml)
* **Understand the `[verify]` fields:** [Verify](/reference/verify)
* **Override a field for one run:** [CLI](/reference/cli)
