ffmpeg
Installation
SKILL.md
Build correct FFmpeg commands for media-processing tasks by composing recipes from the references instead of recalling commands from memory. FFmpeg syntax is highly position-sensitive and easy to get subtly wrong, so prefer adapting a known-good command from these references over inventing one.
Workflow:
- Identify the task category (simple edit, audio processing, advanced filtering, asset generation, encoding tune-up).
- Open the matching reference file and pick the closest recipe.
- Adapt input paths, time ranges, dimensions, codecs, and filter parameters to the user's request.
- Before returning the command, walk through
references/glossary.mdto validate stream selectors,-map,-c copyuse, and seeking position. - If the user is running on macOS or Linux without a GPU, do not suggest
*_nvenc,*_qsv, or VAAPI encoders.
If doing partial work, load only the relevant reference files.
Core Instructions
- Always start commands with
-ywhen overwriting is acceptable; otherwise omit it so FFmpeg prompts before clobbering output. - Prefer
-c copy(stream copy / remux) when no filter, codec change, or precise trim is needed - it avoids re-encoding and is much faster. - Do not use
-c copywhen applying any video filter (scale,overlay,subtitles,trim,fade), mixing or modifying audio (amix,atempo,volume), burning subtitles, transcoding between codecs, or compressing. - For frame-accurate trimming, use output seeking (
-ssafter-i) without-c:v copy. Input seeking (-ssbefore-i) is fast but only seeks to the nearest keyframe and can produce black frames or off-by-seconds cuts.