agentleFS
2boysfromtown2boysfromtown/2bft-video-editor/skills/ffmpeg-edit-toolkit/SKILL.md

ffmpeg-edit-toolkit

Skill0 starsChanged 16 days agoMITView on GitHub

Do the actual cutting, mixing and exporting with ffmpeg - remove silences and dead air (automatic jump cuts), trim, join, punch-in zooms, speed ramps, J-cuts and L-cuts, dissolves, timed overlays, burned-in captions, placing sound effects, ducking music under a voice, voice cleanup, loudness normalising and delivery encodes. Includes tested recipes and two scripts (remove_silence.py, make_sfx.py). Use when asked to cut, tighten, trim, join, speed up, add music or sound effects, normalise audio, or export a video, or whenever another editing skill needs a command to carry out its plan.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never overwrite the source: Write every result to a new file in an edits/ folder next to it (name_v1.mp4, name_v2.mp4).

    line 12
  2. Very specific:

    Check the result, don't assume it: After each render: ffprobe the duration (does it equal what the plan says?), pull 2-3 frames with -ss T …

    line 15
  3. Very specific:

    Put filtergraphs in double quotes and use single quotes inside for expressions: -filter_complex "[0:a]volume='clip(t/3,0,1)':eval=frame[a]".

    line 20

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ffmpeg edit toolkit

The hands for the editing skills. edit-video decides what to do; the craft skills say why; this one has the commands that do it. Every recipe in references/recipes.md was run on ffmpeg 9.0.2 and the results checked, not just parsed.

Ground rules

  • Never overwrite the source. Write every result to a new file in an edits/ folder next to it (name_v1.mp4, name_v2.mp4).
  • Probe before cutting: ffprobe -v error -show_entries format=duration:stream=codec_type,codec_name,width,height,r_frame_rate -of compact in.mp4
  • Re-encode once. Stream copy (-c copy) is only for rough trims on keyframes. Do all filtering in one pass, then one final encode.
  • Check the result, don't assume it. After each render: ffprobe the duration (does it equal what the plan says?), pull 2-3 frames with -ss T -frames:v 1 and look at them, and for audio changes measure with volumedetect or loudnorm ... print_format=json.
  • Long files: over ~30 minutes, say what the render will take and ask before starting.

Windows / PowerShell notes

  • Put filtergraphs in double quotes and use single quotes inside for expressions: -filter_complex "[0:a]volume='clip(t/3,0,1)':eval=frame[a]". Avoid $ inside the graph.
  • Very long graphs (many cuts) overflow the command line. This ffmpeg no longer has -filter_complex_script; write the graph to a file and use -/filter_complex graph.txt.
  • Needs ffmpeg and ffprobe on PATH and Python 3.9+ (standard library only). A terminal opened before installing ffmpeg may need restarting.

Scripts

Run with python -I <script>.

ScriptWhat it does
scripts/remove_silence.py in outDetects pauses and cuts them out, keeping a small pad so words aren't clipped. Prints original vs kept length and cuts per minute. --dry-run shows the keep-list first. Tune --noise (-35 dB default; use -30 in noisy rooms, -45 if it cuts too much) and --min-silence (0.4 s default; raise to keep natural breathing room). Works on video or audio.
scripts/make_sfx.py kind out.wavGenerates placeholder whoosh, riser, hit, pop, tick sounds so a rough cut has sound before real assets are chosen. Replace with real sounds for the final mix.

Real sound effects, meme sounds, music, meme clips and stock footage come from the asset-library skill: it searches the checked sources with licences (find_assets.py sound|memesound|music|video ...), checks what's trending, and downloads with fetch_asset.py (clip a section of a video page with --ytdlp --section). Its references/download-tools.md has the clean-up recipes (trim with handles, −16 LUFS, 48 kHz).

For transcript-driven cuts (remove a sentence, cut a filler word): run transcribe-local, pick the time ranges from its [MM:SS] lines, then build the keep-list as trim/concat (recipe "Cut list").

Recipes

See references/recipes.md: inspect, trim, cut list, dead air, punch-in zoom, speed ramp and slow-mo, J-cut and L-cut, dissolve and fade, timed overlay, burned-in captions, voice chain, music EQ pocket and ducking, reverb tail, reversed riser, panning, placing and synthesising sound effects, mixing onto video, loudness, and delivery encodes.

For vertical Shorts use long-to-shorts. For code-built graphics use Remotion or GSAP (and their Claude skills, if installed).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.