ffmpeg-python-integration-reference
БесплатноБез исполняемых скриптовНе проверенAuthoritative Python-FFmpeg parameter integration reference ensuring type safety, accurate parameter mappings, and proper unit conversions. PROACTIVELY…
от JosiahSiegel★ 67 звёзд на GitHubОб этом скилле
Python-FFmpeg Integration Reference
Use this skill when Python code is constructing FFmpeg commands, filters, ASS subtitles, or raw-frame pipes and the risk is a type, unit, color, or stream-mapping bug. This SKILL is a lean orchestrator; detailed tables and full code examples live in references/python-ffmpeg-reference.md.
When to Use
ffmpeg-pythonstream graphs and filter arguments- Python
subprocesscalls to FFmpeg drawtext, ASS/SSA, karaoke, and animated caption parameter mapping- RGB/BGR/ASS color conversion bugs
- Seconds vs centiseconds vs milliseconds confusion
- Raw frame pipe I/O with NumPy/OpenCV
- Range/type validation before command execution
Critical Rules
- Validate types before passing parameters.
fontsizeandcrfare integers; bitrates are strings with units such as5Mor192k; FFmpeg expressions are strings. - Quote FFmpeg expressions in Python. Use
x="(w-tw)/2", not Python variables namedwortw. - Handle audio explicitly. In
ffmpeg-python, a video filter chain usually drops audio unless you mapinput_file.audiointo the output. - Know the color context. FFmpeg drawtext colors are RGB/named strings; OpenCV arrays are BGR; ASS colors are
&HAABBGGRR. - Know the time context. FFmpeg filters use seconds; ASS karaoke tags use centiseconds; ASS animation tags use milliseconds.
Quick Reference
| FFmpeg / ASS parameter | Python type | Format / range | Common failure |
|---|---|---|---|
-crf |
int or str |
H.264/H.265 0-51 |
passing 18.5 |
-b:v, -b:a |
str |
5M, 1000k, 192k |
raw integer without unit |
fontsize |
int |
practical 12-200 |
passing '24' |
fontcolor |
str |
white, #FFFFFF, 0xFFFFFF |
RGB tuple/list |
| ASS colour | str |
&HAABBGGRR |
using RGB byte order |
x, y, alpha, enable |
str for expressions |
'(w-tw)/2, between(t,1,5) |
unquoted expression |
Core Workflow
- Probe the input or metadata source so you know width, height, fps, duration, and stream availability.
- Choose the integration layer:
ffmpeg-pythonfor command graphs,subprocessfor full CLI parity and pipes, PyAV for frame-level library access. - Normalize color and time units at the Python boundary.
- Validate parameters and ranges before building a command.
- Map audio/subtitle streams intentionally.
- Run on a short sample first; capture stderr for actionable FFmpeg errors.
Reference Map
references/python-ffmpeg-reference.md- Full preserved reference: color conversion functions, ASS style structures, karaoke/animation helpers, drawtext parameter tables,ffmpeg-pythonexamples, subprocess pipe patterns, pitfalls, validation helpers, full working examples.
Related Skills
ffmpeg-opencv-integration- OpenCV/NumPy frame pipelines and BGR/RGB handoffffmpeg-pyav-integration- PyAV frame-level API patternsffmpeg-captions-subtitles- Subtitle extraction, burn-in, and stylingffmpeg-animation-timing-reference- Timing units, readability, easing, and sync
Установить ffmpeg-python-integration-reference в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ffmpeg-python-integration-reference?
Authoritative Python-FFmpeg parameter integration reference ensuring type safety, accurate parameter mappings, and proper unit conversions. PROACTIVELY activate for: (1) ffmpeg-python library usage, (2) Python subprocess FFmpeg calls, (3) Caption/subtitle parameter mapping (drawtext, ASS), (4) Color format conversions (BGR, RGB, ABGR, ASS &HAABBGGRR), (5) Time unit conversions (seconds, centiseconds, milliseconds), (6) Type safety validation (int, float, string), (7) Coordinate systems, (8) Parameter range enforcement, (9) Frame pipe handling, (10) Error detection for type mismatches. Provides: Complete parameter type reference, color format conversion tables, time unit conversion formulas, validation patterns, working Python examples with proper typing.
Как установить скилл ffmpeg-python-integration-reference?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ffmpeg-python-integration-reference запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic