/claude-content:compress-videofrom claude-content
Compresses video files using ffmpeg with CRF (quality-based) or 2-pass (size-target) encoding, choosing H.264 or H.265 based on compression goals.
Ships in claude-content. 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.
Read when SKILL.md points to them; scripts run unread.
Compress a video using quality-based (CRF) or size-based (2-pass) encoding.
If the user did not provide a file path, ask for it with AskUserQuestion before proceeding.
ffprobe -v quiet -print_format json -show_streams -show_format "$INPUT"
Extract: duration (seconds), file size (bytes), existing video codec, audio bitrate. If ffprobe fails (file not found, not a valid video), report the error and stop — do not attempt encoding.
H.264 is the safe default: universally device-compatible and fast to encode. Use H.265 only when the size reduction justifies the slower encode time and narrower device support.
CRF mode:
ffmpeg -i "$INPUT" -c:v libx264 -crf 23 -c:a copy -movflags +faststart "$OUTPUT"
# CRF scale: 18=near-lossless, 23=default quality, 28=aggressive (visible loss)
# -movflags +faststart moves moov atom to front — enables progressive web playback
2-pass mode — calculate video bitrate first:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/compress-video/scripts/calc_bitrate.py "$INPUT" --target-mb "$TARGET_MB"
# Outputs: VIDEO_BITRATE_KBPS (integer)
# Formula: (target_mb * 8192 / duration_s) - audio_bitrate_kbps
# Typical audio budget: 128 kbps
# Exit 1 = target too small (bitrate would go negative); report the error and ask for a larger target before retrying.
# Pass 1 — video analysis only, no output file:
ffmpeg -y -i "$INPUT" -c:v libx264 -b:v ${VIDEO_BITRATE_KBPS}k -pass 1 -an -f null /dev/null
# Pass 2 — final encode with audio:
ffmpeg -i "$INPUT" -c:v libx264 -b:v ${VIDEO_BITRATE_KBPS}k -pass 2 \
-c:a aac -b:a 128k -movflags +faststart "$OUTPUT"
Show: input file size, chosen codec, mode (CRF value or calculated bitrate), output path. Wait for approval before running.
After completion: input size → output size, compression ratio (e.g., "73.2 MB → 18.4 MB, 75% reduction").
-c:a copy to preserve audio losslessly. In 2-pass mode, audio must be re-encoded (AAC 128k) because pass 1 is video-only — no audio stream is processed.convert-video with -c copy instead — instant and lossless.libx265 and add -tag:v hvc1 for Apple device compatibility.ffmpeg2pass-0.log and ffmpeg2pass-0.log.mbtree after 2-pass encoding completes.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gupsammy/claudest --plugin claude-content7 skills in this plugin
/convert-videoThis skill should be used when the user asks to "convert this video", "change format to mp4", "trim from X to Y", "cut the first X seconds", "speed up this video", "slow motion", "timelapse", "resize video", "scale down", "rotate video", "flip video", "remux", or any general FFmpeg video manipulation not covered by compress-video, make-gif, share-social, extract-audio, or extract-frames.
/extract-audioThis skill should be used when the user asks to "extract audio", "get the mp3", "strip audio from video", "rip audio", "save audio from video", "convert to audio", "get the soundtrack", "pull the audio track", "save as mp3", "export audio", or "separate audio from video".
/extract-framesExtracts first and/or last frames of every shot from a video using adaptive scene detection. Use this skill when the user says "extract frames", "get shot frames", "pull frames", "shot breakdown", "scene detect", "first frame of each shot", "last frame of each shot", "extract shots from video", or wants to extract key frames at shot cut points from a video file.
/generate-imageUse for any image creation or editing request — logo, sticker, product mockup, nano banana, t2i, i2i, multi-reference compositing via generate.py. Not for HTML/CSS mockups, diagrams, or coded UI.
/make-gifThis skill should be used when the user asks to "make a GIF", "convert to GIF", "create a GIF from this video", "export as GIF", "turn this clip into a GIF", "make an animated GIF", or "gif this".
/share-socialThis skill should be used when the user asks to "optimize for Instagram", "YouTube Shorts format", "make it 9:16", "square video", "TikTok format", "Reels format", "prepare for social media", "encode for Twitter", "optimize for Facebook", "LinkedIn video", "crop for portrait", or mentions any platform-specific video format or upload requirements.
Other plugins' skills for the same job