본문으로 건너뛰기
Skillpedia
영상 편집7.8k · #12885

ffmpeg-encoder-check-4855c0

하는 일

이 스킬은 비디오를 인코딩하기 전에 FFmpeg에서 사용 가능한 인코더를 확인하도록 AI에게 안내합니다. 코덱이나 라이브러리 오류를 본 적이 있는 비디오 작업자에게 맞습니다.

사용하는 경우

  • ✓FFmpeg 스크립트로 비디오를 H.264로 인코딩하려고 할 때.
  • ✓인코더가 없거나 호환되지 않아 FFmpeg 인코딩이 실패하는 경우.
  • ✓원본 비디오를 다시 인코딩하지 않고 그대로 복사할 수 있을 때.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ffmpeg-encoder-check-4855c0/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ffmpeg-encoder-check-4855c0/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 비디오를 FFmpeg으로 H.264로 인코딩해 주세요. 먼저 이 컴퓨터에 어떤 인코더가 있는지 확인하고 작동하는 것을 골라 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 H.264 인코더를 나열하고, 형식이 이미 맞으면 단순 스트림 복사를 우선하며, libx264가 있으면 사용하고, 전체 작업 전에 짧은 클립으로 테스트합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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:

  1. -c:v copy - If source and target resolution/format match, copy the stream without re-encoding (fastest, no quality loss)

  2. -c:v libx264 - If available, this is the most reliable and widely-compatible H.264 encoder

  3. -c:v h264 - Hardware acceleration if available (varies by system)

  4. 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
자주 묻는 질문

어떤 인코더를 우선하나요?

가이드는 스트림 복사를 먼저, 그다음 libx264를 우선하고 libopenh264는 피하라고 안내합니다.

짧은 클립으로 테스트하는 이유는 무엇인가요?

5초짜리 테스트로 전체 비디오를 처리하기 전에 인코더가 작동하는지 알 수 있습니다.

스트림 복사는 무엇인가요?

비디오를 다시 인코딩하지 않고 복사하므로 화질이 떨어지지 않습니다.

상세 정보

작성자의 원본 설명

Check available FFmpeg encoders before writing encoding scripts to avoid library version mismatches

repo: HKUDS/AgentPilot

인기도

GitHub 스타
7.8k
순위
#12885
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬