---
name: adom-video
description: Hydrogen-webview video player. Plays .webm/.mp4 with frame-accurate scrub, A-B loop, pixel zoom up to 8×, gallery thumbnails, frame-extract to PNG, trim & export. CLI- and HTTP-drivable so Claude can seek/pause/extract without simulating clicks. Use when the user wants to view a video clip, review a screen recording, scrub through frames, extract a specific frame as PNG, trim a clip, compare clips in a gallery, or play recordings produced by adom-desktop. Trigger words — play video, open video, video player, view recording, show me a video, watch clip, scrub video, extract frame, trim video, compare videos, gallery of videos, open recording, view webm, view mp4, screen recording playback, demo recording playback, frame-by-frame.
---

# adom-video

Thin Rust CLI + Hydrogen webview video player. One file or a whole folder, Hydrogen tab opens automatically (always on a non-VS-Code pane). Brand-themed (Adom dark + teal + Familjen Grotesk + Satoshi + JetBrains Mono).

## Quick use

```bash
adom-video play /tmp/recording.webm        # opens Player tab
adom-video play /tmp/recordings/           # opens Gallery for the directory
adom-video gallery /tmp/recordings/        # explicit gallery view
adom-video probe /tmp/recording.webm       # ffprobe → JSON
adom-video extract-frame video.webm 3.5 -o frame.png
adom-video trim video.webm 1.0 5.0 -o clip.webm
```

## Drive an open player from outside (useful for AI)

The server writes its port to `/tmp/adom-video.port`. Subcommands auto-discover it:

```bash
adom-video seek 12.5     # jump to t=12.5s in the open player
adom-video pause
adom-video resume
adom-video set-rate 0.5  # half speed
adom-video status        # current state JSON
adom-video stop          # close the tab + shut down the server
```

Or hit the HTTP API directly (port from the lock file):

```
GET  /api/library        — list of clips with metadata + filename hints (rec-desktop-*, rec-tab-*)
GET  /api/state          — current player state
POST /api/seek    {t}
POST /api/pause   {}
POST /api/resume  {}
POST /api/rate    {rate}
POST /api/zoom    {zoom}
POST /api/loop    {t_in, t_out}
POST /api/load    {path}            — load another clip into the open player
POST /api/extract-frame {path, t, out?}  — writes PNG, returns path
POST /api/trim    {path, t_in, t_out, output?}  — stream-copy webm/mp4
GET  /api/console        — recent JS console for inspection
GET  /api/thumb?path=&t=&w=  — JPEG thumbnail (cached)
```

## Keyboard shortcuts (in the player tab)

| Key | Action |
|---|---|
| Space / K | Play / pause |
| J / L | Slow down / speed up (0.25× → 0.5× → 1× → 1.5× → 2× → 4×) |
| ← / → | −5s / +5s · Shift = ±1s · Alt = ±0.1s |
| , / . | Previous / next frame (uses fps from probe) |
| 0–9 | Jump to 0%, 10% … 90% |
| I / O | Set A / B loop point · Shift+I/O = clear |
| + / − | Zoom in/out (1× → 8×) · 0 = reset |
| Drag | Pan when zoomed |
| F | Fullscreen |
| M | Mute |
| G | Toggle gallery view |
| ? | Show shortcut help |

## Filename hints

Recordings produced by **adom-desktop** are auto-detected:

- `rec-desktop-<unix-ms>.webm` → tagged "desktop", recorded-at parsed from filename
- `rec-tab-<session>-<tab>-<unix-ms>.webm` → tagged "tab"

The Inspector panel surfaces this plus codec/dimensions/FPS/frame-count/duration/bit rate/file size/encoder.

## Install

```bash
adom-video install   # writes ~/.claude/skills/adom-video/SKILL.md
```

The wiki publish flow uses `tool-publisher`. Auto-discovery hook reads the wiki every 30 min and prompts to upgrade when a newer `pub_version` is available.

## Notes

- Uses `tiny_http` with HTTP byte-range support (required for `<video>` seek).
- ffprobe + ffmpeg must be on PATH. Probe is non-fatal — players load even if probe fails.
- Always opens on a **non-VS-Code** pane in Hydrogen — never covers Claude Code chat.
- Container webview URL uses `$VSCODE_PROXY_URI` substitution (no localhost).
