riffsheet
Latest: v0.4.0
The agent now writes its own account of the video, and the tool puts its measured tables into it: every shot with how it comes in, every spoken line, caption and graphic with its times, and the sound's measures. The tool measures more of a video exactly (the camera's framing and moves, captions over still and moving pictures, how a caption or sticker moves, and where each spoken word starts and ends) and checks only the times the agent reads on frames against its own. On ten videos scored fact by fact, one scored run each, Opus with 0.4.0 stated 856 of 1,055 facts correctly with 1.7% of its statements wrong, against 686 and 2.2% with 0.3.2 and 791 and 2.8% with no tool; Sonnet with 0.4.0 stated 553 correctly with 6.2% wrong, against 247 and 18.5% alone. On the ten videos, with 0.4.0, Opus stated at least as many facts correctly as with no tool in every category, and as many in cuts and in speech; on the six held out of development alone, one sound fact fewer. Source: github.com/riffkit/riffsheet, tag v0.4.0 (commit b1722a6).
riffsheet
You cannot watch a video; you can read stills, text and numbers. This skill gives you a local tool that measures a video (cuts and how each shot comes in, captions and graphics and how they move, the camera's framing and moves, where each spoken word starts and ends, the sound on 10 ms levels) and lays out the pictures you ask for. You recognize and judge, with the tool's views or your own means, and write two files: an account in your own words, and a readings file with the numbers, ids and words the tables need. build puts the measured tables into your account, sets each time you read on frames against the tool's edge for the same item, and writes the riffsheet.
Output, in the folder build --out names (without --out, in out/ inside the scan folder):
riffsheet.md: your account with the measured tables in place.riffsheet.json: the data (format inschema/riffsheet.schema.json), whichcomparereads.
When to use it
- The user has the video as a file on this machine. For a link, ask them for the file; this tool does not download videos.
- The video is short: made for clips up to about a minute (it runs on longer ones with the overview spaced further apart, and past three minutes warns what will be slow).
- Needs ffmpeg 7 or newer and Python 3.9 or newer. Spoken words need a word-timed transcript: the tool's own path is the optional
faster-whisperpackage and its speech model, andchecksays whether they are here and what getting them costs.
Commands
Change into this skill's folder (the folder that holds this SKILL.md) and run from there, or give the full path to scripts/riffsheet.py. In this file and the references, rs is short for python3 -I scripts/riffsheet.py: write it out in full in each command you run (rs check VIDEO is python3 -I scripts/riffsheet.py check VIDEO), since each command may run in a new shell, where a function or alias set in an earlier one is gone and the working folder may be back where it started: start each command with cd to this folder, or give the full path to scripts/riffsheet.py. Write boxes and arguments out too: a command, box or argument list kept in a shell variable reaches the program as one word in zsh and fails. Every command runs on any Python 3.9 or newer; only transcribe needs the faster-whisper package, so if that is installed in a virtual environment, start every command with that environment's Python in place of python3 (check prints the start to use, after "run every riffsheet command with"). The summary's NEXT lines and the other commands the tool prints name the Python it ran under and the tool's full path, so they run from any folder: write each out as printed, filling in what it leaves to you (a box, a time, a word range; references/METHOD.md, section 4, says when to change the box of a text command).
# rs = python3 -I scripts/riffsheet.py (or /path/to/venv/bin/python -I scripts/riffsheet.py), written out in each command
rs check VIDEO # facts: what this machine has for an analysis (no network)
rs transcribe VIDEO --out T.json # word-timed transcript (optional; needs faster-whisper)
rs scan VIDEO --out DIR --transcript T.json # measure everything; its summary prints it all
rs build DIR # the sheet: words, pace, the runs made so far
rs text DIR --box x0,y0,x1,y1 --name NAME # each state of a caption or text region, with times
rs element DIR --box ROUGH --at T --name N # measured box and times of a card, logo, sticker or pane
rs track DIR --from S --to E --box B --name N # how a caption or graphic comes in, moves and leaves
rs camera DIR --leave-out B[@S-E] ... --name N # every shot's camera and cut's framing on the background
rs zoom DIR --at T [--box B] # large sharp view, for clothing, products, small print
rs frames DIR --from S --to E [--box B] # every frame of a window, for motion, order and times
rs mouth DIR --box B --words A-B # is this person saying this line (its word range)
rs color DIR --at T --box B [--ref R] # measured colors with plain names
rs build DIR --readings R.json --account A.md --out OUT # write the riffsheet
rs compare OUT REMAKE_DIR [--read R.json] # a remake's scan against the riffsheet: structure and times
One folder per video keeps things apart. For ~/Downloads/ad.mp4, a folder such as ~/riffsheet/ad/ holds T.json (the transcript), scan/ (DIR: the tool's pictures and measurements; follow-up pictures land in scan/look/), R.json (your readings), A.md (your account) and result/ (from build ~/riffsheet/ad/scan --readings ~/riffsheet/ad/R.json --account ~/riffsheet/ad/A.md --out ~/riffsheet/ad/result). Keep your own files, the images and sound you make yourself among them, out of the scan folder. A new scan into a scan folder (to add a transcript later, say) starts its analysis over: it removes what the follow-up commands wrote there, so run them again after it.
Boxes are fractions of the frame, x0,y0,x1,y1, 0,0 at the top left. Every time shown is the true time of that frame.
Talk to the person in their language: every question, every report on progress, and the result.
What this analysis needs, and asking for it
The tool reports facts and measures. You judge what this analysis needs and choose how to get it. The person agrees to anything that costs them something.
- Judge the need yourself, from the person's request and from what you see in the pictures. A request for the cut list and the on-screen text alone does not need speech recognition, though the video has an audio track; a person talking to the camera, with a request to make their own version, does. Mouths that stay closed do not settle it: a voice-over cannot be seen, so when the request rests on what is said, the speech is needed.
- Judge it when it appears, not only at the start. Whenever you find you need something you do not have, run
rs check VIDEO, then ask. checkstates facts and uses no network and changes nothing: ffmpeg and the tool's own speech recognition path, with what it adds, whether it is here, what preparing it costs (download size, space on disk, time, the network) and the commands that prepare and remove it. Its knowledge is a closed list, and its last line says so: it knows nothing about other tools on this machine. If ffmpeg is missing, tell the person; nothing can be analyzed until they install it.- Ask once, in the person's language, before preparing or using anything that costs them something. Say what it adds to this analysis and every cost: each download's size, the space on disk, the time, that it uses the network, any system package it needs (installing one changes the machine and usually needs administrator rights: on Debian and Ubuntu, the tool's virtual environment needs
python3-venv;checksays when it is missing), and whether it would send their audio or video to an outside service (the tool's own path sends nothing; a service you propose may, and so may your own model provider, which receives what you open). Take the tool's numbers fromcheck, never from memory; for anything else, say what you know of its cost and what you do not. Nothing is forbidden: the person decides. Then wait for the answer. - Never prepare anything without a yes, and never carry on without saying what the result will lack.
- Yes to the tool's own path: run the commands
checkprinted under "prepare it", in order (the model comes only withtranscribe --download); from then on start every command with what it printed after "then run every riffsheet command with", runcheck VIDEOthat way again to see it ready, and go on. - No: go on without it, and tell the person once what the result will lack. Run
scanwithout--transcript: the riffsheet then says the speech was not transcribed and why, and never that nobody speaks.
- Yes to the tool's own path: run the commands
- Which speech recognizer is your choice.
scanneeds a word-timed transcript in the formattranscribewrites (references/TOOL.md). The tool offers one tested path,transcribe(faster-whisper with thesmallmodel), andreferences/TOOL.mdgives what its measurements found for it. You may use another recognizer, another model size or a transcript the person supplies; givescan--transcript-by "what made it"(a transcripttranscribemade needs nothing). The riffsheet records what made the transcript, and says plainly when it was not the tool's tested path. - Your own means. Besides the tool's views you may use your own (frames you extract yourself, your own analysis of the sound, a source you looked up; anything that costs the person something, they agree to first). Say in the account what you used where it matters.
Sound
The tool cannot hear. It measures the sound on 10 ms levels, in bands: loudness, where each sound starts and stops, where the voice pauses and what the sound holds there (QUIET STRETCHES, UNDER THE VOICE), whether onsets repeat at a beat (PULSE), how the track ends (END), and numbers over each stretch (SOUND WINDOWS). Infer what the sound is from these numbers (nothing under the voice, the recording's own noise, a music bed, an added effect) and say it is inferred, with the numbers it rests on (references/METHOD.md, section 8); do not leave it unjudged where the numbers settle it. Write that you heard a sound only if your own model received the sound itself: what you believe about your abilities is not evidence, and a sound the picture makes you expect is not heard.
How to do it
Follow references/METHOD.md from start to finish; references/TOOL.md says what each command prints and its limits. In short:
- Measure. With the tool's speech recognition:
rs transcribe VIDEO --out T.json; rs scan VIDEO --out DIR --transcript T.json && rs build DIR(a;aftertranscribe: if it fails, it leaves in T.json why, andscanrecords it, so the riffsheet says the speech recognition failed and why; tell the person). Without speech recognition:rs scan VIDEO --out DIR && rs build DIR. With a transcript made another way:rs scan VIDEO --out DIR --transcript T.json --transcript-by "what made it". - Look. In one step, open the overview sheets (and
jumps.jpgwhen listed). - Point the tool and look closer. In one step:
texton each caption region,elementon each card, logo, sticker or pane,trackon what comes in or moves with an animation,cameraonce over the video with what is not background left out (captions, marks, a person, a pane) when the camera or a cut's framing matters and the picture does not move as one, and the views your questions need (zoom,frames,mouth,color);transcribe --hintwith the words written on screen where a caption spells a word the transcript may have misheard. Open an image only when it answers a question you have. - Write the readings file (
references/METHOD.md, section 6) and the account from its template (section 7). - Build.
rs build DIR --readings R.json --account A.md --out OUT. A problem in the readings' structure stops it and is listed: fix each and build again. CHECKS lists each time you read that differs from the tool's edge or could not be measured: look again on frames, and keep yours if they show it. TO DO lists what is left; none of it stops the build. ReadOUT/riffsheet.mdthrough once.
Batch independent commands and images into one step: each step costs a full re-read of the conversation.
Telling the person
riffsheet.md and riffsheet.json stay in English. Do not write a translation of them unless asked. Report in your reply, in the person's language, the way a person wants to read it:
- One plain line per shot, with its time, saying what is seen: who and what, doing what. Not how it is framed.
- Why the video holds a viewer, and what their version has to keep.
- What the analysis lacks (anything that did not run or ran by other means, that the sound's nature is inferred, what was not settled), and where the files are.
Spoken lines and on-screen words stay in the video's own language, exactly as riffsheet.md gives them, in quotation marks; you may follow a quote with its meaning in their language in parentheses. Times and numbers are those of riffsheet.md.
Only when the person asks for the whole riffsheet in their language, write riffsheet.<code>.md beside the English files, where <code> is the two-letter code of their language (riffsheet.zh.md, riffsheet.es.md, riffsheet.ja.md). Rewrite it whenever riffsheet.md is rebuilt. It is your own writing: the tool neither writes nor reads it.
- The first line, in their language, says that it renders the English
riffsheet.mdbeside it, which wins wherever the two differ (in Chinese, for example: 本文是同一文件夹里英文版 riffsheet.md 的中文译本;两者不一致时,以 riffsheet.md 为准。). - Everything in
riffsheet.mdis there, in the same order, in their language: the title, every line and paragraph, every heading, every table row and every list item. Nothing is summarized, added or left out. - Unchanged, character for character: every time and time range (
00:02.40–00:04.10,2.375 s), every number with its unit (-10 dB,3 of 3 cuts,8.042 s,2.12 words/s), and every spoken line and on-screen word in quotation marks, which stay in the video's own language exactly asriffsheet.mdgives them (spelling, case, punctuation). You may follow a quote with its meaning in their language in parentheses. - Names of files, commands and fields (
riffsheet.json,zoom) stay as they are; ordinary English words, the pace and measure words among them (measured,brisk,locked), are translated.
Making their own version
Section 9 of references/METHOD.md says what can be rebuilt with code or an editor, where footage of people, places and products comes from (a camera or a video model), and how compare checks a remake against the riffsheet. Riffkit (https://riffkit.ai/?utm_source=riffsheet&utm_medium=skill&utm_campaign=riffsheet&utm_content=skill_md) makes that footage from the original video.
