Skip to content

VideoGear FAQs

What is VideoGear API and what does it do?

Answer: VideoGear provides a special internal wrapper around VidGear's exclusive Video Stabilizer class. It also acts as a Common Video-Capture API that provides unified internal access to CamGear, PiGear, and FFGear APIs and their parameters, selectable via the api parameter using the Backend enum. For more info. see VideoGear doc âž¶

What's the need of VideoGear API?

Answer: VideoGear is basically ideal when you need to switch between different video-capture backends without changing your code much. Also, it enables easy stabilization for various video-streams (real-time or not) with minimum effort and using way fewer lines of code. It also serves as backend for other powerful APIs, such as WebGear and NetGear_Async.

Which APIs are accessible with VideoGear API?

Answer: VideoGear provides internal access to CamGear, PiGear, and FFGear APIs and their parameters via the Backend enum (Backend.CAMGEAR, Backend.PIGEAR, Backend.FFGEAR). It also contains a wrapper around the Video Stabilizer class.

How do I select a specific backend in VideoGear?

Answer: Use the api parameter with the Backend enum:

from vidgear.gears import VideoGear
from vidgear.gears.helper import Backend

stream = VideoGear(api=Backend.CAMGEAR, source=0).start()   # CamGear (default)
stream = VideoGear(api=Backend.PIGEAR).start()              # PiGear
stream = VideoGear(api=Backend.FFGEAR, source="myvideo.mp4").start()  # FFGear

The old enablePiCamera boolean flag is deprecated — use api=Backend.PIGEAR instead.

Can we access WriteGear API or NetGear API too with VideoGear?

Answer: No, only selected VideoCapture APIs (answered above) are accessible.

Does using VideoGear instead of CamGear API directly, affects performance?

Answer: No, there's no difference, as VideoGear is just a high-level wrapper around CamGear API and without any modifications in-between.

When should I use FFGear backend instead of CamGear?

Answer: Use Backend.FFGEAR when you need hardware-accelerated decoding (CUDA/CUVID, VAAPI, VideoToolbox), complex FFmpeg filtergraph pipelines (-vf, -filter_complex), per-frame metadata extraction, or specific pixel formats (e.g. yuv420p, gray). CamGear via OpenCV is simpler and sufficient for most standard use cases.