ffmpeg-opencv-integration

Integrate FFmpeg with OpenCV for video processing pipelines.

51|10|Updated Oct 22, 2025
One-click install
npx skills add https://github.com/JosiahSiegel/claude-plugin-marketplace --skill ffmpeg-opencv-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ffmpeg-opencv-integration
Source: https://github.com/JosiahSiegel/claude-plugin-marketplace/tree/main/plugins/ffmpeg-master/skills/ffmpeg-opencv-integration
Command: npx skills add https://github.com/JosiahSiegel/claude-plugin-marketplace --skill ffmpeg-opencv-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill bridges the gap between FFmpeg's powerful video I/O capabilities and OpenCV's extensive image processing functions, enabling complex video manipulation without common integration bugs.

Core Features & Use Cases

  • Cross-Library Integration: Effortlessly pipe frames between FFmpeg and OpenCV processes.
  • Color & Dimension Correction: Avoids common pitfalls with BGR/RGB color formats and (y,x) vs (x,y) dimensions.
  • GPU Acceleration: Leverages libraries like ffmpegcv for hardware-accelerated video decoding and encoding.
  • Advanced Libraries: Integrates with VidGear, Decord, and PyAV for optimized streaming, batch loading, and frame-level control.
  • Use Case: Process a live RTSP stream using OpenCV for object detection, then encode the output with FFmpeg, all while ensuring correct color formats and efficient frame handling.

Quick Start

Use the ffmpeg-opencv-integration skill to pipe frames from 'input.mp4' to OpenCV for edge detection and save the result to 'edges.mp4'.

Frequently Asked Questions about ffmpeg-opencv-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pipe FFmpeg video frames to OpenCV for processing without color format issues?

Piping FFmpeg frames to OpenCV requires correcting BGR/RGB color format mismatches and resolving frame dimension order issues. This integration handles both, ensuring frames are passed correctly for image processing tasks.

Can I use GPU acceleration for video decoding and encoding when integrating FFmpeg with OpenCV?

Yes, you can use GPU acceleration for video decoding and encoding by leveraging the ffmpegcv library. This optimizes the FFmpeg and OpenCV pipeline for hardware-accelerated processing, improving overall I/O throughput.

What is the best way to process a live RTSP stream using OpenCV and save the output with FFmpeg?

The best way to process a live RTSP stream with OpenCV and FFmpeg is using a pipeline that preserves audio streams and handles frame-level control. This allows real-time object detection and correct output encoding simultaneously.

Does FFmpeg work with Python video processing libraries like Decord, PyAV, and VidGear?

Yes, FFmpeg works with Python video processing libraries like Decord, PyAV, and VidGear. Integrating these tools provides optimized streaming, batch loading, and advanced frame-level control within your video pipeline.

Why does my OpenCV video output have incorrect colors or swapped dimensions after FFmpeg encoding?

Incorrect colors or swapped dimensions in OpenCV output occur due to BGR/RGB format mismatches and conflicting (x,y) versus (y,x) dimension orders. A proper FFmpeg-OpenCV integration automatically corrects these common pipeline pitfalls.

When should I use PyAV or Decord instead of standard OpenCV for video I/O?

Use PyAV or Decord instead of standard OpenCV when you need optimized batch loading, advanced frame-level control, or more efficient streaming. These libraries provide specialized I/O performance benefits for complex video processing pipelines.