Skip to content
Back to skills

Footage Recording

ASecurity

Record Hypersomnia gameplay footage for videos (devlogs, trailers, the site) - stage a shot in the editor (quick test spawns, bots walking to markers, playtest spawns), let the editor record the playtest, render the recording offline at exact 60 fps with sound (capture_replay.sh - camera, HUD, laser, no player, from/to, slow motion), re-render an old recording on a changed map, and keep every source safe. Use whenever footage is needed - "nagraj footage", "nagraj to", "wyrenderuj replay", "zr...

  • 1,733 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 19, 2026
developmentgonoderailsawstestinggit

Works with

  • cursor
  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 19, 2026

npx -y skills add TeamHypersomnia/Hypersomnia --skill footage-recording --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Footage Recording?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Footage Recording
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/teamhypersomnia-footage-recording/badge)](https://www.skillsdirectory.com/skills/teamhypersomnia-footage-recording)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: footage-recording
description: Record Hypersomnia gameplay footage for videos (devlogs, trailers, the site) - stage a shot in the editor (quick test spawns, bots walking to markers, playtest spawns), let the editor record the playtest, render the recording offline at exact 60 fps with sound (capture_replay.sh - camera, HUD, laser, no player, from/to, slow motion), re-render an old recording on a changed map, and keep every source safe. Use whenever footage is needed - "nagraj footage", "nagraj to", "wyrenderuj replay", "zrób ujęcie", "capture", "nagraj jeszcze raz z nowymi światłami", "potrzebuję klipu do filmiku", or the user pastes a "[hypersomnia replay moment]" line. Editing the footage into a video is a separate matter (not this skill).
---

# Footage recording

Footage comes from **recorded editor playtests rendered offline**: the user (or bots) plays once in the editor, the
recording is deterministic, and `scripts/capture_replay.sh` renders it under Xvfb at exactly 60 fps with the game's
own sound - any camera, with or without HUD, laser or the player, as many times as needed.

## 0. Back up first - every time

**Copy every recording that a capture uses to a persistent folder before anything else** - its three files (section 1:
`<date>.json`, `<date>.inputs.lz4` and its `map_versions/<map_version>.json.lz4`), never into the session scratchpad;
ask the user where if no project folder exists yet. The editor deletes the oldest unnamed
recordings of a map beyond a limit - it was 50 and deleted two devlog 6 sources: one came back only through ext4
journal forensics, the other is lost (only its rendered clip survived). The limit is 1000 now, but backups stay
the rule. Also back up the rendered takes: a re-capture overwrites `OUTPUT` - copy the previous take aside first
(keep every take; the user compares them).

## 1. Recording a playtest

- The editor records **every offline playtest** (Space in the editor, or `--edit <project> --playtest`) into
  `<project>/.playtests/recordings/`: `<date>.json` (plain JSON: mode, rng offset, spawn, nickname, `duration_secs`,
  `name`, `map_version`, `speed_ranges`) and `<date>.inputs.lz4` (inputs and dynamic vars of every step, state hash
  after every step). The map as it was lies once per version in `<project>/.playtests/map_versions/<map_version>.json.lz4`
  (blake3 of the map json, 16 hex; lz4 with an 8-byte size header) - many recordings share one. A version no recording
  refers to is deleted when recordings are pruned or deleted. Under 2 s a recording is dropped.
- A **named** recording (Rename in the Recorded playtests list - a tab next to History; or the `name` field in
  `<date>.json`) is kept forever. Name the ones a video uses.
- A backup of a recording = its `<date>.json`, `<date>.inputs.lz4` and its `map_versions/<map_version>.json.lz4`.
- In the dev checkout `hypersomnia/user/projects` is a symlink to `content/arenas`, so a user's project folder can
  sit among the official maps (`.playtests/` is gitignored everywhere).
- Shots needing a human (aiming, a specific fight) - the user plays them. Shots of bots alone - stage them (below)
  and start the playtest yourself with `--edit <project> --playtest` under the local-testing rules (own build,
  `$GAME_TEST_FLAGS`, Xvfb), then quit; the recording appears in the project.
- Do not move, rewrite or inject a map whose project is open in the user's editor (its `editor_view.json` is
  rewritten while open - check its mtime against the game's start time; the editor overwrites on save/autosave).

### Staging a shot (editor nodes and settings)

- **quick_test_spawn** (Quick test mode): you spawn on the topmost one (in the layers); every other one gets a bot
  named after the node that stands still, holding the node's equipment (or the mode's). Faction, custom equipment,
  "Bot respawns" (off by default).
- **bot_test_navigation_end** (Quick test): every quick_test_spawn bot pathfinds once to the nearest free end (ends
  have no faction; bots take them in faction order - Metropolis, Atlantis, Resistance - and within a faction in layer
  order, each the nearest free end in a straight line) and stands there facing the end's direction. "Sprint" (run
  otherwise), "Hide weapons on arrival" (like H). The navmesh is generated whenever the map has such ends. The editor
  draws each bot's path to its end (View > Bot test paths, on by default) - check them before recording. The devlog 6 ending (three bots
  walking to a window to watch the nebula) was staged this way.
- **Playtest spawn** on team spawns (bomb defusal and other arena modes): a faction with any spawns only there;
  "Bot camps here from the start", "Custom equipment" every round.
- Quick test **"Spawn money"** (mode inspector): off = bodies drop no coins; on = coins from kills and torn-off limbs.
- Playtesting **"Enemies behind walls"** (Hidden / Silhouettes / Full) and "Draw enemy crosshairs" in the project's
  playtesting settings.
- **camera_zoom** zones of the map drive the replay camera; **default_zoom** in the map sets the base zoom.

## 2. Rendering a recording - `scripts/capture_replay.sh`

```
RECORDING=<project>/.playtests/recordings/<date>.json OUTPUT=<file.mp4> [env...] scripts/capture_replay.sh
```

| env | meaning |
|---|---|
| `FROM`, `TO` | recording seconds (default whole) |
| `CAMERA=x,y,zoom` | fixed camera (default: follows the recorded player) |
| `MAP=<map.json>` | replay on this map instead of the recorded version (section 3) |
| `HUD=1` | with HUD (default: cinematic, no HUD) |
| `LASER=1` | weapon laser on (default off - the user's own game has it on; match the original take!) |
| `NO_PLAYER=1` | the recorded player moved out of every frame (backdrops, scenery) |
| `BARS_RAISE=<px>` | lifts the right-bottom money/health bars (0 for footage) |
| `CRF` | x264 quality (14) |
| `BIN` | game binary (default `build/Release-x64-clang-claude/Hypersomnia` of this checkout) |
| `WORK` | the frames fifo, the raw sound, the video before muxing, throwaway appdata, `replay_game.log`, the capture lock |
| `CAMERA_QUERY_MULT`, `BULLETS_INTERPOLATION` | knobs left from the bullet-trail investigation - keep the defaults |

What it does: a private Xvfb display, a throwaway appdata with a conf.d (1920x1080 borderless, `max_fps` 1000, no
tutorial/changelog, laser, bars raise), the frames through a fifo into ffmpeg - H.264 CRF 14, **BT.709 tagged** -
and the OpenAL loopback sound (48 kHz) into a plain file, muxed in as AAC 320k after the game ends. If ffmpeg dies,
the game dies of SIGPIPE and the script stops with an error - nothing hangs. A flock serializes captures (one at a
time on the machine).

- **The binary must come from the same checkout as the content** (it runs in `<repo>/hypersomnia`), and its
  simulation must match the recording's: after a gameplay change (e.g. the limb fly direction fix) old recordings
  **desync** - the game log says "desynced at step N" and the picture after that is not what was played. Build a
  Release with the local-testing `build_claude.sh release` when needed.
- Rendering runs 240 renders per second and keeps every 4th frame (60 fps), with the sound of all renders: at 60
  renders/s bullet trails came out short compared with the user's game; 240 matches it, and slow motion stays smooth.
- Speed: about 17 s of footage in 5 minutes on this machine. Run it in the background and wait on the process.
- The sound is quiet (peaks -20..-40 dB, HRTF on) - normalize when editing; it is in sync with the picture (each
  frame's sound starts at the frame). The ear is always at the recorded player, also with a free or fixed camera, and
  a hidden player (`NO_PLAYER`) still makes its own sounds.
- Get a camera for `CAMERA` from the user: free camera on in the replay window, "Copy moment link" - the line carries
  `camera=x,y,zoom` and `at=<secs>`.

### After every capture - verify

`ffprobe` (1920x1080, 60 fps, bt709, the expected duration), then pull frames at a few times (`ffmpeg -ss T -i ...
-frames:v 1`) and look at them; when re-capturing a shot, diff frames against the previous take (same character
positions, the laser line if the original had it). Never report a take as done without looking at its frames.

## 3. Re-rendering an old recording on a changed map - `MAP=`

The inputs replay on any map with the same geometry and spawns, so lighting, colors and decorations can change after
the fact: `MAP=<map.json>` (e.g. the project's current `<project>/<project>.json`, or an edited copy) makes the replay
build that map instead of the recorded version (the game flag `--replay-map <json>`); the recording itself is never
rewritten. Without frames (`--replay-playtest <rec> --replay-map <json>` alone) it opens in the editor to look around.

- A desync is expected when the change touches anything simulated; check the frames instead - the characters
  must stand where they did in the original take.
- Keep each take under its own name (e.g. `<shot>__<what changed>_take_<HH-MM>.mp4`) and let the user compare;
  devlog 6 offered them in a combo of its ending panel.
- Small map fixes for one shot go into a copy of the map json passed as `MAP=`: a camera_zoom zone grown
  so the camera stops zooming out when the player leaves its edge (camera zones don't change the state hash), or
  `default_zoom` for a closer shot.

## 4. Slow motion - `speed_ranges` in the recording's json

In `<date>.json`: `"speed_ranges": [{"from_secs": 11.0, "to_secs": 16.0, "speed": 0.5}]` (recording seconds, speed
clamped to 0.05-4). Replays and captures play those parts at that speed - the simulation and the sounds (lower pitch)
- and a capture gets 2+ frames per step, so 0.5x stays smooth. Edit it by hand (there is no UI for it; back the json
up first, and not while the editor shows the recordings list - a rename there rewrites the json); keep the ranges
apart - the first range covering a moment wins.

## 5. The replay window and moment links

- Recorded playtests list: double-click or the play icon replays, right-click renames/reveals/deletes.
- Replay keys: Space pause/resume, Left/Right seek 5 s (Shift 1 s), numpad speed (0 resets), Alt+P hides the window,
  Esc quits. Free camera: drag with RMB, zoom with the wheel. "Hide HUD", "Copy moment link", "Reveal in explorer".
- A moment link: `[hypersomnia replay moment] map=<map> recording="<date>.json path" at=<secs>s [camera=x,y,zoom]
  | --replay-playtest "<date>.json path" --replay-from <secs> [--replay-camera ...]`. With such a line in
  the clipboard, switching to the game while it shows the editor's project selector opens that map and replays it
  paused at that moment (only a recording inside `<project>/.playtests/recordings/`; a broken project shows an error).
  When the user pastes one, take `recording`, `at` and `camera` from it.

## 6. Footage recorded by hand (screen recordings)

Some shots the user records on the desktop (Ctrl+Print, files in `~/Videos/gameplay/`):
- The screen recorder draws the Adwaita cursor with holes - devlog 6 repaints it with its `scripts/cursor_fix.py`
  (in the devlog 6 folder - ask the user where it is) into separate fixed copies; originals untouched.
- The first frame can be held ~250 ms - trim the start.
- Ask the user to turn off Redshift/night light before recording - it went into a hand recording as extra gamma.
  Xvfb captures never see it.

## 7. Color - every encode and decode

- Encode: BT.709 matrix and tags (`-colorspace/-color_primaries/-color_trc bt709`, `-x264-params
  colorprim=bt709:transfer=bt709:colormatrix=bt709`), limited range, `flags=accurate_rnd+full_chroma_int+full_chroma_inp`
  on every scale. Untagged/BT.601 encodes showed oversaturated in mpv.
- Decode for compositing: `scale=in_color_matrix=bt709:in_range=tv:flags=accurate_rnd+...`.

## 8. If a recording got deleted

Stop writing to that disk. The data blocks usually survive; the folder's inode was found again in the ext4 journal:
the user dumps the journal with `sudo debugfs -c -R 'dump <8> <file on another disk>' /dev/<partition>` (Claude has no
sudo password - the user runs sudo commands), old copies of the inode table in the journal still hold the deleted
files' extents (inode -> block numbers), and `dd` of those blocks from the partition gives `<date>.json`,
`<date>.inputs.lz4` and the map version back (in devlog 6 they were still `map.json`, `playtest.json` and `inputs.bin`
in one folder per recording - that layout is gone). Verify by capturing the recovered recording and comparing frames with an old render.

## Example pipeline

devlog 6 (ask the user for its folder): `scripts/capture_replay.sh` (the original of this skill's script),
`scripts/ending_footage_new_map.sh` (backup + map injection + capture in one, for the old layout), clip caches named
`<map>_<recording>_from_<s>_to_<s>_hud_raise_<px>_laser_<0|1>_r240.mp4` and reused when they cover the needed range,
and `recordings_backup/` with every source recording.

Files in this skill

  • SKILL.md12.7 KB
  • scripts/capture_replay.sh4.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.