# Inspecting and previewing

> The commands that let you (or an agent) check a video before rendering it, including `validate`, `timeline`, `inspect`, `trace`, `storyboard`, `still`, `probe`, `analyze`, `list` and `fonts`, with real output and their `--json` forms.

Every frame in vidmake is a pure function of time, so any frame can be computed on its own, without
playing the video up to it. The inspection commands use that: they answer precise questions about one frame,
one layer or the whole timeline in milliseconds, without encoding anything.

| question | command |
|---|---|
| Will this compile? Is anything off-canvas, invisible or mistimed? | [`validate`](https://vidmake.app/docs/inspecting.md#validate) |
| What's in this file? | [`list`](https://vidmake.app/docs/inspecting.md#list) |
| When is each layer on screen? Which audio plays when? | [`timeline`](https://vidmake.app/docs/inspecting.md#timeline) |
| Where exactly is every layer at 2.5 s, and how big is it? | [`inspect`](https://vidmake.app/docs/inspecting.md#inspect) |
| How does this layer move over time? Does the spring overshoot? | [`trace`](https://vidmake.app/docs/inspecting.md#trace) |
| What does the whole video look like? | [`storyboard`](https://vidmake.app/docs/inspecting.md#storyboard) |
| What does this exact frame look like at full size? | [`still`](https://vidmake.app/docs/inspecting.md#still) |
| How long is this clip? Does it have audio? | [`probe`](https://vidmake.app/docs/inspecting.md#probe) |
| Where are the beats? How loud is the music, as `amp`/`bass` will see it? | [`analyze`](https://vidmake.app/docs/inspecting.md#analyze) |
| Which font names can I use? | [`fonts`](https://vidmake.app/docs/inspecting.md#fonts) |

`validate`, `timeline`, `inspect`, `trace`, `still` and `storyboard` all take the same project options:
`-c/--comp <id>` (default: the first composition), `-p/--props` (JSON object or `key=value`, repeatable) and
`--props-file`, so you can check a composition with the exact [props](https://vidmake.app/docs/props.md) you will render it with.
The text reports are for reading; `validate`, `list`, `timeline`, `inspect` and `trace` also take `--json` for
scripts and agents. `still` and `storyboard` print one JSON line describing the image they wrote, `probe` only
prints JSON, `analyze` prints a report or (with `--json`) data, and `fonts` prints one family per line.

The examples on this page use this demo:

**Demo: A small scene to inspect: a card slides in, a title pops, a ring fills** (rendered video: https://vidmake.app/media/inspect-scene.mp4)

```json
{
  "fonts": [
    { "family": "Schibsted Grotesk", "path": "fonts/SchibstedGrotesk.ttf" },
    { "family": "Schibsted Grotesk", "path": "fonts/SchibstedGrotesk-Italic.ttf" },
    { "family": "JetBrains Mono", "path": "fonts/JetBrainsMono.ttf" }
  ],
  "compositions": [{
    "id": "card", "description": "A small scene to inspect: a card slides in, a title pops, a ring fills",
    "width": 1280, "height": 720, "fps": 30, "duration": "4s",
    "background": "#f4f1ea",
    "layers": [
      { "id": "panel", "type": "rect", "width": 760, "height": 360, "cornerRadius": 3, "fill": "#fbf9f4",
        "stroke": "#161412", "strokeWidth": 2, "y": "50%",
        "x": { "from": -400, "to": 640, "duration": "0.9s", "ease": "easeOutCubic" } },
      { "id": "title", "type": "text", "text": ["Every frame, ", { "text": "checkable", "italic": true, "fontWeight": 400 }],
        "font": "Schibsted Grotesk", "fontWeight": 860, "fontSize": 64, "letterSpacing": -2.8,
        "fill": "#161412", "y": "40%", "start": "0.6s", "enter": "pop", "exit": "fade" },
      { "id": "ring", "type": "arc", "x": "50%", "y": "61%", "width": 110, "stroke": "#c92a26", "strokeWidth": 5,
        "start": "1s", "endAngle": { "from": 0, "to": 360, "duration": "2s", "ease": "easeInOutCubic" } },
      { "id": "label", "type": "text", "text": "${round(map(t, 0, 2, 0, 100))}%", "font": "JetBrains Mono", "fontSize": 22,
        "fill": "#4a4640", "x": "50%", "y": "61%", "start": "1s" }
    ]
  }]
}
```

## validate

`validate` compiles the composition exactly as `render` would (schema, layer fields, assets, fonts,
expressions, timing) and then lints the layout at a few frames.

```console
$ vidmake validate inspect-scene.json
✓ card — 120 frames (4.00s)
```

- `--all` checks every composition in the file, not just the first (or `--comp`).
- Errors print `✗ <composition>: <message>` and exit with status **2**. Messages name the layer, its position
  in the file and the field, e.g. ``layer `title` (main > layers[0]): font family `Helvetica Neue` not found``.
- Warnings print under the `✓` line and don't change the exit status (0). Each layout warning ends with a code
  like `[offCanvas]` that you can silence per layer. All codes and what triggers them are on the
  [lint page](https://vidmake.app/docs/lint.md).

`--json` returns the same information as data:

```bash
vidmake validate project.json --all --json
```

```json
{
  "ok": true,
  "compositions": [
    { "composition": "main", "ok": true, "frames": 90.0, "duration": 3.0,
      "warnings": ["layer `ghost` is invisible (opacity 0.00) at its midpoint, frame 45 [invisible]"] }
  ]
}
```

A failed composition has `"ok": false` and an `"error"` string instead of `frames`/`warnings`, and the top-level
`ok` is false. The common error messages are explained in [troubleshooting](https://vidmake.app/docs/troubleshooting.md#validate-errors).

## list

`list` prints the compositions in a file with their size, frame rate, duration (as written), number of top-level
layers and default props. It doesn't compile anything, so it works on a project with errors.

```console
$ vidmake list examples/showcase.json
showcase  1920x1080 @30fps  duration="auto"  layers=4  props={"brand":"vidmake","accent":"#c92a26"}
    Three scenes in a series with transitions, media, captions, audio and a reusable lower-third
lowerThird  1920x1080 @30fps  duration="3s"  layers=4  props={"name":"Name","role":"Role","color":"#c92a26"}
    Reusable lower-third component. Props: name, role, color
```

`list --json` returns an array of `{id, width, height, fps, duration, description, props, layers}`.

## timeline

`timeline` answers *when*: the start, end and duration of every layer (nested layers indented under their group),
its enter/exit presets, media source, text, and a Gantt chart with one column per 1/60 of the composition.

```console
$ vidmake timeline inspect-scene.json
Composition `card` — 1280x720 @ 30fps, 120 frames (4.00s)

ID     TYPE         START      END      DUR  DETAILS
panel  rect         0.00s    4.00s    4.00s  
title  text         0.60s    4.00s    3.40s  enter:pop exit:fade "Every frame, checkable"
ring   arc          1.00s    4.00s    3.00s  
label  text         1.00s    4.00s    3.00s  "0%"

       |0s             1s             2s             3s             |
panel  |████████████████████████████████████████████████████████████|
title  |·········███████████████████████████████████████████████████|
ring   |···············█████████████████████████████████████████████|
label  |···············█████████████████████████████████████████████|
```

Times are absolute (composition seconds), after `start`, `duration`/`end`, series offsets, transitions and
`repeat` delays have been applied, so this is the place to check a [series](https://vidmake.app/docs/series.md) or a staggered list.
The `DETAILS` column shows `enter:` and `exit:` presets (`transition` for series transitions), `src:` for media,
`♪` for layers that contribute audio, and text or caption content. Text containing `${...}` shows its value at
frame 0 (`"0%"` above), with each [repeat](https://vidmake.app/docs/repeat.md) copy's own `i`.

A composition with [markers](https://vidmake.app/docs/time.md#markers) lists them under the header and draws them on a `markers` row
under the Gantt chart (the first letter of each name at its time):

```console
$ vidmake timeline time-markers.json
Composition `markers` — 1280x720 @ 30fps, 120 frames (4.00s)

Markers: @title 0.30s  @underline 1.00s  @sub 1.60s  @out 3.40s

ID           TYPE         START      END      DUR  DETAILS
title        text         0.30s    3.40s    3.10s  enter:fadeUp exit:fade "Name the beats"
sub          text         1.60s    3.40s    1.80s  enter:fadeUp exit:fade "then point at them from any layer"
clock        text         0.00s    4.00s    4.00s  "since('underline') = -1.00s"
rail         rect         0.00s    4.00s    4.00s  
tick.0       rect         0.00s    4.00s    4.00s  
tick.1       rect         0.00s    4.00s    4.00s  
tick.2       rect         0.00s    4.00s    4.00s  
tick.3       rect         0.00s    4.00s    4.00s  
tick-name.0  text         0.00s    4.00s    4.00s  "@title"
tick-name.1  text         0.00s    4.00s    4.00s  "@underline"
tick-name.2  text         0.00s    4.00s    4.00s  "@sub"
tick-name.3  text         0.00s    4.00s    4.00s  "@out"
playhead     rect         0.00s    4.00s    4.00s  

             |0s             1s             2s             3s             |
title        |····███████████████████████████████████████████████·········|
sub          |························███████████████████████████·········|
clock        |████████████████████████████████████████████████████████████|
rail         |████████████████████████████████████████████████████████████|
tick.0       |████████████████████████████████████████████████████████████|
tick.1       |████████████████████████████████████████████████████████████|
tick.2       |████████████████████████████████████████████████████████████|
tick.3       |████████████████████████████████████████████████████████████|
tick-name.0  |████████████████████████████████████████████████████████████|
tick-name.1  |████████████████████████████████████████████████████████████|
tick-name.2  |████████████████████████████████████████████████████████████|
tick-name.3  |████████████████████████████████████████████████████████████|
playhead     |████████████████████████████████████████████████████████████|
markers      |    t          u        s                          o        |
```

When the composition has sound, an `Audio:` section follows with every clip that will be mixed:

```console
$ vidmake timeline examples/showcase.json
Composition `showcase` — 1920x1080 @ 30fps, 387 frames (12.90s)

ID               TYPE         START      END      DUR  DETAILS
scenes           group        0.00s   12.90s   12.90s  "3 children"
  intro          group        0.00s    4.00s    4.00s  exit:transition "4 children"
    intro-bg     rect         0.00s    4.00s    4.00s  
    logo         image        0.00s    4.00s    4.00s  enter:pop src:assets/logo.svg
    headline     text         0.00s    4.00s    4.00s  enter:fadeUp per unit "Programmatic video"
    tagline      text         1.20s    4.00s    2.80s  enter:typewriter "JSON in. MP4 out. No UI."
  media          group        3.40s    8.40s    5.00s  enter:transition "3 children"
    photo        image        3.40s    8.40s    5.00s  src:assets/photo.jpg
    clip         video        3.40s    8.40s    5.00s  enter:scale src:assets/clip.mp4 ♪
    lower-third  use          4.40s    7.40s    3.00s  "4 children"
      lt-bar     rect         4.40s    7.40s    3.00s  enter:wipeRight exit:fadeDown
      lt-accent  rect         4.40s    7.40s    3.00s  enter:fade exit:fade
      lt-name    text         4.65s    7.40s    2.75s  enter:fadeRight exit:fade "Big Buck Test"
      lt-role    text         4.80s    7.40s    2.60s  enter:fadeRight exit:fade "ffmpeg testsrc2"
  stats          group        7.90s   12.90s    5.00s  enter:transition "7 children"
    stats-bg     rect         7.90s   12.90s    5.00s  
    ring-track   arc          7.90s   12.90s    5.00s  
    ring         arc          7.90s   12.90s    5.00s  
    pct          text         7.90s   12.90s    5.00s  "0%"
    chart-line   path         7.90s   12.90s    5.00s  
    stars        group        7.90s   12.90s    5.00s  "5 children"
      star1      star         9.40s   12.90s    3.50s  enter:pop
      star2      star         9.60s   12.90s    3.30s  enter:pop
      star3      star         9.80s   12.90s    3.10s  enter:pop
      star4      star        10.00s   12.90s    2.90s  enter:pop
      star5      star        10.20s   12.90s    2.70s  enter:pop
    viz          waveform     7.90s   10.90s    3.00s  src:assets/music.mp3
subs             captions     0.00s   12.50s   12.50s  "3 captions"
music            audio        0.00s   12.00s   12.00s  src:assets/music.mp3 ♪
watermark        text         0.00s   12.90s   12.90s  "vidmake"

                 |0s                     5s                     10s           |
scenes           |████████████████████████████████████████████████████████████|
  intro          |███████████████████·········································|
    intro-bg     |███████████████████·········································|
    logo         |███████████████████·········································|
    headline     |███████████████████·········································|
    tagline      |·····██████████████·········································|
  media          |···············█████████████████████████····················|
    photo        |···············█████████████████████████····················|
    clip         |···············█████████████████████████····················|
    lower-third  |····················███████████████·························|
      lt-bar     |····················███████████████·························|
      lt-accent  |····················███████████████·························|
      lt-name    |·····················██████████████·························|
      lt-role    |······················█████████████·························|
  stats          |····································████████████████████████|
    stats-bg     |····································████████████████████████|
    ring-track   |····································████████████████████████|
    ring         |····································████████████████████████|
    pct          |····································████████████████████████|
    chart-line   |····································████████████████████████|
    stars        |····································████████████████████████|
      star1      |···········································█████████████████|
      star2      |············································████████████████|
      star3      |·············································███████████████|
      star4      |··············································██████████████|
      star5      |···············································█████████████|
    viz          |····································███████████████·········|
subs             |███████████████████████████████████████████████████████████·|
music            |████████████████████████████████████████████████████████····|
watermark        |████████████████████████████████████████████████████████████|

Audio:
  clip                    3.40s →    8.40s  src:examples/assets/clip.mp4  trim:1.00s rate:1
  music                   0.00s →   12.00s  src:examples/assets/music.mp3  trim:0.00s rate:1
```

`timeline --json` returns `{composition, layers, audio, warnings}`. Each layer entry has `id`, `type`, `depth`,
`parent`, `startFrame`, `endFrame`, `start`, `end`, `duration`, `hasAudio`, and when present `enter`, `exit`,
`src`, `text`. Each audio entry has `layer`, `path`, `start`, `length`, `trim`, `rate`, `looping`, `volume`
(time/gain points), `fadeIn` and `fadeOut`, all in seconds.

## inspect

`inspect` answers *where*: every layer visible at one frame, in drawing order (bottom first), with its resolved
position, size, rotation, scale, effective opacity and bounding box.

```console
$ vidmake inspect inspect-scene.json -t 0.7s
Frame 21 (0.70s) of `card` (1280x720), 2 visible layer(s), drawn bottom→top:

ID                       TYPE            X        Y       W       H    ROT  SCALE  OPAC  BBOX [x0,y0,x1,y1]          NOTES
panel                    rect        628.6    360.0   760.0   360.0    0.0   1.00  1.00  [249,180,1009,540]          
title                    text        640.0    288.0   677.9    76.8    0.0   0.41  1.00  [501,272,779,304]           enter:pop "Every frame, checkable"
```

- Pick the frame with `-f 21` or `-t 0.7s` (any [time value](https://vidmake.app/docs/time.md)); without either, frame 0. A frame
  outside the composition fails with ``error: frame 150 is outside the composition (0..120)``.
- `X`, `Y` are the layer's anchor position in its **parent's** coordinates, after animation and presets.
  `W`, `H` are its unscaled box. `SCALE` is the average of `scaleX` and `scaleY`.
- `OPAC` is the effective opacity, multiplied with every parent's opacity: what you actually see.
- `BBOX [x0,y0,x1,y1]` is the axis-aligned box in **composition** pixels, after every transform. Compare it
  with the canvas to find layers that are cut off; a box completely outside is marked `OFF-CANVAS`.
- `NOTES` shows presets in progress (`enter:pop`), text, and media sources.
- Layers outside their time window, layers with `visible: false`, and the children of a group whose opacity is 0
  are not listed.

Above, at 0.7 s the panel is still sliding in (`X` 628.6 of 640), the title is mid-`pop` (scale 0.41, still growing
toward its overshoot), and the ring and label haven't started.

`-l <id>` keeps only one layer; with `--json` the values are full precision:

```console
$ vidmake inspect inspect-scene.json -t 2s -l title --json
{
  "frame": 60.0,
  "time": 2.0,
  "layers": [
    {
      "id": "title",
      "type": "text",
      "depth": 0,
      "localFrame": 42.0,
      "x": 640.0,
      "y": 288.0,
      "width": 677.8937377929688,
      "height": 76.80000305175781,
      "rotation": 0.0,
      "scaleX": 1.0,
      "scaleY": 1.0,
      "opacity": 1.0,
      "visibleOpacity": 1.0,
      "bbox": [
        301.0531311035156,
        249.60000610351562,
        978.9468994140625,
        326.4000244140625
      ],
      "text": "Every frame, checkable"
    }
  ]
}
```

`-l` fails when the layer isn't on screen at that frame: ``error: layer `ring` is not visible at frame 6 (see `vidmake timeline`)``.
Copies made by [`repeat`](https://vidmake.app/docs/repeat.md) are listed as `<id>.<i>` (`bar.0`, `bar.1`, ...).

> [!TIP]
> `inspect` reads the frame exactly; it does not apply composition motion blur. Use it, not your eyes, to answer
> "is the title centered?" (`(x0 + x1) / 2` of the bbox) or "do these two layers overlap?".

## trace

`trace` answers *how it moves*: one layer's resolved values sampled over a range of frames.

```console
$ vidmake trace inspect-scene.json -l title --from 0.6s --to 1.5s --every 2
 FRAME    TIME        X        Y       W       H    ROT  SCALE  OPAC  NOTES
    18   0.60s    640.0    288.0   677.9    76.8    0.0   0.00  1.00  enter:pop "Every frame, checkable"
    20   0.67s    640.0    288.0   677.9    76.8    0.0   0.22  1.00  enter:pop "Every frame, checkable"
    22   0.73s    640.0    288.0   677.9    76.8    0.0   0.61  1.00  enter:pop "Every frame, checkable"
    24   0.80s    640.0    288.0   677.9    76.8    0.0   0.93  1.00  enter:pop "Every frame, checkable"
    26   0.87s    640.0    288.0   677.9    76.8    0.0   1.09  1.00  enter:pop "Every frame, checkable"
    28   0.93s    640.0    288.0   677.9    76.8    0.0   1.13  1.00  enter:pop "Every frame, checkable"
    30   1.00s    640.0    288.0   677.9    76.8    0.0   1.10  1.00  enter:pop "Every frame, checkable"
    32   1.07s    640.0    288.0   677.9    76.8    0.0   1.05  1.00  enter:pop "Every frame, checkable"
    34   1.13s    640.0    288.0   677.9    76.8    0.0   1.01  1.00  enter:pop "Every frame, checkable"
    36   1.20s    640.0    288.0   677.9    76.8    0.0   0.99  1.00  enter:pop "Every frame, checkable"
    38   1.27s    640.0    288.0   677.9    76.8    0.0   0.99  1.00  enter:pop "Every frame, checkable"
    40   1.33s    640.0    288.0   677.9    76.8    0.0   0.99  1.00  enter:pop "Every frame, checkable"
    42   1.40s    640.0    288.0   677.9    76.8    0.0   1.00  1.00   "Every frame, checkable"
    44   1.47s    640.0    288.0   677.9    76.8    0.0   1.00  1.00   "Every frame, checkable"
```

- `-l <id>` is required. `--every` is the step in frames or time (default `5`; `--every 0.25s` works).
- `--from` and `--to` limit the range (default: the whole composition; the end is inclusive).
- Rows where the layer isn't on screen print `(not visible)`. A misspelled id prints only such rows, so if a
  trace is all `(not visible)`, check the id with `timeline`.
- `OPAC` is the effective opacity, as in `inspect`. `NOTES` lists active presets.

The trace above shows the `pop` preset: scale 0 at the layer's first frame, an overshoot to 1.13, a small dip
below 1, and the preset no longer listed from frame 42 (`pop` plays on the `bouncy` motion, 0.8 s from the layer's start). Here is a tween with `easeOutCubic` on `x`:

```console
$ vidmake trace inspect-scene.json -l panel --every 3 --to 1s
 FRAME    TIME        X        Y       W       H    ROT  SCALE  OPAC  NOTES
     0   0.00s   -400.0    360.0   760.0   360.0    0.0   1.00  1.00  
     3   0.10s    -90.4    360.0   760.0   360.0    0.0   1.00  1.00  
     6   0.20s    150.7    360.0   760.0   360.0    0.0   1.00  1.00  
     9   0.30s    331.9    360.0   760.0   360.0    0.0   1.00  1.00  
    12   0.40s    461.7    360.0   760.0   360.0    0.0   1.00  1.00  
    15   0.50s    548.7    360.0   760.0   360.0    0.0   1.00  1.00  
    18   0.60s    601.5    360.0   760.0   360.0    0.0   1.00  1.00  
    21   0.70s    628.6    360.0   760.0   360.0    0.0   1.00  1.00  
    24   0.80s    638.6    360.0   760.0   360.0    0.0   1.00  1.00  
    27   0.90s    640.0    360.0   760.0   360.0    0.0   1.00  1.00  
    30   1.00s    640.0    360.0   760.0   360.0    0.0   1.00  1.00
```

`trace --json` returns an array of rows; visible rows have `frame`, `time`, `visible`, `x`, `y`, `width`, `height`,
`rotation`, `scaleX`, `scaleY`, `opacity` (the layer's own), `visibleOpacity` (with parents), `bbox`, `text` and
`active`; invisible rows only `frame`, `time` and `visible: false`.

## storyboard

`storyboard` renders a labeled grid of frames into one PNG. It's the fastest way to *see* a video: open the image
(or, for an agent, read it as an image) and check composition, rhythm and anything that looks wrong.

```bash
vidmake storyboard project.json -o sb.png -n 8
```

`vidmake storyboard inspect-scene.json -n 8` produces:

![vidmake storyboard inspect-scene.json -n 8](https://vidmake.app/media/storyboard-d8b8e8b5c589.jpg)

| flag | default | |
|---|---|---|
| `-o, --out` | `storyboard.png` | output PNG |
| `-n, --count` | 12 | evenly spaced frames, from the first to the last |
| `--at` | | explicit frames or times, comma separated: `--at 0,1s,45,2.5s` (overrides `-n`; clamped to the composition) |
| `--cols` | 4 | thumbnails per row |
| `--scale` | 0.25 | size of each thumbnail relative to the composition |

Each tile is labeled with its frame number and time. The command prints
`{"output": ..., "frames": [...], "width": ..., "height": ...}`. Storyboards render real frames, including motion
blur, video frames and effects.

Use `--at` to look closely at a transition or an entrance:

`vidmake storyboard inspect-scene.json --at 0.6s,0.65s,0.7s,0.75s --cols 4 --scale 0.3` produces:

![vidmake storyboard inspect-scene.json --at 0.6s,0.65s,0.7s,0.75s --cols 4 --scale 0.3](https://vidmake.app/media/storyboard-b555f488661b.jpg)

## still

`still` renders one full-resolution frame to a PNG, the same pixels `render` would produce for that frame
(including transparency when the composition has no background).

```bash
vidmake still project.json -t 2.5s -o frame.png
```

`vidmake still inspect-scene.json -t 2.5s` produces:

![vidmake still inspect-scene.json -t 2.5s](https://vidmake.app/media/still-88a6f54deb76.jpg)

`-f`/`-t` choose the frame (default 0), `-o` the file (default `still.png`), `--scale` the resolution (default 1).
It prints `{"output": ..., "frame": 75.0, "time": 2.5, "width": 1280, "height": 720}`. Stills are also handy as
poster images and thumbnails.

## probe

`probe` prints metadata for media files as JSON: what you need before writing `duration`, `trimStart` or sizes.
It takes any number of files; paths are relative to where you run it.

```console
$ vidmake probe assets/clip.mp4 assets/music.mp3 assets/logo.svg
[
  {
    "path": "assets/clip.mp4",
    "kind": "video",
    "duration": 6.0,
    "width": 1280,
    "height": 720,
    "fps": 30.0,
    "hasVideo": true,
    "hasAudio": true,
    "videoCodec": "h264",
    "audioCodec": "aac",
    "sampleRate": 48000
  },
  {
    "path": "assets/music.mp3",
    "kind": "audio",
    "duration": 12.0,
    "width": null,
    "height": null,
    "fps": null,
    "hasVideo": false,
    "hasAudio": true,
    "videoCodec": null,
    "audioCodec": "mp3",
    "sampleRate": 48000
  },
  {
    "path": "assets/logo.svg",
    "kind": "image",
    "duration": null,
    "width": 200,
    "height": 200,
    "fps": null,
    "hasVideo": true,
    "hasAudio": false,
    "videoCodec": null,
    "audioCodec": null,
    "sampleRate": null
  }
]
```

`kind` is `video`, `audio`, `image` or `unknown`. Images (png, jpg, webp, bmp, svg) are read directly; everything
else goes through `ffprobe`. Media layers default to their source length, so a 6 s clip makes a 6 s layer unless
you set `duration`; see [video](https://vidmake.app/docs/video.md) and [audio](https://vidmake.app/docs/audio.md).

## analyze

`analyze` answers *what the music does*: the beat times, tempo and loudness curves that the
[audio-reactive](https://vidmake.app/docs/audio-reactive.md) variables `amp`, `bass`, `beat` and `beats` will see. Give it an audio or video
file to plan an edit, or a project to check the mixed soundtrack of a composition after trims, fades and volume
changes:

```console
$ vidmake analyze audio-reactive-meters.json --every 1s
6.00s at 30.0 fps (180 frames)
beats: 9, tempo ≈120 BPM
  0.00 1.00 1.50 2.00 3.00 3.50 4.00 5.00 5.50s
onsets: 12 (TIME  RISE  PEAK  BAND)
    0.499s  +12.3 dB   -8.9 dBFS  mid
    1.008s  +12.5 dB   -8.8 dBFS  mid
    1.507s  +12.4 dB   -8.7 dBFS  mid
    2.005s  +12.8 dB   -8.4 dBFS  mid
    2.504s  +12.4 dB   -8.8 dBFS  mid
    3.003s  +12.5 dB   -8.7 dBFS  mid
    3.502s  +12.4 dB   -8.6 dBFS  mid
    4.001s  +12.7 dB   -8.3 dBFS  mid
    4.500s  +12.6 dB   -8.6 dBFS  mid
    4.590s  +10.6 dB  -10.6 dBFS  mid
    5.009s  +12.5 dB   -8.8 dBFS  mid
    5.507s  +12.3 dB   -8.9 dBFS  mid

        MEAN    P10 MEDIAN    P90 AT CEILING
amp     0.53   0.25   0.49   0.90         6%
bass    0.31   0.09   0.24   0.61         3%

   TIME  AMP mean/peak                   BASS mean/peak                  BEATS   (bar = mean, ▏ = peak)
  0.00s  0.54/1.00 ███████████        ▏ 0.46/1.00 █████████          ▏   1
  1.00s  0.54/1.00 ███████████        ▏ 0.16/0.38 ███    ▏               2
  2.00s  0.54/1.00 ███████████        ▏ 0.46/1.00 █████████          ▏   1
  3.00s  0.54/1.00 ███████████        ▏ 0.16/0.38 ███    ▏               2
  4.00s  0.54/1.00 ███████████        ▏ 0.46/1.00 █████████          ▏   1
  5.00s  0.44/1.00 █████████          ▏ 0.14/0.38 ███    ▏               2
```

The header has the length and the beats; the table has the mean, percentiles and the share of frames **at the
ceiling** (0.98 or more) for `amp` and `bass`; the curve has one row per `--every` interval (default `0.5s`) with
the mean and peak of each and the number of beats starting in it. When a variable sits at its ceiling for 10% of
the frames or more, or no beats are found, a `warning:` line says so and suggests a fix.

| flag | default | |
|---|---|---|
| `--every` | `0.5s` | curve interval, in frames or a time |
| `--fps` | `30` | frame rate for a media file (a project uses its composition's) |
| `-c, --comp` | first | composition, for a project file |
| `--json` | | the report as data: `beats`, `amp`, `bass`, `warnings`, `curve` |

`analyze` needs ffmpeg to decode the audio. A project whose composition has no sound fails with
``error: composition `main` has no audio``. How to read the report and turn it into expressions is on the
[audio-reactive page](https://vidmake.app/docs/audio-reactive.md#check-the-soundtrack-with-analyze).

## fonts

`fonts` lists the font families vidmake can find on this machine. An optional argument filters by substring
(case-insensitive) and then also shows what each family has: its static weights, the range of a variable font's
`wght` axis, and whether there is an italic (without one, `"italic": true` is drawn slanted). `--faces` shows the
same for every family. `--project` adds the families declared in a project's `fonts` list:

```console
$ vidmake fonts mono
3270 Nerd Font Mono  weights 400  no italic (italic: true is slanted)
Andale Mono  weights 400  no italic (italic: true is slanted)
Consola Mono  weights 700  no italic (italic: true is slanted)
PT Mono  weights 400,700  no italic (italic: true is slanted)
Space Mono  weights 400,700  italic 400,700
Victor Mono  weights 100,200,300,400,500,600,700  italic 100,200,300,400,500,600,700
```

```console
$ vidmake fonts schibsted --project inspect-scene.json
Schibsted Grotesk  weights 400–900 variable  italic 400–900 variable
```

Check the weights before you design: on a family listed as `weights 400,700`, a `fontWeight` of 300 renders as
400. A declared family is listed under the name you gave it. The family names are what `font` accepts in a
[text layer](https://vidmake.app/docs/text.md). Results depend on the machine, so a
project that uses system fonts may not render the same elsewhere; ship the font files with the project and declare
them in `fonts` instead.

## docs

`vidmake docs` prints the [full reference](https://vidmake.app/docs/reference.md); `vidmake docs <topic>` prints only the sections whose
heading contains the topic (case-insensitive), which is a cheap way for an agent to refresh one area:

```console
$ vidmake docs lint
## Lint

`validate` warnings end with a code: `offCanvas` (entirely outside the canvas at its midpoint), `textOverflow` (text partly
outside), `invisible` (opacity ~0 at its midpoint), `zeroDuration`, `afterEnd` (starts after the composition ends), `srcTemplate` (a `${...}` `src` resolves to the same file in every copy).
When a warning is intended (rays that fly off-screen, a blinking cursor), silence it on the layer:
`"lint": { "ignore": ["offCanvas", "invisible"] }`, or `"lint": false` for all. A group's setting covers its children.
```

## Debugging checklist

When something looks wrong, go from cheap to expensive:

1. **`vidmake validate project.json --all`.** Fix every error. Read every warning: each one is either a bug or
   should be [silenced on purpose](https://vidmake.app/docs/lint.md).
2. **`vidmake timeline project.json`.** Is the layer on screen at the time you expect? Remember that animation
   times are local to the layer's `start` (see [time](https://vidmake.app/docs/time.md)), and that children of a group are timed
   relative to the group.
3. **`vidmake storyboard project.json -o sb.png`** and look at it. Nothing visible? Check the order of layers (the
   last one is on top), a full-size `rect` covering everything, or a fill that matches the background.
4. **`vidmake inspect project.json -t <time> -l <id>`.** Check `OPAC` (0 means a parent or a preset hides it),
   `SCALE` (0 at the first frame of `pop`/`scale`), and the `BBOX` against the canvas size.
5. **`vidmake trace project.json -l <id> --every 2`** across the problem window. Jumps mean a keyframe or ease
   is wrong; a flat line means the animation never starts (a tween `start` after the layer ends, or times in
   frames where you meant seconds).
6. **`vidmake still project.json -t <time>`** to look at full resolution: text rendering, thin strokes, blur.
7. **`vidmake render ... --draft --frames <range>`** to check motion and audio sync in just that section.

> [!AGENT]
> A good loop: `validate` → `storyboard -n 12` (look at the image) → fix → `inspect -t` on any frame that looked
> off → `render --json`. Use `--json` on reports when you will parse them, and the text forms when you want a quick
> read. Keep the `done` event of the final render as proof of what was written.

Editing commands that change the project from the command line are on the [editing page](https://vidmake.app/docs/editing.md), and
every command with its full help text is on the [CLI page](https://vidmake.app/docs/cli.md).
