Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

ffmpeg-pyav-integration

verified

Complete PyAV (Python FFmpeg bindings) integration guide. PROACTIVELY activate for: (1) PyAV installation on Ubuntu/Windows/macOS, (2) Building PyAV against custom FFmpeg, (3) FFmpeg 7.0/8.0+ compatibility, (4) av.open() video/audio decoding, (5) VideoFrame/AudioFrame NumPy conversion, (6) Filter graph processing, (7) Video encoding with H.264/H.265/AV1, (8) Seeking and keyframe extraction, (9) RTSP/network streaming with PyAV, (10) Memory management and thread safety, (11) Error handling with FFmpegError, (12) Subtitle extraction, (13) Container manipulation and remuxing, (14) Performance optimization and threading. Provides: Complete PyAV API patterns, installation guides for all Ubuntu versions, FFmpeg 8.0+ compatibility matrix, type-safe examples, memory management best practices, filter graph examples, encoding/decoding patterns.

View on GitHub

Marketplace

claude-plugin-marketplace

JosiahSiegel/claude-plugin-marketplace

Plugin

ffmpeg-master

Repository

JosiahSiegel/claude-plugin-marketplace
10stars

plugins/ffmpeg-master/skills/ffmpeg-pyav-integration/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/JosiahSiegel/claude-plugin-marketplace/blob/main/plugins/ffmpeg-master/skills/ffmpeg-pyav-integration/SKILL.md -a claude-code --skill ffmpeg-pyav-integration

Installation paths:

Claude
.claude/skills/ffmpeg-pyav-integration/
Powered by add-skill CLI

Instructions

# PyAV Integration Guide (2025-2026)

Complete reference for PyAV - Pythonic bindings for FFmpeg's libraries.

## Quick Reference

| Task | PyAV Method | Notes |
|------|-------------|-------|
| Open video | `av.open('video.mp4')` | Returns Container |
| Decode frames | `container.decode(video=0)` | Yields VideoFrame |
| Frame to NumPy | `frame.to_ndarray(format='rgb24')` | RGB by default |
| NumPy to Frame | `av.VideoFrame.from_ndarray(arr, format='rgb24')` | For encoding |
| Seek | `container.seek(offset)` | Keyframe-based |
| Encode | `stream.encode(frame)` | Returns packets |
| Close | `container.close()` | ALWAYS do this |

| Version | FFmpeg Requirement | Python Requirement |
|---------|-------------------|-------------------|
| PyAV 16.1.0 (Latest) | FFmpeg 7.0+ | Python 3.10+ |
| PyAV 14.x | FFmpeg 7.0+ | Python 3.9+ |
| PyAV 12.x | FFmpeg 5.0+ | Python 3.8+ |
| PyAV 8.x-10.x | FFmpeg 4.0+ | Python 3.7+ |

---

## What is PyAV?

PyAV provides **Pythonic bindings for FFmpeg's libraries** (libavcodec, libavformat, libavfilter, etc.), offering direct access to:

- **Containers**: Media file handling (MP4, MKV, WebM, etc.)
- **Streams**: Audio, video, and subtitle tracks
- **Packets**: Compressed data units
- **Frames**: Decoded video/audio data
- **Codecs**: Encoding/decoding capabilities
- **Filters**: FFmpeg filter graph access

**Key Features:**
- Direct NumPy/Pillow integration for frame data
- Frame-level precision for seeking and manipulation
- Full codec and filter access
- Lower-level control than ffmpeg-python subprocess

**When to Use PyAV vs FFmpeg CLI:**
- Use **PyAV** when you need programmatic frame-level access
- Use **FFmpeg CLI** for simple transcoding tasks
- PyAV adds complexity - only use when CLI cannot solve your problem

---

## Installation

### Quick Install (Recommended)

Binary wheels include FFmpeg libraries - no separate FFmpeg installation needed:

```bash
pip install av
```

Or with Conda:

```bash
conda install av -c conda-forge

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
31051 chars