# Prep Show & key shots

> Analyse every shot of a conform in one step: hidden cuts, bad frames, grain, camera move, people, faces, tracking markers, lens, exposure, blur and focus, with a shot report per shot, suggested prep nodes for each comp, and key shots per look.

Prep Show looks at every shot of an edit before anyone opens a comp. It writes a **shot report** per shot, **suggests the prep** each comp needs (never applied until you accept it), and picks a **key shot** for each group of similar shots.

## Run it

| Where | How |
|---|---|
| Oink Review | import the edit and find media, then *Prep Show...*; *Load Shot Report...* opens an earlier run |
| Command line | `./render.sh --prep-show <edit, plates folder or shot list> --out <folder>` |
| Render farm | `farm/openjd/prep_show.template.yaml`: one task per group of shots, then the show report |

Command-line options:

| Option | Does |
|---|---|
| `--edit cut.edl` | the cut, for the editorial checks when you pass a plates folder |
| `--media <folder>` | where an edit's plates are (default: the job folder above the edit) |
| `--shots A,B` | only these shots |
| `--sensor-mm 23.6` | sensor width, so the lens estimate is in mm |
| `--force` | analyse again (reuses the decoded frames and the AI results) |
| `--no-cache` | analyse from scratch |
| `--chunk i/n`, `--merge-only` | split the shots over farm tasks, then build the show report |

It can run overnight: stop it at any time and run it again, and it carries on where it stopped. Each shot's report is written as soon as that shot is done.

It never gets in your way. It uses the graphics card one shot at a time and lets your own work go first.

## What the shot report tells you

Every finding has a **confidence** and a plain **why**.

| Finding | What it means |
|---|---|
| Hidden cuts | a cut inside a shot. Found from the pixels, and from the edit when the shot comes from a nested sequence or stringout. Temporal tools (denoise, clean plate, retime, tracking) must not reach across it. |
| Bad frames | frames that can't be read, missing frames, NaN pixels, blank frames, repeated frames, and one-off frames that match neither neighbour |
| Grain | none / low / medium / high, with its character: fine or clumped, colour noise, which tones and channel are noisiest |
| Camera | static, pan, tilt, push in / pull out, roll, handheld, and how far it moves |
| People | how many at once, each tracked through the shot, and who they are across the show (P1, P2 ...) |
| Faces | how many |
| Markers | tracking crosses on walls and floors, with their positions (Nuke pixels, y up) |
| Lens | from the file's metadata; otherwise a rough estimate from the picture, marked "estimate" |
| Exposure | brightness, clipped highlights, crushed blacks, colour cast, flicker |
| Motion blur and focus | how long the blur streaks are, and how sharp the shot is |

Outputs, in the folder you chose:

- `prep_show.html` and `prep_show.json`: the whole show;
- `shots/<shot>/shot_report.html` and `.json`: one shot, with thumbnails and one frame marked up (people green, faces cyan, markers red).

## Suggested prep in each comp

For each finding, Prep Show proposes a node with its confidence:

| Finding | Proposal |
|---|---|
| bad frames | FrameFixer on those frames |
| hidden cut | a note: split the shot there. The cut frames are also stored on the plate Read (saved with the comp), so FrameFixer and PlateDenoise never reach across them |
| medium or high grain | PlateDenoise (regrain at the end) |
| people | AIRoto with the text "person" |
| markers | AICleanPlate in *surface* mode to fill them from the surface around them (the *Remove tracking markers* tool tracks each marker and builds the mask) |
| moving camera | CameraTracker |

In the comp they arrive **disabled**, in a backdrop, labelled `PROPOSED <confidence>%`. Nothing changes the picture until you enable a node.

The proposals can also become tasks with a bid (days) in the [production tracker](/docs/concepts/production-tracker), and *Create Comp* links the comp to its task.

## Key shots

Prep Show groups the shots by **look** (colour and exposure), **set** (the background, with people ignored), **content**, **camera setup** (how close, static or moving) and **who is in them**. For each group it picks the most typical shot as the **key shot**, the one to develop the look and the comp template on, and says why. It also flags the **hardest shots** (motion blur, hair, people crossing each other, markers, a moving camera, length) for bidding and scheduling.

In Oink Review, key shots have a KEY badge on the timeline, each group has its own colour, and the Shot report panel shows the selected shot's report.

## Tested on a real job

On a 21-shot UHD music promo (NJR), all 21 shots took 9 min 27 s from scratch on one RTX 4090 shared with other work (a re-run from the caches: 12 s):

| Check | Result |
|---|---|
| Hidden cut inside a shot (a seamless match between two takes) | found from the edit; the pixels show no change there |
| Visible cuts, a jump in time, a foreign frame, a repeated frame (test splices of real frames) | 4 of 4 |
| Unreadable frames (4) | 4 found, no false flags |
| Shots with tracking markers (13) | 12 found, 1 false (precision and recall 92%) |
| The red tracking cross on the test shot | found within 3 px |
| A slow tilt | "tilt" |
| The logo cards | static stills |
| People present | every shot with performers, none on the logo cards |
| Handheld vs smooth moves | matches the layout cameras on all 17 shots that have one |
| Lens estimate | about 17 degrees too wide, so it is marked as a rough estimate |

The key shots came out as the promo's natural groups: the logo cards, the shoe and pedal inserts, the stage wides, the guitarist's close-ups, the bassist's close-ups and the balloon wides, each with its key shot.

## Good to know

- 2D analysis can't tell a pan from a sideways dolly, or a tilt from a crane move. The report says "pan" or "tilt" for the way the picture moves.
- The lens estimate from a single picture is rough. Solve the camera with CameraTracker for the real focal length.
- A hidden cut between two takes of the same setup can be invisible in the pixels. Give Prep Show the edit (`--edit`) so it can see nested sequences.


---
Sources: opencomp_core/prep/cli.py, opencomp_core/prep/analyze.py, opencomp_core/prep/keyshots.py, opencomp_core/prep/proposals.py, opencomp_core/prep/comp_apply.py, opencomp_core/prep/sources.py, opencomp_ai/ops/prep_show.py, farm/openjd/prep_show.template.yaml, opencomp_review/src
