跪拜 Guibai
← All articles
AI Programming · Claude

ffmpeg-skill in 192 AI Runs: Fewer Passes, Constant Outputs, Honest Failures

By ZzT ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

In automated pipelines, a tool that fails loudly and gives a fix command is more valuable than one that silently produces a 763 MB file or claims success with a 25 ms sync error. ffmpeg-skill demonstrates a concrete trade-off: pay 13-62% more per run to get deterministic output and honest failure reporting, which matters when corruption is worse than an aborted job.

Summary

In a local offline sandbox, a 192-run controlled test pitted ffmpeg-skill v4.16.0 against four AI models (Sonnet 5.5, Haiku 5.5, GPT-6.2 Sol, GPT-5.6 Luna) across eight single-step FFmpeg editing tasks. With the skill installed, agents passed 88 of 96 runs; without it, 95 of 96. The eight with-skill failures were all honest refusals when the local FFmpeg lacked the subtitles filter, each returning a specific install command, while the without-skill group had one false claim of success.

The skill's real effect wasn't competence: it standardized behavior. A 29.5-second frame-exact cut produced a constant 31.3 MB output across all models and runs, whereas bare agents produced 100-763 MB depending on the model, because they re-encoded the whole clip with CRF 0 or 12-14 to satisfy a 'keep quality' prompt. Scripts also enforced post-run verification, unmeasured-property disclosure, and a fixed five-line report format.

On fully equipped local tasks, installing the skill raised per-run cost by 13% to 62%, driven by extra reads of SKILL.md, references, and --help output, and a 2.3x token consumption for Codex+Sol. But it cut audio-sync time from 30-176 seconds to 18-41 seconds via a built-in cross-correlation script. When components were missing, with-skill runs stopped in seconds with fix instructions; without-skill runs worked around using Pillow overlays, sometimes spending $0.45 and 2.6 million tokens. The test also exposed that models violate the skill's no-raw-ffmpeg rule at different rates (Haiku 19 times, Sol 15, Sonnet 7, Luna 2), and that Claude Code's sandbox blocks any command containing '=' unless Bash is explicitly allowed. The authors emphasize the 3-run-per-group sample and local FFmpeg gaps, and recommend pinning a tagged release.

Takeaways
— Installing ffmpeg-skill lowered the pass rate from 95/96 to 88/96 across 8 single-step editing tasks, but the 8 failures were all honest refusals when the subtitles filter was missing; the without-skill group had 1 false 'done' claim.
— The frame-exact cut script produced a constant 31.3 MB output for a 29.5-second clip, while bare agents produced 100-763 MB by re-encoding with very low CRF or QP 0.
— Audio-video sync time dropped from 30-176 seconds to 18-41 seconds with sync.py's built-in cross-correlation.
— On the 7 fully-equipped tasks, per-run cost rose 13-62% with skill due to extra documentation reads and token overhead (2.3x for Codex+Sol).
— Models violated the 'never run raw ffmpeg/ffprobe' rule at different rates: Haiku 19 times, Sol 15, Sonnet 7, Luna 2 across 24 with-skill runs.
— Claude Code's sandbox auto-allow mode does not permit commands containing '=' (e.g., ffprobe -show_entries stream=...); adding Bash to --allowedTools fixes it.
Conclusions

The test shows that today's frontier models can reliably perform single-step FFmpeg edits without a skill, so the skill's value is not capability uplift but variance control and verification discipline.

A 13-62% cost increase for deterministic output is justified in batch pipelines where a silent re-encode or an oversized attachment is more expensive than a clean failure, but not for ad-hoc emergencies where agents can work around missing components.

The frequency of raw-command violations even with the skill installed suggests that policy enforcement through documentation alone is weak; models with smaller context or less training on tool discipline (Haiku) violate more often.

Concepts & terms
GOP
Group of Pictures: a sequence of frames in compressed video. In frame-exact cuts, copying a GOP intact avoids re-encoding the middle of the video, saving time and preserving quality.
stream copy
An FFmpeg mode that copies already-encoded audio/video streams without re-encoding. It is used to avoid quality loss and reduce processing time when no transformation is needed.
filter_missing
A status ffmpeg-skill scripts return when the local FFmpeg build lacks a required filter (e.g., subtitles). It includes an install command and refuses to proceed, instead of guessing.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗