用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/HKUDS/OpenSpace --skill ffmpeg-encoder-check命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Incremental audio production with duration mismatch handling, adaptive stem extension, and pre-mix alignment verification
Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow
Incremental audio production with duration alignment handling, per-stem verification, and adaptive extension strategies
基于 SOC 职业分类
正在显示 SKILL.md
| name | ffmpeg-encoder-check |
| description | Check FFmpeg encoder availability before video encoding to avoid library mismatches |
Before writing video encoding scripts, always verify which H.264 encoders are available in your FFmpeg installation. This prevents failures from library version mismatches, particularly with libopenh264.
Run the following command to check available H.264 encoders:
ffmpeg -encoders 2>/dev/null | grep h264
This shows which H.264 encoders are compiled into your FFmpeg build.
Common encoder options you may see:
| Encoder | Description | Recommendation |
|---|---|---|
libx264 | Software H.264 encoder | Preferred - widely compatible |
libopenh264 | OpenH264 software encoder | Use with caution - often has library version mismatches |
h264_nvenc | NVIDIA hardware encoder | Good if NVIDIA GPU available |
h264_videotoolbox | macOS hardware encoder | Good on macOS |
h264_vaapi | Intel VAAPI hardware encoder | Good on Linux with Intel GPU |
h264_qsv | Intel QuickSync encoder | Good on Windows/Linux with Intel GPU |
For same-resolution sources (no re-encoding needed):
# Best option - pass-through without quality loss
ffmpeg -i input.mp4 -c:v copy -c:a copy output.mp4
If libx264 is available:
# Reliable software encoding
ffmpeg -i input.mp4 -c:v libx264 -preset medium -crf 23 -c:a aac output.mp4
If only libopenh264 is available:
# Use with caution - may have library issues
ffmpeg -i input.mp4 -c:v libopenh264 -c:a aac output.mp4
Always test your encoding command on a small sample file before processing multiple videos or long footage.
-c:v copy when source and target resolutions match - no quality loss, fastest processing#!/bin/bash
# Check available encoders at startup
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 "libopenh264"; then
VIDEO_CODEC="libopenh264"
echo "Warning: Using libopenh264 (may have compatibility issues)"
else
echo "Error: No H.264 encoder available"
echo "Available encoders:"
echo "$ENCODERS"
exit 1
fi
# For same-resolution sources, prefer copy
if [ "$SOURCE_RESOLUTION" = "$TARGET_RESOLUTION" ]; then
VIDEO_CODEC="copy"
echo "Same resolution detected - using stream copy"
fi
# Encode
ffmpeg -i "$INPUT" -c:v "$VIDEO_CODEC" -c:a aac "$OUTPUT"
-c:v copy when resolution matches