josiahsiegel/claude-plugin-marketplace

ffmpeg-opencv-integration

Complete FFmpeg + OpenCV + Python integration guide for video processing pipelines.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill ffmpeg-opencv-integration

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

FFmpeg + OpenCV Integration Guide

Use this skill when FFmpeg handles video I/O and OpenCV handles image processing. This SKILL is a lean orchestrator; full pipe patterns, library examples, and Modal recipes are preserved in references/opencv-pipelines-and-libraries.md.

When to Use

  • Decode with FFmpeg and process frames with OpenCV
  • Encode OpenCV-generated/processed frames with FFmpeg
  • Compare cv2.VideoCapture, subprocess pipes, PyAV, ffmpegcv, VidGear, and Decord
  • Fix RGB/BGR color bugs or (height, width) dimension-order bugs
  • Preserve audio while replacing processed video frames
  • Build GPU-assisted video I/O around CPU OpenCV processing

Library Selection

NeedBest optionWhy
Simple local filecv2.VideoCaptureBuilt-in and simple
Full FFmpeg format/protocol supportsubprocess pipeExact CLI behavior
GPU video I/OffmpegcvNVDEC/NVENC with OpenCV-like API
Network/RTSP streamingVidGearThreaded capture and stream helpers
ML batch loadingDecordFast random/batch frame access
Frame-level libav controlPyAVDirect FFmpeg library access

Critical Gotchas

  1. OpenCV is BGR. FFmpeg/PyAV/PIL/Decord often produce RGB. Convert explicitly.
  2. NumPy dimensions are `(height, width, channels)`. Pixel access is img[y, x], not img[x, y].
  3. Video filters can drop audio. Preserve or remux original audio intentionally.
  4. Release resources. Always close VideoCapture, pipes, writers, and PyAV containers.
  5. Rawvideo pipes require exact frame size. width * height * channels must match -pix_fmt.

Minimal Pipe Patterns

FFmpeg to OpenCV using BGR frames:

python
cmd = [
    "ffmpeg", "-i", input_path,
    "-f", "rawvideo", "-pix_fmt", "bgr24", "-"
]

OpenCV to FFmpeg using BGR frames:

python
cmd = [
    "ffmpeg", "-y",
    "-f", "rawvideo", "-vcodec", "rawvideo",
    "-s", f"{width}x{height}", "-pix_fmt", "bgr24",
    "-r", str(fps), "-i", "-",
    "-c:v", "libx264", "-preset", "fast", "-crf", "23",
    "-pix_fmt", "yuv420p", output_path
]

Core Workflow

  1. Probe input dimensions, fps, duration, and audio streams.
  2. Pick the I/O library based on the selection table.
  3. Lock pixel format at boundaries (bgr24 for OpenCV pipes; yuv420p for final H.264 output).
  4. Process frames in generators/batches; avoid loading full videos unless they are small.
  5. Preserve or re-encode audio explicitly.
  6. Verify output duration, fps, resolution, codec, and A/V sync.

Reference Map

  • references/opencv-pipelines-and-libraries.md - Full preserved reference: color/dimension gotchas, cleanup patterns, FFmpeg-to-OpenCV and OpenCV-to-FFmpeg pipes, bidirectional pipeline, ffmpegcv, VidGear, Decord, PyAV, Modal.com examples, GPU pipeline, cheat sheets, sources.

Related Skills

  • ffmpeg-python-integration-reference - Type-safe parameters, colors, time units
  • ffmpeg-pyav-integration - PyAV API details
  • ffmpeg-hardware-acceleration - GPU decode/encode and filter pipelines

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
josiahsiegel
커뮤니티

tui-fundamentals

This skill should be used when the user asks to design, create, choose, modernize, or review a terminal UI, text user interface, curses app, dashboard, wizard, REPL shell, prompt flow, or CLI with interactive screens. PROACTIVELY activate for: TUI architecture, terminal-ui design, framework selection, curses vs modern framework, full-screen vs inline UI, app state modeling, widget composition, command palette, keyboard-first workflow, terminal dashboard, interactive CLI UX, and cross-platform te

설치 수
2
GitHub Stars
59
업데이트
6월 18일
josiahsiegel
커뮤니티

unity-modding

Unity game modding architecture and mod-loading systems. PROACTIVELY activate for: (1) adding modding support to a Unity game, (2) Asset Bundles for mods, (3) Addressables for mod content, (4) Lua scripting via MoonSharp, (5) Harmony patching for runtime IL injection, (6) Steam Workshop integration, (7) mod manager UI, (8) plugin architecture for user-generated content (UGC), (9) custom content loading at runtime, (10) sandboxing and security for untrusted mods. Provides: AssetBundle vs Addressa

설치 수
2
GitHub Stars
59
업데이트
6월 18일
josiahsiegel
커뮤니티

git-master

Complete Git expertise system for ALL git operations. PROACTIVELY activate for: (1) ANY Git task (basic/advanced/dangerous), (2) Repository management, (3) Branch strategies and workflows, (4) Conflict resolution, (5) History rewriting/recovery, (6) Platform-specific operations (GitHub/Azure DevOps/Bitbucket), (7) Advanced commands (rebase/cherry-pick/filter-repo). Provides: complete Git command reference, safety guardrails for destructive operations, platform best practices, workflow strategies

설치 수
2
GitHub Stars
58
업데이트
6월 18일
josiahsiegel
커뮤니티

ssdt-cicd-best-practices-2025

Modern SSDT CI/CD best practices for SQL Server database development (2025). PROACTIVELY activate for: (1) SSDT CI/CD pipeline design, (2) state-based deployment with DACPACs, (3) tSQLt unit testing integration, (4) database build validation in CI, (5) drift detection via SqlPackage Extract + Compare, (6) Azure DevOps and GitHub Actions templates for SSDT, (7) publish profile management per environment, (8) pre/post deploy scripts with idempotent MERGE, (9) DACPAC versioning and artifacts, (10)

설치 수
1
GitHub Stars
58
업데이트
6월 18일