Communitygithub.com

video-analyze

Local video and audio analysis - timestamped transcription (offline faster-whisper, long recordings split into 5-minute chunks with progress and resume) and then screenshots of the N most important moments picked by the agent, with a markdown report. Use when the user asks to transcribe, analyze or summarize a video or audio file with timestamps, cut screenshots of key moments, or gives a path to a screencast, call recording or voice message (.mp4, .mov, .webm, .mkv, .mp3, .m4a, .wav, .ogg). Also triggers on Russian requests like "разбери видео", "транскрибируй видео", "расшифруй с таймкодами", "сделай N скриншотов ключевых моментов".

What is video-analyze?

video-analyze is a Claude Code agent skill that local video and audio analysis - timestamped transcription (offline faster-whisper, long recordings split into 5-minute chunks with progress and resume) and then screenshots of the N most important moments picked by the agent, with a markdown report. Use when the user asks to transcribe, analyze or summarize a video or audio file with timestamps, cut screenshots of key moments, or gives a path to a screencast, call recording or voice message (.mp4, .mov, .webm, .mkv, .mp3, .m4a, .wav, .ogg). Also triggers on Russian requests like "разбери видео", "транскрибируй видео", "расшифруй с таймкодами", "сделай N скриншотов ключевых моментов".

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lofti198/video-analyze-skill/tree/HEAD

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Video analyze (local)

Two stages, run together or separately:

  1. Transcription with timestamps (always first).
  2. 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).
  • ffmpeg and ffprobe on 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 5 chunk length in minutes, --threads 2, --beam 1.
  • --out <dir> output folder, --fresh ignore 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/ with transcript.txt ([hh:mm:ss] text), transcript.srt, transcript.json.
  • Console output is ASCII only (Windows consoles often break on Cyrillic). Read transcript.txt with your file reading tool, do not print it through the shell.
  • Low-memory machines: if even tiny fails, 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.

  1. Number of screenshots: what the user asked for; if not said, ask once (suggest 5).
  2. 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.
  3. Write <out>/moments.json (see examples/moments.example.json):
    [{"time": "00:03:12", "title": "Export button does not work", "note": "What was said and why it matters"}]
    
    time accepts hh:mm:ss, mm:ss or seconds.
  4. Run:
    python <skill>/scripts/screenshots.py "<media path>" "<out>/moments.json"
    
    Output: <out>/shots/NN_hh-mm-ss.jpg and <out>/report.md. Option --width 1600 limits frame width.
  5. 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 note in moments.json and rerun so report.md is final.
  6. Give the user the list of moments [hh:mm:ss] title - what is seen / said, the path to report.md and the shots folder.

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.

Related Skills