VidGear is a High-Performance Video Processing Python Library

VidGear is a High-Performance Video Processing Python Library
Photo by David Clode / Unsplash

VidGear is a powerful video processing Python library that guarantees high performance. It offers a user-friendly, highly customizable, and extensively optimized multi-threaded + asyncio API framework. It takes advantage of cutting-edge specialized libraries like OpenCV, FFmpeg, ZeroMQ, picamera, starlette, yt_dlp, pyscreenshot, dxcam, aiortc, and python-mss, enabling flexible utilization of their internal parameters and methods. VidGear also ensures reliable error handling and real-time performance.

The main focus of VidGear is simplicity, empowering programmers and software developers to effortlessly integrate and execute intricate video processing tasks with just a few lines of code.


VidGear is built with multiple APIs a.k.a Gears, each with some unique functionality.

Each API is designed exclusively to handle/control/process different data-specific & device-specific video streams, network streams, and media encoders/decoders. These APIs provides the user an easy-to-use, dynamic, extensible, and exposed Multi-Threaded + Asyncio optimized internal layer above state-of-the-art libraries to work with, while silently delivering robust error-handling.

These Gears can be classified as follows:

A. Video-Capture Gears:

  • CamGear: Multi-Threaded API targeting various IP-USB-Cameras/Network-Streams/Streaming-Sites-URLs.
  • PiGear: Multi-Threaded API targeting various Raspberry-Pi Camera Modules.
  • ScreenGear: High-performance API targeting rapid Screencasting Capabilities.
  • VideoGear: Common Video-Capture API with internal Video Stabilizer wrapper.

B. Video-Writer Gears:

  • WriteGear: Handles Lossless Video-Writer for file/stream/frames Encoding and Compression.

C. Streaming Gears:

  • StreamGear: Handles Transcoding of High-Quality, Dynamic & Adaptive Streaming Formats.
  • Asynchronous I/O Streaming Gear:
    • WebGear: ASGI Video-Server that broadcasts Live MJPEG-Frames to any web-browser on the network.
    • WebGear_RTC: Real-time Asyncio WebRTC media server for streaming directly to peer clients over the network.

D. Network Gears:

  • NetGear: Handles High-Performance Video-Frames & Data Transfer between interconnecting systems over the network.
  • Asynchronous I/O Network Gear:
    • NetGear_Async: Immensely Memory-Efficient Asyncio Video-Frames Network Messaging Framework.


CamGear confidently captures high-speed frames from a wide range of file-formats/devices/streams. This includes almost any IP-USB Cameras, multimedia video file-formats (tested up to 4k), various network stream protocols such as http(s), rtp, rtsp, rtmp, mms, etc., and GStreamer's pipelines.

Additionally, it offers seamless integration with popular live video streaming sites like YouTube, Twitch, LiveStream, Dailymotion, and more.


PiGear is similar to CamGear but made to support various Raspberry Pi Camera Modules (such as OmniVision OV5647 Camera Module and Sony IMX219 Camera Module).

PiGear provides a flexible multi-threaded framework around complete picamera python library, and provide us the ability to exploit almost all of its parameters like brightness, saturation, sensor_mode, iso, exposure, etc. effortlessly. Furthermore, PiGear also supports multiple camera modules, such as in the case of Raspberry-Pi Compute Module IO boards.

Best of all, PiGear contains Threaded Internal Timer - that silently keeps active track of any frozen-threads/hardware-failures and exit safely, if any does occur. That means that if you're running PiGear API in your script and someone accidentally pulls the Camera-Module cable out, instead of going into possible kernel panic, API will exit safely to save resources.


  • Apache 2.0 License


GitHub - abhiTronix/vidgear: A High-performance cross-platform Video Processing Python framework powerpacked with unique trailblazing features :fire:
A High-performance cross-platform Video Processing Python framework powerpacked with unique trailblazing features :fire: - GitHub - abhiTronix/vidgear: A High-performance cross-platform Video Proce…

Open-source Apps


Medical Apps




Dev. Resources