ffmpeg-command

A guide that turns plain-language descriptions of video and audio tasks into FFmpeg commands. FFmpeg is a command-line tool for converting, trimming, filtering, and combining media files.

In plain words
What is it for?
Transcoding, trimming, joining, extracting or replacing audio, changing size or quality, applying filters, adding overlays, creating thumbnails or GIFs, burning subtitles, and combining media streams.
Why use it?
It reduces the risk of producing commands that look plausible but fail because of codec, filter, timing, audio, or format details.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/rendi-api/ffmpeg-llm/ffmpeg-command
Any agent
npx skills add rendi-api/ffmpeg-llm --skill ffmpeg-command
Clone the repo
git clone --depth 1 https://github.com/rendi-api/ffmpeg-llm

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,368 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00067 $0.03368
Opus 5 $0.00034 $0.01684
Sonnet 5 $0.00013 $0.00674
Haiku 4.5 $0.00007 $0.00337

Measured 2d ago against content hash 3d6857966c1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ffmpeg-command scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ffmpeg-command/SKILL.md · 223 lines

How it starts

The opening of the file, as written. The whole thing — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FFmpeg Command Builder

Translate a described media operation into a correct, efficient FFmpeg command.

Read the matching reference — every time

Before writing any command, identify the matching reference file(s) and read them with the Read tool. The recipes and gotchas in this file are summaries for quick recall. The references hold the parameter ranges, alternatives, edge cases, and tribal knowledge that separate a working command from a plausible-looking broken one.

This is non-negotiable — even when a recipe below seems to fit. Recipes show shape; references show why and what breaks. Skipping the read step is how broken commands get shipped.

If the operation involves... Read
Any non-trivial command (read every time) references/pitfalls.md
Codec choice, CRF, preset, tune, faststart, yuv420p, hvc1, 1-/2-pass references/encoding.md
Filter graphs, -vf/-af/-filter_complex, stream selectors, split/concat/overlay, expressions references/filters.md
Trimming, seeking, accuracy vs speed, -c copy interactions references/seeking-and-trimming.md
Audio (extract, replace, mix, fades, format, normalize, channels) references/audio.md
Scale, pad, crop, fps, speed, overlay, fades, vstack/hstack, jump cuts references/video-effects.md
Drawtext or subtitles (burn or mux), ASS, font handling references/text-and-subtitles.md
Image→video, slideshow, Ken Burns/zoompan, GIFs, thumbnails, storyboards references/asset-generation.md
GPU encoding (NVENC, QSV, VAAPI) references/gpu-acceleration.md
HLS packaging, VOD/live segments, ABR multi-bitrate references/streaming.md

If the operation spans categories (e.g., "burn subtitles with custom styling and re-encode for web"), read every relevant reference. Always include pitfalls.md for non-trivial commands.

Workflow

  1. Identify the operation type. Transcode? Remux? Trim? Filter? Generate from images? Mix audio?
  2. Read the matching reference(s). Use the table above. Always include pitfalls.md for non-trivial commands. Use the Read tool — do not generate the command from memory.
  3. Probe inputs only when codec, duration, or stream layout matters. Run ffprobe -show_streams -i <input> first if the request depends on input properties (e.g., "match the source frame rate", "keep the original audio codec", "trim the last 5 seconds"). Skip for plain remux/transcode.
  4. Decide stream copy vs re-encode.
    • -c copy (remux only): changing container, muxing tracks, joining keyframe-aligned segments, moving metadata (faststart).
    • Re-encode: applying any filter, changing codec, frame-accurate trimming, compressing.
    • Details and edge cases: references/seeking-and-trimming.md, references/encoding.md.
  5. Choose codec parameters for the target use case. Defaults below; verify against references/encoding.md for CRF ranges, preset trade-offs, and rate-control modes.
    • Web/VOD/archival: libx264 -crf 18 -preset veryslow -tune fastdecode -movflags +faststart
    • Apple H265: add -vtag hvc1
    • WebM: libvpx-vp9 -crf 31 -b:v 0 -c:a libopus
    • Live streaming: -preset ultrafast -tune zerolatency
  6. Place flags in the correct position. Input flags (-ss, -loop, -t, -r, -skip_frame) come before -i; output flags (-c:v, -vf, -crf, -movflags, output path) come after.
  7. Apply playback-compatibility defaults unless the user has a reason not to: format=yuv420p (or -pix_fmt yuv420p), setsar=1:1 after scale+pad, +faststart for web MP4. Full list in references/pitfalls.md.

Read the full file on GitHub · 223 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 223 lines · 67 tokens per session scan A 3d6857966c1f

Subscribe to this mod's changes

ffmpeg-command is a skill published in the GitHub repository rendi-api/ffmpeg-llm (26 stars, last pushed 2mo ago), licensed MIT. It adds 67 tokens to every session and 3,368 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

diagnostic-stem-delivery

Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.

HKUDS/OpenSpace · 23 tokens

vox-director

Turn ONE topic into a finished Vox-style paper-collage explainer / ad video, end to end on the Atlas Cloud API + local ffmpeg — script, collage keyframes, motion, voice-over, music, captions, all automated. Use this whenever the user wants a "Vox style" video, a paper/torn-paper collage animation, a "motion collage"…

Alisa0808/vox-director · 236 tokens

seedance-vocab-ja

This skill should be used when the user asks for Japanese Seedance 2.0 prompt wording, Japanese cinematic vocabulary, or translation of camera, lighting, action, VFX, audio, and production terms into Japanese.

Emily2040/seedance-2.0 · 50 tokens

model-compatibility

Model family compatibility matrix covering loaders, resolutions, samplers, CFG, VAE, ControlNet, and LoRA compatibility for SD 1.5, SDXL, Flux, SD3, and video models.

artokun/comfyui-mcp · 47 tokens