/ffmpeg-workbench:ffmpegfrom ffmpeg-workbench
Professional ffmpeg workflow for transforming video and audio: convert between formats, compress or resize video, clip and trim, concatenate files, create GIFs, extract or replace audio, burn or attach subtitles, change speed, extract frames/thumbnails, and package for platforms (YouTube, Instagram, TikTok, X). Use this skill whenever the user wants to convert, compress, resize, trim, cut, clip, merge, join, speed up, slow down, mute, re-encode, transcode or optimize a video or audio file, make a GIF, extract audio or frames, add subtitles, or asks anything involving mp4, mov, mkv, webm, mp3, wav, m4a, HEVC, H.264, AV1 or ffmpeg itself — even if they don't say "ffmpeg". Not for analyzing/watching video content (that's a different job).
Ships in ffmpeg-workbench. 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.
Transform media with a disciplined loop: probe the environment → probe the input → transform → verify the output. Never assume; always measure.
Before the first ffmpeg operation in a session, run:
node "${CLAUDE_PLUGIN_ROOT}/skills/ffmpeg/scripts/probe_env.mjs"
(${CLAUDE_PLUGIN_ROOT} is exported by Claude Code for plugin skills. If it's unset — e.g. this skill is running outside the plugin runtime — substitute this skill's own directory for the path prefix.)
It prints JSON: ffmpeg/ffprobe versions, which encoders are actually compiled in (libx264, libx265, libsvtav1, libopus, aac, ...), and available hardware acceleration (videotoolbox, cuda, qsv, vaapi). If ffmpeg is missing it prints per-OS install commands — relay them and stop.
Use the result to pick encoders. Never emit a command using an encoder the probe didn't confirm. If hardware acceleration is available and the task is a big re-encode, offer it (see references/encoding.md → Hardware acceleration), noting the quality/size trade-off vs software encoding.
Before transforming any file:
ffprobe -v error -print_format json -show_format -show_streams "input.ext"
Read duration, resolution, codecs, rotation metadata, audio channels/sample rate. Decisions that depend on this: whether -c copy is possible, whether scaling is needed, whether the source has audio at all, and which concat method is valid.
Pick the recipe. Non-negotiable correctness rules (these fix real-world failures):
scale=-2:720 (never -1) so the computed side is divisible by 2. Odd widths abort the encode.setpts with atempo. atempo accepts 0.5–100 per instance; chain for values outside (e.g. 4x = atempo=2.0,atempo=2.0). Never silently drop audio with -an unless the user asked.-strict experimental for AAC — obsolete since ffmpeg 3.0. Plain -c:a aac is correct.input_converted.mp4). Only pass -y if the user explicitly approved overwriting.-c copy — instant and lossless. Re-encode only when filters, codec change, or frame-accurate cuts require it.-movflags +faststart to any MP4 destined for browsers/upload.<(...). For concat lists, write a temp file and delete it after.-t 10) to validate settings, then run the full job with -nostats -loglevel warning (or -progress) so output stays readable.Recipe references — read the one that matches the task:
| Task | Read |
|---|---|
| Convert, compress, resize, quality/CRF, HEVC/AV1, hardware accel | references/encoding.md |
| Trim, cut, concat/merge, speed change, rotate | references/edit-and-concat.md |
| GIFs, thumbnails, frame extraction, image↔video | references/gif-and-frames.md |
| Audio: extract, convert, replace, mix, normalize | references/audio.md |
| Subtitles: burn-in, soft subs, extract | references/subtitles.md |
| Platform packaging (YouTube/Instagram/TikTok/X) | references/platform-presets.md |
Every produced file gets checked before you declare success:
node "${CLAUDE_PLUGIN_ROOT}/skills/ffmpeg/scripts/verify_output.mjs" output.mp4 \
--expect-vcodec h264 --expect-duration 30 --duration-tolerance 0.5 \
--expect-width 1280 --expect-height 720
Pass only the expectations relevant to the task (all flags optional; with none it just confirms the file is readable media and prints its properties). Exit code 0 = verified. On failure, read the JSON diagnostics, fix the command, re-run. Report the verified facts to the user (duration, resolution, codecs, size, and size delta vs input for compression jobs) — not just "done".
For "convert all X in this directory": probe one representative file, validate the recipe on it end-to-end (including verify), then loop over the rest with a for loop, running verify on each output and reporting a pass/fail summary. Continue past individual failures; list them at the end.
This skill transforms media. If the user wants Claude to understand video content (summarise, describe frames, transcribe), that's a video-analysis job — do frame extraction here only as a mechanical step if asked, but recommend a dedicated analysis workflow for the understanding part.
references/audio.md (opens in a new tab)references/edit-and-concat.md (opens in a new tab)references/encoding.md (opens in a new tab)references/gif-and-frames.md (opens in a new tab)references/platform-presets.md (opens in a new tab)references/subtitles.md (opens in a new tab)scripts/probe_env.mjs (opens in a new tab)scripts/verify_output.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub salzaki/ffmpeg-workbench --plugin ffmpeg-workbench