Video analyze (local)
Two stages, run together or separately:
- Transcription with timestamps (always first).
- Screenshots of the key moments (right away, or later on request: "now cut 5 screenshots").
Everything runs locally on CPU. No API keys, nothing is uploaded.
<skill> below means the folder this SKILL.md is in. Use python or python3, whichever exists on the machine.
Requirements
- Python 3.9+ with
faster-whisper(pip install -r <skill>/requirements.txt). ffmpegandffprobeon PATH.
Check once with python -c "import faster_whisper" and ffmpeg -version. If something is missing, tell the user what to install instead of installing silently. Models are downloaded once into the Hugging Face cache (~/.cache/huggingface/hub) and reused offline afterwards.
Stage 1 - transcription
Ask nothing unless the file path is missing. If the user already said how many screenshots they want, remember it for stage 2.
Run it in the background if the agent supports that, long recordings take a while:
python <skill>/scripts/transcribe.py "<media path>" --language ru
Options:
--model small(default). Others:tiny,base,medium,large-v3. On out-of-memory it falls back to a smaller model automatically, both on load and during transcription.--language ru/en/uk... Omit it if the language is unknown (auto-detect).--chunk-min 5chunk length in minutes,--threads 2,--beam 1.--out <dir>output folder,--freshignore cached chunks.
Behavior:
- The recording is cut into chunks; each chunk prints
[k/n] 00:05:00-00:10:00 done, ..., NN%. Report this progress to the user while it runs. - Timestamps in all outputs are absolute recording time.
- Each chunk is cached in
<out>/chunks/, so a rerun after a crash resumes from the last finished chunk. - Default output folder:
<media folder>/<media name>_analysis/withtranscript.txt([hh:mm:ss] text),transcript.srt,transcript.json. - Console output is ASCII only (Windows consoles often break on Cyrillic). Read
transcript.txtwith your file reading tool, do not print it through the shell. - Low-memory machines: if even
tinyfails, ask the user to close heavy programs and rerun with--model base --threads 2.
After it finishes: read transcript.txt and give the user a short structured summary with timestamps. Whisper mishears names and terms: give the cleaned-up meaning and mark doubtful places.
Stage 2 - key moment screenshots
Audio-only files have no frames: skip this stage for them.
- Number of screenshots: what the user asked for; if not said, ask once (suggest 5).
- From the transcript, pick the N most important moments yourself: task statements, requirements, bugs shown, decisions, and places where the speaker says "here / look at this / this one" (something is shown on screen). Spread them over the recording, avoid near-duplicates. Take the time 1-2 s after the phrase starts, when the thing is usually on screen.
- Write
<out>/moments.json(seeexamples/moments.example.json):[{"time": "00:03:12", "title": "Export button does not work", "note": "What was said and why it matters"}]timeacceptshh:mm:ss,mm:ssor seconds. - Run:
Output:python <skill>/scripts/screenshots.py "<media path>" "<out>/moments.json"<out>/shots/NN_hh-mm-ss.jpgand<out>/report.md. Option--width 1600limits frame width. - Look at every screenshot (if the agent can view images). If a frame does not show what the moment is about (transition, blank, wrong screen), shift the time by a few seconds and rerun for that moment. Then add what is actually visible to
noteinmoments.jsonand rerun soreport.mdis final. - Give the user the list of moments
[hh:mm:ss] title - what is seen / said, the path toreport.mdand theshotsfolder.
Later requests on the same recording ("3 more screenshots", "screenshots about payments") reuse the existing transcript.txt; do not transcribe again.
Rules
- Never overwrite or delete the source recording.
- Give paths to the user as clickable links when the interface supports it.