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

ffmpeg-encoder-check

하는 일

이 스킬은 시스템의 H.264 인코더를 나열하고, 컴퓨터에 맞는 가장 좋은 인코더를 고르는 방법을 보여 줍니다. 코덱 문제를 피하고 싶은 비디오 인코딩 사용자에게 맞습니다.

사용하는 경우

  • ✓FFmpeg으로 비디오를 변환하거나 인코딩해야 할 때.
  • ✓라이브러리 버전 불일치로 비디오 작업이 실패할 때.
  • ✓원본 비디오가 이미 원하는 형식이라 다시 인코딩할 필요가 없는 경우.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ffmpeg-encoder-check/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/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는 시스템의 인코더를 나열하고 옵션 표와 비교한 뒤, 스트림 복사, libx264, 하드웨어 인코더 또는 사용 가능한 다른 선택지 중 하나를 고릅니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

FFmpeg Encoder Availability Check

Purpose

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.

Instructions

Step 1: Probe Available Encoders

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.

Step 2: Interpret Results

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

Step 3: Choose Encoding Strategy

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

Step 4: Validate Before Batch Processing

Always test your encoding command on a small sample file before processing multiple videos or long footage.

Best Practices

  1. Default to -c:v copy when source and target resolutions match - no quality loss, fastest processing
  2. Prefer libx264 over libopenh264 for software encoding - more stable, better compatibility
  3. Check encoder availability at script startup, not during execution - fail fast with clear error
  4. Cache encoder check results if running multiple encoding operations in the same session
  5. Provide fallback options in automated scripts - try copy first, then libx264, then fail gracefully

Example Script Template

#!/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"

Common Errors to Avoid

  • Do not assume libx264 is available - FFmpeg builds vary by system
  • Do not use libopenh264 without checking - frequent library version mismatch errors
  • Do not re-encode unnecessarily - use -c:v copy when resolution matches
  • Do not skip the encoder check - always probe before writing encoding logic
자주 묻는 질문

가장 널리 호환되는 인코더는 무엇인가요?

가이드는 libx264가 우선이며 호환성이 넓다고 말합니다.

하드웨어 인코더는 무엇에 따라 달라지나요?

NVIDIA, Apple, Intel 칩 같은 컴퓨터의 그래픽 하드웨어에 따라 달라집니다.

libopenh264를 피하는 이유는 무엇인가요?

가이드는 이 인코더에 라이브러리 버전 불일치가 자주 있다고 설명합니다.

상세 정보

작성자의 원본 설명

Check FFmpeg encoder availability before video encoding to avoid library mismatches

repo: HKUDS/AgentPilot

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬