claude-video — CLI-Native Video Editing for Claude Code
Quick Reference
| Command | What it does | |---------|-------------| | /video | Interactive mode — describe what you want in plain English | | /video setup | Install all dependencies (faster-whisper, auto-editor, scenedetect, yt-dlp, mediainfo) | | /video edit | Trim, cut, split, merge, speed, crop, overlay, stabilize, transitions | | /video transcode | Convert codecs, compress, GPU-accelerated encoding, two-pass | | /video audio | Normalize loudness, reduce noise, mix, extract, remove silence | | /video caption | Transcribe speech → animated word-by-word subtitles (Whisper + ASS) | | /video analyze | Inspect with ffprobe, measure quality (VMAF/SSIM/PSNR), detect scenes | | /video export <platform> | One-command export: youtube, tiktok, instagram, linkedin, web, gif, podcast | | /video download <url> | Download video via yt-dlp with format selection | | /video create | Programmatic video creation via Remotion (React-based motion graphics) | | /video shorts | Longform → shortform pipeline: transcribe, score, crop 9:16, caption, export | | /video image | AI image generation (Gemini 3 Pro Image, FLUX.2 local, SD 3.5, OpenAI, rembg) | | /video generate | AI video generation (Veo 3.1, Runway Gen-4, local SVD) | | /video screenshot | Web capture via Playwright (screenshots, recordings, Ken Burns) | | /video enhance-audio | AI audio (Demucs separation, DeepFilter denoise, TTS, diarize, AudioSR) | | /video enhance | AI video (Real-ESRGAN upscale, RIFE interpolation, CodeFormer, rembg) | | /video promo | Stock footage + Remotion promo videos with contrast-aware text overlays | | /video setup --ai | Install AI dependencies (PyTorch, WhisperX, FLUX.2, Real-ESRGAN, etc.) |
Orchestration Logic
Command Routing
When the user provides a specific command, load the matching sub-skill:
/video editor intent is trim/cut/split/merge/speed/crop/overlay/stabilize/transition → Readskills/claude-video-edit/SKILL.md/video transcodeor intent is convert/compress/encode/codec/format change → Readskills/claude-video-transcode/SKILL.md/video audioor intent is audio normalize/noise/mix/extract/silence/volume/LUFS → Readskills/claude-video-audio/SKILL.md/video captionor intent is transcribe/subtitle/caption/whisper/SRT/ASS → Readskills/claude-video-caption/SKILL.md/video analyzeor intent is inspect/info/quality/VMAF/metadata/scene detect/ffprobe → Readskills/claude-video-analyze/SKILL.md/video exportor intent is export for youtube/tiktok/instagram/linkedin/web/gif/podcast → Readskills/claude-video-export/SKILL.md/video downloador intent is download video from URL → Readskills/claude-video-download/SKILL.md/video createor intent is create/generate programmatic video/motion graphics/title card → Readskills/claude-video-create/SKILL.md/video shortsor intent is shortform/clips/TikTok shorts/reels from longform → Readskills/claude-video-shorts/SKILL.md/video imageor intent is generate image/AI image/FLUX/stable diffusion/remove background → Readskills/claude-video-image/SKILL.md/video generateor intent is generate video/AI video/Veo/Runway/text-to-video → Readskills/claude-video-generate/SKILL.md/video screenshotor intent is screenshot/web capture/screen recording/Ken Burns → Readskills/claude-video-screenshot/SKILL.md/video enhance-audioor intent is separate vocals/denoise AI/diarize/TTS/voice clone/upsample audio → Readskills/claude-video-enhance-audio/SKILL.md/video enhanceor intent is upscale/super resolution/interpolate/face restore/remove background video → Readskills/claude-video-enhance/SKILL.md/video promoor intent is promo video/stock footage/marketing video/stock clips with text → Readskills/claude-video-promo/SKILL.md/video setup→ Runbash scripts/setup.sh/video setup --ai→ Runbash scripts/setup.sh --ai
Interactive Mode
When user says /video without arguments or describes a task in natural language:
- Run
bash scripts/check_deps.shto verify tools are available - Run
bash scripts/detect_gpu.shto know encoding capabilities - Identify intent from the user's description
- Route to the appropriate sub-skill
- If intent is ambiguous, ask the user to clarify
Multi-Step Pipelines
For complex requests that span multiple sub-skills (e.g., "download this YouTube video, remove silence, add captions, export for TikTok"), execute sub-skills sequentially:
- Download → edit → caption → export
- Pass output of each step as input to the next
- Use temp files in
/tmp/claude-video/for intermediate outputs - Clean up temp files after final output is produced
Safety Rules — MANDATORY
- Always use
-nflag (no-overwrite) unless user explicitly requests overwrite - Never let output path equal input path — run
bash scripts/preflight.sh "$INPUT" "$OUTPUT"before any write - Never delete source files — all operations produce new files
- Run preflight before every write operation:
bash scripts/preflight.sh <input> <output> - Confirm before: batch operations (>3 files), downloads, operations estimated >5 minutes
- Auto-execute without confirmation: ffprobe analysis, thumbnail extraction, GPU detection, metadata reading
- Temp file cleanup: use
trap 'rm -f "$TEMP"' EXIT INT TERMpattern in all scripts - Disk space check: run
bash scripts/estimate_size.shbefore large encodes
AI Sub-Skill Routing Guide
- "separate vocals" / "isolate dialogue" →
claude-video-enhance-audio(Demucs, AI model) - "reduce noise" / "denoise" →
claude-video-audio(FFmpeg afftdn) for quick fix,claude-video-enhance-audio(DeepFilterNet3) for AI quality - "remove background" from image →
claude-video-image(rembg), from video →claude-video-enhance(rembg batch + alpha assembly) - "upscale" / "super resolution" →
claude-video-enhance(Real-ESRGAN) - "slow motion" (basic) →
claude-video-edit(setpts), (AI frame interpolation) →claude-video-enhance(RIFE) - "generate image/video" →
claude-video-image/claude-video-generate - "shorts" / "clips from long video" →
claude-video-shorts
Python Virtual Environment
AI scripts require an isolated venv with PyTorch nightly cu128 (for RTX 5070 Ti Blackwell sm_120):
# Install the AI venv (one-time)
bash scripts/setup.sh --ai
# Venv location
~/.video-skill/bin/python3
~/.video-skill/bin/activate
All Python scripts in scripts/ that use AI models (segment_scorer.py, face_tracker.py, image_generate.py, video_generate.py, audio_enhance.py, video_enhance.py, web_capture.py) require activation: source ~/.video-skill/bin/activate
VRAM Management (16GB Budget — RTX 5070 Ti)
Before loading any GPU model, check free VRAM:
nvidia-smi --query-gpu=memory.free --format=csv,noheader,nounits
| Tier | VRAM | Models | Rule | |------|------|--------|------| | Exclusive (>10GB) | 12-13GB | FLUX.2 klein, Bark TTS | Must be ONLY GPU model loaded | | Heavy (5-10GB) | 5-8GB | Demucs, WhisperX, AudioSR | One heavy at a time | | Light (<5GB) | 1-4GB | rembg, CodeFormer, RIFE, pyannote | Can coexist if total <12GB | | NVENC | ~500MB | Hardware encoder | Always available | | CPU only | 0 | MediaPipe, PySceneDetect, Playwright, librosa | No VRAM needed |
NEVER run two heavy/exclusive models simultaneously. Load → process → unload → next model.
Encoding Defaults
GPU-First Strategy
- Run
bash scripts/detect_gpu.shat start of any encoding task - If NVENC available: use
h264_nvenc/hevc_nvenc/av1_nvencwith-preset p5 -tune hq - If no GPU: fallback to
libx264/libx265/libsvtav1with-preset medium - Always add
-movflags +faststartfor MP4 output
Codec Selection Priority
- Stream copy (
-c copy): when no re-encoding needed (trim, r