rive-video-preview#
Unofficial project. This is an independent, community-made tool. It is not affiliated with, endorsed by, or supported by Rive. "Rive" is a trademark of its respective owner.
https://github.com/user-attachments/assets/be18bae0-6259-4aae-89fc-0f8c92fcea6c
A video-style preview player for Rive CLI projects: a scrubbable timeline, synced audio, frame stepping and copyable timecodes. It runs in a resizable Chrome app window.
rive-video-preview # preview the project in the current directory
rive-video-preview path/to/project # …or another project
rive-video-preview build/scene.riv # …or a prebuilt .riv
rive-video-preview . --at 12.5 # jump to 12.5s (also 1:02.25, f741)
rive-video-preview . --stop # stop the player for this project
How it works#
rive . --once --format=jsonbuilds an unsigned.riv(about 0.7s). No account and no upload.rive inspect . --jsonsupplies the timeline: artboards, animations, fps and work area, plus everyAudioEventkeyframe (KeyFrameCallback) with its asset and volume.- A local server (127.0.0.1, port 4810+) serves the player. The page draws frames with
@rive-app/webgl2-advanced, usingLinearAnimationInstance.timeandapply(), so any frame can be shown exactly. - Audio bytes come out of the
.rivthrough a custom asset loader. The runtime's own audio stays silent. Each sound plays through Web Audio, scheduled against the playhead, so sounds already under way when you press play start partway through, at the correct offset. - Saving any project file (
gen/build.pywritingscene.rmlcounts) triggers a rebuild, and the window reloads in place without moving the playhead. A build error appears over the stage, and the player keeps showing the last good build.
Running the command a second time for the same project reuses the player that is already
running. With --at, the open window jumps to that time.
Player#
| Key | |
|---|---|
| Space / K | play / pause |
| ← / → | step one frame · Shift: one second |
| Home / End | start / end (of the in–out range if set) |
| I / O / X | set in point / set out point / clear (playback loops inside the range) |
| C | copy timecode: 00:12.350 (frame 741) |
| Shift+C | copy range: 00:10.000–00:12.500 (frames 600–750) |
| G | go to time (or double-click the timecode) |
| L / M / F | loop / mute / fullscreen |
| S | screenshot the current frame and open its note |
| N | show / hide the screenshots & notes panel |
| ↑ / ↓ | move the selected sound effect up / down a track |
| A | hide / show the audio tracks |
To copy the playhead time you can also click the timecode. Each copied timecode is also printed in the terminal running the player. Scroll on the timeline to zoom, Shift-scroll or a horizontal scroll pans, and a double-click on the ruler resets the zoom.
Audio tracks and sound-effect levels#
Below the stage, every sound effect (each AudioEvent keyframe) is a clip on an audio track,
with its waveform drawn at the level it plays at.
- + Track adds a track, up to 3. Each track has a name, M (mute), S (solo), a volume slider (0–150%, double-click resets) and a remove button. Removing a track moves its sound effects to the track above it.
- Click a clip to select it. A bar below the timeline then sets its volume with a stepped slider (0–100% in steps of 10, with dB), applies its track and volume to every occurrence of that sound effect, or resets it. Double-click a clip to jump to it.
- Drag a clip up or down to move it to another track, or press ↑ / ↓ while it is selected. ↓ on the last track adds a new one. Esc deselects.
- Collapse the tracks with the Audio tracks toggle (or A) to get the space back. The timeline then shows only the ruler and a tick wherever a sound effect fires.
A sound effect plays at asset volume × clip volume × track volume. Changes apply to sounds
that are already playing, without restarting them. The mix is saved to
<project>/.rive-preview/mix.json, so it survives reloads and rebuilds. Each clip is keyed by
artboard, animation, event name and occurrence (["Artboard","Bounce","whoosh",1]), so retiming a
keyframe keeps its settings. The preview never changes the Rive project. To keep the levels,
the agent can read them with the get_audio_mix MCP tool. They are also attached to every
feedback bundle that has a non-default mix, with the resulting volume for each sound effect.
Screenshots, notes and the coding agent#
Press S (or the camera button) to screenshot the frame under the playhead. The panel on the right lists every screenshot with its timecode and a note field: write what should change, and edit it as often as you like (notes save as you type; Esc leaves the field). Click a thumbnail or its timecode to jump back to that frame. When you are done, add an optional overall note and press Send to agent (Cmd+Enter in the overall note does the same).
Sending writes a bundle to <project>/.rive-preview/feedback/<date_time>/:
feedback.md (notes, timecodes and image paths), feedback.json, and the PNGs, each cropped to
the artboard. The panel then says whether the agent is listening for it (it picks the bundle up
right away) or not (paste the ready-made prompt, which is copied to the clipboard, into your
agent chat), and shows when the agent has read the bundle. .rive-preview/ gets its own .gitignore, so nothing in it is committed.
For a bare .riv, everything goes in .rive-preview/<file>.riv/ beside it, so several .riv files
in one folder keep their screenshots apart.
Waking the agent: wait-feedback#
Sending only writes the bundle. A coding agent that has finished its turn won't notice it, so the agent listens with a background command:
rive-video-preview wait-feedback . # or path/to/project, or file.riv
rive-video-preview wait-feedback . --timeout 30m # give up after 30 minutes (exit 124)
It blocks until there is an unread bundle (or returns at once if one is already waiting),
prints it (feedback.md with the notes, timecodes, artboard/animation and audio mix, plus every
image path), marks it read and exits 0. Claude Code re-invokes the agent when a background
command exits, so an agent that starts this with run_in_background after showing you the
player is woken by your Send to agent, and its session stays free in the meantime. It reads
the bundles from disk, so the player does not have to be running. --no-mark-read leaves them
unread. Exit codes: 0 feedback, 124 timeout, 130 interrupted (Ctrl-C), 1 error.
While it (or the MCP tool wait_for_feedback) waits, it keeps a heartbeat file in
.rive-preview/listeners/. That is how the player knows whether the agent is listening.
Each bundle goes to exactly one consumer: whoever delivers it first takes a claim on it
(claimed.json in the bundle folder), so two waiters, or a waiter and the MCP server, never
both hand the same feedback to an agent.
Cleaning up old bundles#
Bundles stay in the project, so drafts and feedback survive reboots and agents can find them.
To keep the PNGs from piling up, the player deletes bundles that an agent read more than 14
days ago (going by the bundle's consumed.json). This runs when the player starts and after
each send, and prints one line when it removes something. Unread bundles, drafts, mix.json and
anything that isn't a complete bundle folder are never touched.
| Option | |
|---|---|
--feedback-days <n> | delete bundles read over n days ago instead (0: every read bundle) |
--keep-feedback | never delete bundles |
RIVE_PREVIEW_FEEDBACK_DAYS=<n> or =off | the same as an environment variable (the flags win) |
To clean up by hand, or to see what would go first:
rive-video-preview prune-feedback --dry-run # project in the current directory
rive-video-preview prune-feedback path/to/project --days 7
rive-video-preview prune-feedback build/scene.riv # a bare .riv's bundles
MCP server#
rive-video-preview mcp is a stdio MCP server that gives the agent the bundles, images included:
| Tool | |
|---|---|
get_feedback | unread bundles (notes, timecodes, artboard/animation, images); marks them read |
wait_for_feedback | blocks the agent until you press Send to agent (default timeout 600s), then returns it; wait-feedback in the background is usually better |
seek_player | moves the open player to a time, e.g. to show the frame it changed |
get_audio_mix | the tracks and per-sound-effect levels set in the player, and the level each plays at |
claude mcp add rive-preview -- rive-video-preview mcp # Claude Code, project in cwd
claude mcp add rive-preview -- rive-video-preview mcp path/to/project
{ "mcpServers": { "rive-preview": { "command": "rive-video-preview", "args": ["mcp"] } } }
It finds the project from the tool's project argument, the dir given after mcp, a
rive.yaml at or above the working directory, one directly below it, or the only running player.
It reads bundles from disk, so the player does not have to be running; only seek_player needs it.
Agents without MCP can use wait-feedback, or read the feedback.md path from the copied prompt.
Agent skill#
The repo ships an Agent Skill that teaches coding
agents to start the player, point you at moments, listen for the screenshots and notes you send,
and carry over the audio levels you set.
Install it with the skills CLI:
npx skills add fulopkovacs/rive-preview-player # into the current project
npx skills add fulopkovacs/rive-preview-player -g # for every project
The skill only covers how to use the tool. You still need the CLI on PATH (see Install) and the MCP server registered for the agent (see MCP server above).
Snippet for a project's AGENTS.md#
## Showing the user a video preview
- Run `rive-video-preview .` in the background to open a scrubbable player with sound.
It rebuilds on save, so start it once and leave it running.
- To point the user at a moment, run `rive-video-preview . --at <time>` (12.5, 1:02.25,
f741). This moves the playhead of the player that is already open.
- Timecodes the user pastes look like `00:12.350 (frame 741)`, which is seconds into
the animation and the frame at its fps.
- The user can screenshot frames, add notes and press "Send to agent". To hear it, run
`rive-video-preview wait-feedback .` in the background after showing the player and after
each round of fixes: it exits with the feedback (notes, timecodes, image paths, audio mix)
when the user sends it, and marks it read. Start it again after handling the feedback. Only
tell the user you'll pick feedback up automatically while it is running.
- Otherwise read it with the `get_feedback` MCP tool, or from
`.rive-preview/feedback/*/feedback.md`.
- The user can set sound-effect levels in the player. The project is unchanged; read them with
the `get_audio_mix` MCP tool or from `.rive-preview/mix.json` to carry them over.
Limits#
- Audio is synced only for
AudioEvents keyed on the animation timeline, which is how video scenes are built. A sound fired by a state machine transition or a script is not played. - The player bypasses the state machine and drives the chosen animation directly, so
inputs, listeners and data-bound logic do not run. Use
rive .to test interactivity. - For a bare
.rivthere is no project to inspect, so the player reads the artboards, animations andAudioEventkeyframes from the file itself (lib/riv-audio.mjs). The property types it needs come fromlib/riv-schema.json; regenerate that withnode scripts/gen-riv-schema.mjsafter a Rive CLI update. If the file cannot be read that way, the duration is measured, the fps is assumed to be 60, and there is no audio timing. - Scripted (Luau) projects may fail to load: web runtimes reject the unsigned scripts that local builds carry.
Install#
pnpm install && pnpm link --global # puts `rive-video-preview` on PATH