/process-video:process-videofrom process-video
Transcribes video/audio files (mp4, mov, mkv, webm, m4a, mp3, wav, ogg, opus) into timestamped Markdown transcripts with optional JPEG screenshots, enabling Claude to understand spoken content and visual scenes. Runs Whisper locally.
Ships in process-video. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Claude cannot watch video. This skill translates one into something Claude can read: a Markdown file with the speech transcribed by timestamp, plus JPEG screenshots spread over the whole timeline. You choose how many screenshots, run the pipeline, then read the Markdown and look at every screenshot yourself, and answer the user from both. An input with no video stream (a voice message, a podcast) is detected and transcribed without screenshots.
The goal is the best possible understanding of the video. Token cost matters less than coverage, but screenshots stay in your context after you read them, so the number is bounded by your context window: overflowing it would compact away exactly what you paid to see.
Get the file path: the path the user typed, or the path of the attached file. Ask for nothing else unless a parameter below matters.
Probe the file and the environment:
node "${CLAUDE_PLUGIN_ROOT}/scripts/probe.mjs" "<file>" --model-dir "${user_config.model_dir}" --ceiling "${user_config.max_shots}" --context-window <your context window in tokens> --images-in-conversation <images already in this conversation>
--context-window: your own context window, 200000 unless you know it is larger. --images-in-conversation: every image already in this conversation, including screenshots from an earlier video. Both change the recommendation.plan.problems: if it is not empty, show each problem to the user and stop. Never run docker pull, brew install or the model download without the user's approval: state the command and the size first (Docker image about 2.3 GB compressed, model about 1.1 GB).media: durationSeconds, hasVideo, width and height of the source.estimate: recommendedShots, secondsBetweenShots, perShotTokens, transcriptTokens, screenshotTokens, overheadTokens, totalTokens and budgetTokens (half of the context window, the most the video may take). recommendedShots is the largest count that fits the budget, the user's max_shots ceiling, the per-conversation image limit (100 on 200k-context models, 600 on larger ones) and one shot per second.Choose the screenshot count:
recommendedShots. It is the best coverage that still fits. If it is 0 for a video, the conversation has no image budget left: pass --max-shots 0 (transcript only) and suggest a fresh conversation to see the screenshots.recommendedShots unless the user explicitly asks for more and you have told them the cost; never above the ceiling.totalTokens). Example: "Vídeo de 12 min, 80 prints (1 a cada 9 s), cerca de 100 mil tokens para digerir."Run the pipeline with the chosen count:
node "${CLAUDE_PLUGIN_ROOT}/scripts/process-video.mjs" "<file>" --model-dir "${user_config.model_dir}" --max-shots <chosen count> [--out <dir>] [--model local|openai] [--language pt] [--shot-offset 1] [--shot-interval <s>] [--audio-only]
It starts the backend if needed, transcribes, takes the screenshots, writes transcricao.md, and stops only what it started. stderr carries progress only; stdout ends with one JSON line: outDir, markdown, prints, audioOnly, segments, screenshots, durationSeconds, tokenEstimate. audioOnly is true when no screenshots were taken (no video stream, --audio-only or --max-shots 0); then prints is null and screenshots is 0.
Digest the video:
transcricao.md. Its header states the token estimate. Each ## [hh:mm:ss] entry has a screenshot reference (prints/NNN.jpg, relative to outDir) and, for speech segments, the transcript. Image-only entries are the periodic screenshots. In an audio-only run the entries carry timestamp and text only: read the Markdown and skip the next two bullets.Answer the user's actual request from that understanding. Then add one line with the token estimate from tokenEstimate (totalTokens, and totalPerMinute per video minute), saying it is an estimate, and where transcricao.md and prints/ are. If the run was interrupted and a container or server may be left behind, run node "${CLAUDE_PLUGIN_ROOT}/scripts/backend.mjs" stop.
| Flag | Default | Meaning |
|---|---|---|
--out | <file dir>/<file name>-transcript | Output folder |
--model | local | local uses the local Whisper server, openai uses the OpenAI API with OPENAI_API_KEY from the environment |
--language | pt | Spoken language as a two-letter Whisper code (pt, en, es); pt also sends the Portuguese lecture prompt |
--max-shots | 60 | Number of screenshots to take; pass the count chosen in step 3. Without --shot-interval the spacing between periodic shots is chosen automatically (at least 1 s) to use the whole count over the whole timeline. 0 takes no screenshots (transcript only) |
--shot-interval | auto | Minimum seconds between periodic screenshots (image-only entries). The count can only widen it. 0 means no periodic shots |
--shot-offset | 1 | Seconds after a speech segment starts for its screenshot |
--audio-only | auto | Skip every screenshot and write timestamp and text only. Turned on by itself when the input has no video stream (cover art does not count), so it is needed only to ignore the picture of a real video |
Everything up to writing the Markdown runs outside the model and costs nothing. What costs is reading the result, and every number here is an estimate:
ceil(width / 28) x ceil(height / 28) tokens: 1,196 for 16:9 landscape or 9:16 portrait.http://127.0.0.1:8178/health is reused and never stopped.whisper-server. Both are stopped when the transcription ends.OPENAI_API_KEY.model_dir (set with /config or when the plugin is enabled), passed as --model-dir in the commands above; when it is empty, PROCESS_VIDEO_MODEL_DIR or ~/.cache/process-video/models is used. Always pass --model-dir and --ceiling exactly as written above. Install with node "${CLAUDE_PLUGIN_ROOT}/scripts/install-model.mjs" --model-dir "${user_config.model_dir}" after the user approves the download.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub matt-ferraz/process-video --plugin process-video