ffmpeg-encoder-check-4855c0
What it does
This skill tells the AI to check FFmpeg's available encoders before encoding video. It is for people processing video who have seen codec or library errors.
When to use it
- ✓When I am about to write an FFmpeg script that encodes video to H.264.
- ✓When an FFmpeg encode fails because an encoder is missing or incompatible.
- ✓When the source video can be copied without re-encoding.
Skill link
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ffmpeg-encoder-check-4855c0/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Encode this video to H.264 with FFmpeg. First check which encoders this computer has, and pick one that works.”
5 new skills a week. 1 minute to read.
How it works
The AI lists the H.264 encoders, prefers a plain stream copy when the format already matches, uses libx264 when it is present, and tests a short clip before the full job.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
FFmpeg Encoder Availability Check
Purpose
Before writing any FFmpeg encoding script, always probe the system for available encoders. This prevents failures from missing or incompatible codec libraries (especially libopenh264 which frequently has version mismatches).
Core Pattern
Step 1: Probe Available Encoders
Always run this command before deciding on encoding parameters:
ffmpeg -encoders | grep h264
This shows which H.264 encoders are available on the system.
Step 2: Choose Encoder Based on Availability
Priority order for H.264 encoding:
-c:v copy- If source and target resolution/format match, copy the stream without re-encoding (fastest, no quality loss)-c:v libx264- If available, this is the most reliable and widely-compatible H.264 encoder-c:v h264- Hardware acceleration if available (varies by system)Avoid
libopenh264- This encoder frequently has library version mismatches causing runtime failures
Step 3: Verify Before Execution
After choosing an encoder, verify it works with a short test:
ffmpeg -t 5 -i input.mp4 -c:v libx264 -preset fast -crf 23 -c:a copy test_output.mp4
Example Decision Flow
#!/bin/bash
# Check available encoders
ENCODERS=$(ffmpeg -encoders 2>/dev/null | grep h264)
if echo "$ENCODERS" | grep -q "libx264"; then
VIDEO_CODEC="libx264"
echo "Using libx264 encoder"
elif echo "$ENCODERS" | grep -q "h264"; then
VIDEO_CODEC="h264"
echo "Using h264 encoder"
else
VIDEO_CODEC="copy"
echo "No H.264 encoder available, using stream copy"
fi
# Use $VIDEO_CODEC in your ffmpeg command
ffmpeg -i input.mp4 -c:v $VIDEO_CODEC output.mp4
When to Use Stream Copy
Use -c:v copy when:
- Source and target resolution are identical
- Source codec is already H.264
- You only need to change container format or audio
- Speed is critical and re-encoding is unnecessary
Common Pitfalls
- Don't assume encoder availability - Different systems have different FFmpeg builds
- Don't hardcode libopenh264 - High failure rate due to library mismatches
- Always test encoding - Run a short segment test before processing full files
- Check both video and audio codecs - Audio encoder availability matters too
FAQ
Which encoder is preferred?
The guide prefers stream copy first, then libx264, and says to avoid libopenh264.
Why test on a short clip?
A five-second test shows whether the encoder works before the full video is processed.
What is stream copy?
It copies the video without re-encoding, so there is no quality loss.
Details
Original description by the author
Check available FFmpeg encoders before writing encoding scripts to avoid library version mismatches
repo: HKUDS/AgentPilot
Popularity
- GitHub stars
- 7.8k
- Ranking position
- #12885
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
agentpilot
7.8kHelps your agent improve a project step by step by preparing a task and running the AgentPilot loop that proposes, tests and scores changes.
openspace
7.8kHelps your agent set up OpenSpace, a tool that stores and fetches agent skills, and connect it to your AI app through MCP.
rsi-arena
7.8kHelps your agent set up and run standard AI benchmark tests, such as AIME and Terminal-Bench, to compare different improvement methods.
experiment-guide
7.8kHelps your agent plan small experiments, read their results and record findings while it investigates how to improve a program.
Similar skills
taste-application
280kHelps your agent create videos in a specific style. It can copy the editing rhythm from a reference video, generate new scenes, adjust colors, and edit everything together with other footage.
taste-distillation
280kLets your agent analyze videos to create a style pack. This includes colors, cutting rhythm, and visual elements that can be reused to create new videos with the same look.
ui-demo
280kHas your agent record polished UI demo videos. Useful for creating tutorials or showing how a web app works.