ffmpeg-graceful-degradation

ffmpeg-graceful-degradation is a skill for Claude Code, Codex from HKUDS/OpenSpace. It costs 21 tokens per session (1,552 once invoked), scanned A, original, MIT.

A workflow for making video processing with FFmpeg continue when an encoding method fails. FFmpeg is a command-line tool for converting and processing video and audio.

In plain words
What is it for?
Use it to check available encoders, test a short clip, try stream copying or alternate codecs, and fall back to MoviePy when needed.
Why use it?
Encoding can fail when a codec is missing or incompatible, especially during large batches; progressive fallbacks reduce the chance that the whole job stops.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to check available encoders, test a short clip, try stream copying or alternate codecs, and fall back to MoviePy when needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/openspace/ffmpeg-graceful-degradation
About the project

OpenSpace is a skill-management layer for AI agents that stores, retrieves, evaluates, shares, and improves reusable workflows. It is intended for people using multiple coding agents who want skills to be reused and refined based on task outcomes. The catalogue provides 200 skills for use with OpenSpace and the agents it supports.

HKUDS/OpenSpace · 7,544 stars · on GitHub

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.

Any agent
npx skills add HKUDS/OpenSpace --skill ffmpeg-graceful-degradation
Clone the repo
git clone --depth 1 https://github.com/HKUDS/OpenSpace

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ffmpeg-graceful-degradation

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/ffmpeg-graceful-degradation/github.svg)](https://agentmods.dev/skills/hkuds/openspace/ffmpeg-graceful-degradation)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/ffmpeg-graceful-degradation"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/ffmpeg-graceful-degradation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ffmpeg-graceful-degradation

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/openspace/ffmpeg-graceful-degradation"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/ffmpeg-graceful-degradation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,552 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00021 $0.01552
Opus 5 $0.00010 $0.00776
Sonnet 5 $0.00004 $0.00310
Haiku 4.5 $0.00002 $0.00155

Measured 9d ago against content hash 164e7bb45804, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

ffmpeg-graceful-degradation scanned grade A with 1 finding 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 9d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(
benchmarks/gdpval/skills/ffmpeg-graceful-degradation/SKILL.md · 199 lines

How it starts

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

FFmpeg Graceful Degradation

When processing videos with ffmpeg, encoding failures are common due to codec availability, library version mismatches, or system configuration issues. This skill provides a systematic fallback strategy to ensure video processing completes successfully.

Overview

The pattern involves: (1) probing encoder availability upfront, (2) testing on a short clip before batch processing, (3) progressive fallback through copy mode, alternative codecs, and finally moviepy, (4) using moviepy as a reliable bundled alternative.

Step 1: Probe Encoder Availability

Before any encoding work, check what encoders are available:

ffmpeg -encoders | grep -E "libx264|libopenh264|mpeg4"

Expected output shows which encoders are present:

  • libx264 - Preferred H.264 encoder (may be missing)
  • libopenh264 - Alternative H.264 (often has library issues)
  • mpeg4 - Universal fallback (always available)

Step 2: Test Encoding on Single Short Clip

Never start batch processing without validation. Extract and test a short segment:

# Extract 5-second test clip
ffmpeg -y -i input.mp4 -ss 0 -t 5 -c copy test_clip.mp4

# Attempt encode with preferred codec
ffmpeg -y -i test_clip.mp4 -c:v libx264 -preset fast test_output.mp4

Check the exit code and output for errors. Common failures:

  • libopenh264.so: wrong ELF class
  • Encoder libx264 not found
  • Library version mismatches

Step 3: Progressive Fallback Strategy

If the preferred encoder fails, try these fallbacks in order:

Fallback A: Copy Mode (No Re-encoding)

ffmpeg -y -i input.mp4 -c:v copy -c:a copy output.mp4

Fast, lossless, but doesn't change codec/format.

Fallback B: MPEG4 Codec

ffmpeg -y -i input.mp4 -c:v mpeg4 -q:v 3 -c:a copy output.mp4

Universal compatibility, larger file sizes, always available.

Fallback C: Install MoviePy (Bundles Working FFmpeg)

pip install moviepy

Then use Python instead of raw ffmpeg:

from moviepy.editor import VideoFileClip, concatenate_videoclips

# Single clip processing
clip = VideoFileClip("input.mp4")
clip.write_videofile("output.mp4", codec="libx264")

# Concatenate multiple clips
clips = [VideoFileClip(f) for f in clip_files]
final = concatenate_videoclips(clips)
final.write_videofile("output.mp4", codec="libx264")

Read the full file on GitHub · 199 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 199 lines · 21 tokens per session scan A 164e7bb45804

Subscribe to this mod's changes

ffmpeg-graceful-degradation is a skill published in the GitHub repository HKUDS/OpenSpace (7,544 stars, last pushed 27d ago), licensed MIT. It adds 21 tokens to every session and 1,552 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). 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

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

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

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

chengfeng-check-updates

An environment manager for a video-editing system. It checks whether its skills and runtime—the software needed to run them—are installed and compatible.

Agentchengfeng/chengfeng-videocut-skills · 120 tokens

infographic-template-updater

Update template catalogs and UI prompts after adding new infographic templates (src/templates/.ts), including SKILL.md template list, site gallery template mappings, and the AIPlayground prompt list.

antvis/Infographic · 43 tokens