Ffmpeg
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).From its SKILL.md
npx -y skills add SalZaki/ffmpeg-workbench --skill ffmpegAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.5 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
ffmpeg Workbench
Transform media with a disciplined loop: probe the environment → probe the input → transform → verify the output. Never assume; always measure.
The core loop
1. Probe the environment (once per session)
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.
2. Probe the input
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.
3. Transform
Pick the recipe. Non-negotiable correctness rules (these fix real-world failures):
- Even dimensions: with libx264/libx265 use
scale=-2:720(never-1) so the computed side is divisible by 2. Odd widths abort the encode. - Audio-aware speed changes: pair
setptswithatempo.atempoaccepts 0.5–100 per instance; chain for values outside (e.g. 4x =atempo=2.0,atempo=2.0). Never silently drop audio with-anunless the user asked. - No
-strict experimentalfor AAC — obsolete since ffmpeg 3.0. Plain-c:a aacis correct. - Never overwrite blind: default to a new output name (
input_converted.mp4). Only pass-yif the user explicitly approved overwriting. - Quote every path. Assume spaces and unicode.
- Stream copy when possible: if only the container changes, or trimming at keyframes is acceptable, use
-c copy— instant and lossless. Re-encode only when filters, codec change, or frame-accurate cuts require it. - Web output: add
-movflags +faststartto any MP4 destined for browsers/upload. - Portable shell: no process substitution
<(...). For concat lists, write a temp file and delete it after. - Long operations: for inputs over ~5 minutes of re-encode, first do a 10-second test slice (
-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 |
4. Verify
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".
5. Batch jobs
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.
Scope boundaries
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.
What ships with it: 8 files
21.6 KB alongside SKILL.md, 2 of them executable
references/
- audio.md1.9 KB
- edit-and-concat.md2.9 KB
- encoding.md3.8 KB
- gif-and-frames.md1.8 KB
- platform-presets.md1.9 KB
- subtitles.md1.6 KB
scripts/
- probe_env.mjsruns3.2 KB
- verify_output.mjsruns4.6 KB
Gives 0 of the 12 instructions most video audio skills give in ~1.2k tokens
Counted across 622 of the 795 authors here whose files we hold, read 2026-08-07
- Read individual rule files for detailed explanationsin 21 of 622, across 10 files
- Render final videoin 13 of 622, across 6 files
- Use WAV PCM 16kHz mono audio formatin 12 of 622, across 3 files
- Use this skill when dealing with Remotion codein 11 of 622, across 4 files
- Save generated audio to a WAV filein 11 of 622, across 4 files
- Handle conversion errors gracefullyin 10 of 622, across 6 files
- Add captions to videos alwaysin 10 of 622, across 4 files
- Generate music from text descriptions using MusicGenin 9 of 622, across 2 files
- Do not skip pipeline layersin 9 of 622, across 3 files
- Do not make one tool do everythingin 9 of 622, across 3 files
- Use Azure Document Intelligence for complex PDFsin 9 of 622, across 4 files
- Never ask the user to paste their full API keyin 9 of 622, across 3 files
Said here and by no other author read
- probe environment before first ffmpeg operation
- probe input media before transforming
- read recipe reference matching the task
- use even dimensions when scaling
- preserve audio when changing speed
- default to new output file name
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.