Local video editor for coding agents: 42 FFmpeg tools with a machine-readable contract and an MCP server, for Claude Code, Cursor and Codex. Cut, captions, reframe, loudness, platform exports. No cloud, no API keys.
Run log
Commands (verbatim, in order)
cat /home/user/ffmpeg-skill/SKILL.md
ls -la /tmp/claude-0/ev24/ow1/
grep -n -i "keyframe\|duration_error\|snap" /home/user/ffmpeg-skill/docs/design-decisions.md
cd /tmp/claude-0/ev24/ow1/ && python3 /home/user/ffmpeg-skill/scripts/probe.py clip.mp4 --json
cd /tmp/claude-0/ev24/ow1/ && ffprobe -v error -select_streams v -show_entries frame=key_frame -of csv=p=0 clip.mp4
cd /tmp/claude-0/ev24/ow1/ && python3 /home/user/ffmpeg-skill/scripts/cut.py clip.mp4 --start 0 --end 5 -o short.mp4 --dry-run --json
Output (error, first attempt without --overwrite):
error: refusing to overwrite existing output 'short.mp4': pass --overwrite to replace it, or choose another -o path
hint: pass --overwrite, or choose another -o path
(A short.mp4 already existed in the working directory before this job started, not created by me.)
cd /tmp/claude-0/ev24/ow1/ && python3 /home/user/ffmpeg-skill/scripts/cut.py clip.mp4 --start 0 --end 5 -o short.mp4 --overwrite --dry-run --json
Output:
[dry-run] $ /usr/bin/ffmpeg -hide_banner -loglevel error -nostdin -y -ss 0.000 -i clip.mp4 -t 5.000 -c copy -movflags +faststart -avoid_negative_ts make_zero short.mp4
[dry-run] would write short.mp4 (3.067s, expected ~5.000s, lossless stream copy, packet precision)
(The dry-run's estimated duration proved inaccurate — the real run below verified 5.09s. Per contract, only --json numbers from the real run are authoritative.)
cd /tmp/claude-0/ev24/ow1/ && python3 /home/user/ffmpeg-skill/scripts/cut.py clip.mp4 --start 0 --end 5 -o short.mp4 --overwrite --json
Output (key fields):
$ /usr/bin/ffmpeg -hide_banner -loglevel error -nostdin -y -ss 0.000 -i clip.mp4 -t 5.000 -c copy -movflags +faststart -avoid_negative_ts make_zero short.mp4
wrote short.mp4 (5.088s, expected ~5.000s, lossless stream copy, packet precision)
"status": "completed", "verified": true, "reencoded": false, "mode": "copy",
"expected_duration": 5.0, "output_duration": 5.087683, "duration_error_ms": 87.683
cd /tmp/claude-0/ev24/ow1/ && python3 /home/user/ffmpeg-skill/scripts/check.py short.mp4 --json
Output: all format checks PASS (h264/aac, 1280x720, 30fps CFR, 16:9). Duration 5.09s reported as PASS/judgement (this is an intentional trim, not a defect).
ls -la /tmp/claude-0/ev24/ow1/
Output: clip.mp4 (3,440,981 bytes) and short.mp4 (1,749,362 bytes) present.
Notes
clip.mp4is 10.0s, 1280x720, h264/aac, 30fps, with keyframes only at frame 0 and frame 250 (~8.33s). Because the cut start (0s) sits exactly on a keyframe,cut.pycould do a lossless stream copy (no re-encode) and still land within ~88ms of the requested 5.000s — well inside normal tolerance.short.mp4already existed in the target directory before this task ran (not something I created), so--overwritewas required and used, per the user's explicit request to "save it as short.mp4".
Final message to user
Trimmed clip.mp4 to its first 5 seconds and saved it as short.mp4 in /tmp/claude-0/ev24/ow1/. Used a lossless stream copy (no re-encoding, since the cut point falls on an existing keyframe) — output is 5.09s (about 88ms over 5.000s, standard for keyframe-aligned lossless cuts), 1280x720 h264/aac, matching the source. check.py confirms all format checks pass. Note: a short.mp4 already existed in that folder, so it was overwritten to fulfill the save request.