Skip to content

VIDEOIO Module API Reference

Complete documentation for the VIDEOIO classes, methods, and enums in OpenCV5Sharp. Equivalent to the Official OpenCV Videoio Documentation.


📦 Classes and Structs

VideoCapture

Inherits from: DisposableOpenCVObject

Class for video capturing from video files, image sequences or cameras.

Detailed Remarks: The class provides the managed C# API for capturing video from cameras or for reading video files and image sequences. Here is how the class can be used:

Constructors

  • new VideoCapture()
    • Summary: Default constructor
  • new VideoCapture(string filename, int apiPreference)
    • Summary: This is an overloaded member function, provided for convenience. Opens a video file or a capturing device or an IP video stream for video capturing with API Preference
    • Parameter filename: it can be: - name of video file (eg. video.avi) - or image sequence (eg. img_02d.jpg, which will read samples like img_00.jpg, img_01.jpg, img_02.jpg, ...) - or URL of video stream (eg. protocol://host:port/script_name?script_params|auth) - or GStreamer pipeline string in gst-launch tool format in case if GStreamer is used as backend Note that each video stream or IP camera feed has its own URL scheme. Please refer to the documentation of source stream to know the right URL.
    • Parameter apiPreference: preferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. CAP_FFMPEG or CAP_IMAGES or CAP_DSHOW.
  • new VideoCapture(string filename, int apiPreference, IntPtr @params)
    • Summary: This is an overloaded member function, provided for convenience. Opens a video file or a capturing device or an IP video stream for video capturing with API Preference and parameters
    • Parameter filename: Path to the file.
    • Parameter apiPreference: The apiPreference parameter.
    • Parameter params: The @params parameter.
  • new VideoCapture(int index, int apiPreference)
    • Summary: This is an overloaded member function, provided for convenience. Opens a camera for video capturing
    • Parameter index: id of the video capturing device to open. To open default camera using default backend just pass 0. (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY)
    • Parameter apiPreference: preferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. CAP_DSHOW or CAP_MSMF or CAP_V4L.
  • new VideoCapture(int index, int apiPreference, IntPtr @params)
    • Summary: This is an overloaded member function, provided for convenience. Opens a camera for video capturing with API Preference and parameters
    • Parameter index: The index parameter.
    • Parameter apiPreference: The apiPreference parameter.
    • Parameter params: The @params parameter.

Methods

  • bool Open(string filename, int apiPreference)
    • Summary: Opens a video file or a capturing device or an IP video stream for video capturing. This is an overloaded member function, provided for convenience.
    • Remarks:

Parameters are same as the constructor VideoCapture(string filename, int apiPreference)

  • Parameter filename: Path to the file.
  • Parameter apiPreference: The apiPreference parameter.
  • Returns: true if the file has been successfully opened The method first calls VideoCapture.release to close the already opened file or camera.
  • bool Open(string filename, int apiPreference, IntPtr @params)
    • Summary: Opens a video file or a capturing device or an IP video stream for video capturing with API Preference and parameters This is an overloaded member function, provided for convenience.
    • Remarks:

The params parameter allows to specify extra parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ...). See VideoCaptureProperties

  • Parameter filename: Path to the file.
  • Parameter apiPreference: The apiPreference parameter.
  • Parameter params: The @params parameter.
  • Returns: true if the file has been successfully opened The method first calls VideoCapture.release to close the already opened file or camera.
  • bool Open(int index, int apiPreference)
    • Summary: Opens a camera for video capturing This is an overloaded member function, provided for convenience.
    • Remarks:

Parameters are same as the constructor VideoCapture(int index, int apiPreference = CAP_ANY)

  • Parameter index: The index parameter.
  • Parameter apiPreference: The apiPreference parameter.
  • Returns: true if the camera has been successfully opened. The method first calls VideoCapture.release to close the already opened file or camera.
  • bool Open(int index, int apiPreference, IntPtr @params)
    • Summary: Opens a camera for video capturing with API Preference and parameters This is an overloaded member function, provided for convenience.
    • Remarks:

The params parameter allows to specify extra parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ...). See VideoCaptureProperties

  • Parameter index: The index parameter.
  • Parameter apiPreference: The apiPreference parameter.
  • Parameter params: The @params parameter.
  • Returns: true if the camera has been successfully opened. The method first calls VideoCapture.release to close the already opened file or camera.
  • bool IsOpened()
    • Summary: Returns true if video capturing has been initialized already.
    • Remarks:

If the previous call to VideoCapture constructor or VideoCapture.open() succeeded, the method returns true.

  • Returns: true if video capturing has been initialized, false otherwise.
  • void Release()
    • Summary: Closes video file or capturing device.
    • Remarks:

The method is automatically called by subsequent VideoCapture.open and by VideoCapture destructor. The C function also deallocates memory and clears *capture pointer.

  • bool Grab()
    • Summary: Grabs the next frame from video file or capturing device.
    • Returns: true (non-zero) in the case of success. The method/function grabs the next frame from video file or camera and returns true (non-zero) in the case of success. The primary use of the function is in multi-camera environments, especially when the cameras do not have hardware synchronization. That is, you call VideoCapture.Grab() for each camera and after that call the slower method VideoCapture.Retrieve() to decode and get frame from each camera. This way the overhead on demosaicing or motion jpeg decompression etc. is eliminated and the retrieved frames from different cameras will be closer in time. Also, when a connected camera is multi-head (for example, a stereo camera or a Kinect device), the correct way of retrieving data from it is to call VideoCapture.Grab() first and then call VideoCapture.Retrieve() one or more times with different values of the channel parameter. tutorial_kinect_openni
  • bool Retrieve(Mat image, int flag)
    • Summary: Decodes and returns the grabbed video frame.
    • Remarks:

See also: read()

  • Parameter image: Input image.
  • Parameter flag: it could be a frame index or a driver specific flag
  • Returns: false if no frames has been grabbed The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with Mat, test it with Mat.Empty()).
  • bool Read(Mat image)
    • Summary: Grabs, decodes and returns the next video frame.
    • Parameter image: Input image.
    • Returns: false if no frames has been grabbed The method/function combines VideoCapture.Grab() and VideoCapture.Retrieve() in one call. This is the most convenient method for reading video files or capturing data from decode and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns empty image (with Mat, test it with Mat.Empty()).
  • bool Set(int propId, double value)
    • Summary: Sets a property in the VideoCapture.
    • Remarks:

.: info Note Even if it returns true this doesn't ensure that the property value has been accepted by the capture device. See note in VideoCapture.get() .:

  • Parameter propId: Property identifier from VideoCaptureProperties (eg. CAP_PROP_POS_MSEC, CAP_PROP_POS_FRAMES, ...) or one from videoio_flags_others
  • Parameter value: Value of the property.
  • Returns: true if the property is supported by backend used by the VideoCapture instance.
  • double Get(int propId)
    • Summary: Returns the specified VideoCapture property
    • Remarks:

.: info Note Reading / writing properties involves many layers. Some unexpected result might happens along this chain.

text
VideoCapture -> API Backend -> Operating System -> Device Driver -> Device Hardware

The returned value might be different from what really used by the device or it could be encoded using device dependent rules (eg. steps or percentage). Effective behaviour depends from device driver and API Backend .:

  • Parameter propId: Property identifier from VideoCaptureProperties (eg. CAP_PROP_POS_MSEC, CAP_PROP_POS_FRAMES, ...) or one from videoio_flags_others
  • Returns: Value for the specified property. Value CAP_PROP_UNKNOWN is returned when querying a property that is not supported by the backend used by the VideoCapture instance.
  • string? GetBackendName()
    • Summary: Returns used backend API name
    • Remarks:

.: info Note Stream should be opened. .:

  • Returns: The backend API name as a string, or null if the stream is not opened.

  • void SetExceptionMode(bool enable)

    • Summary: Switches exceptions mode
    • Remarks:
  • methods raise exceptions if not successful instead of returning an error code

    • Parameter enable: If true, methods raise exceptions if not successful instead of returning an error code.
  • bool GetExceptionMode()

    • Summary: Returns the current exceptions mode of the VideoCapture.
    • Returns: true if exceptions mode is enabled, false otherwise.
  • bool WaitAny(IntPtr streams, IntPtr readyIndex, long timeoutNs)

    • Summary: Wait for ready frames from VideoCapture.
    • Parameter streams: input video streams
    • Parameter readyIndex: stream indexes with grabbed frames (ready to use .retrieve() to fetch actual frame)
    • Parameter timeoutNs: number of nanoseconds (0 - infinite)
    • Returns: true if streamReady is not empty Throws: Exception Exception on stream errors (check .isOpened() to filter out malformed streams) or VideoCapture type is not supported The primary use of the function is in multi-camera environments. The method fills the ready state vector, grabs video frame, if camera is ready. After this call use VideoCapture.Retrieve() to decode and fetch frame data.

VideoWriter

Inherits from: DisposableOpenCVObject

Video writer class.

Detailed Remarks: The class provides the managed C# API for writing video files or image sequences.

Constructors

  • new VideoWriter()
    • Summary: Default constructors
  • new VideoWriter(string filename, int fourcc, double fps, Size frameSize, bool isColor)
    • Summary: This is an overloaded member function, provided for convenience.
    • Parameter filename: Name of the output video file.
    • Parameter fourcc: 4-character code of codec used to compress the frames. For example, VideoWriter.fourcc('P','I','M','1') is a MPEG-1 codec, VideoWriter.fourcc('M','J','P','G') is a motion-jpeg codec etc. List of codes can be obtained at MSDN page or with this page of the fourcc site for a more complete list). FFMPEG backend with MP4 container natively uses other values as fourcc code: see ObjectType, so you may receive a warning message from OpenCV about fourcc code conversion.
    • Parameter fps: Framerate of the created video stream.
    • Parameter frameSize: Size of the video frames.
    • Parameter isColor: If it is not zero, the encoder will expect and encode color frames, otherwise it will work with grayscale frames. @b Tips: - With some backends fourcc=-1 pops up the codec selection dialog from the system. - To save image sequence use a proper filename (eg. img_02d.jpg) and fourcc=0 OR fps=0. Use uncompressed image format (eg. img_02d.BMP) to save raw frames. - Most codecs are lossy. If you want lossless video file you need to use a lossless codecs (eg. FFMPEG FFV1, Huffman HFYU, Lagarith LAGS, etc...) - If FFMPEG is enabled, using codec=0; fps=0; you can create an uncompressed (raw) video file. - If FFMPEG is used, we allow frames of odd width or height, but in this case we truncate the rightmost column/the bottom row. Probably, this should be handled more elegantly, but some internal functions inside FFMPEG swscale require even width/height.
  • new VideoWriter(string filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor)
    • Summary: This is an overloaded member function, provided for convenience.
    • Parameter filename: Path to the file.
    • Parameter apiPreference: The apiPreference parameter.
    • Parameter fourcc: The fourcc parameter.
    • Parameter fps: The fps parameter.
    • Parameter frameSize: The frameSize parameter.
    • Parameter isColor: The isColor parameter.
  • new VideoWriter(string filename, int fourcc, double fps, Size frameSize, IntPtr @params)
    • Summary: This is an overloaded member function, provided for convenience.
    • Parameter filename: Path to the file.
    • Parameter fourcc: The fourcc parameter.
    • Parameter fps: The fps parameter.
    • Parameter frameSize: The frameSize parameter.
    • Parameter params: The @params parameter.
  • new VideoWriter(string filename, int apiPreference, int fourcc, double fps, Size frameSize, IntPtr @params)
    • Summary: This is an overloaded member function, provided for convenience.
    • Parameter filename: Path to the file.
    • Parameter apiPreference: The apiPreference parameter.
    • Parameter fourcc: The fourcc parameter.
    • Parameter fps: The fps parameter.
    • Parameter frameSize: The frameSize parameter.
    • Parameter params: The @params parameter.

Methods

  • bool Open(string filename, int fourcc, double fps, Size frameSize, bool isColor)
    • Summary: Initializes or reinitializes video writer.
    • Remarks:

The method opens video writer. Parameters are the same as in the constructor VideoWriter.VideoWriter.

  • Parameter filename: Path to the file.
  • Parameter fourcc: The fourcc parameter.
  • Parameter fps: The fps parameter.
  • Parameter frameSize: The frameSize parameter.
  • Parameter isColor: The isColor parameter.
  • Returns: true if video writer has been successfully initialized The method first calls VideoWriter.release to close the already opened file.
  • bool Open(string filename, int apiPreference, int fourcc, double fps, Size frameSize, bool isColor)
    • Summary: This is an overloaded member function, provided for convenience.
    • Parameter filename: Path to the file.
    • Parameter apiPreference: The apiPreference parameter.
    • Parameter fourcc: The fourcc parameter.
    • Parameter fps: The fps parameter.
    • Parameter frameSize: The frameSize parameter.
    • Parameter isColor: The isColor parameter.
    • Returns: true if video writer has been successfully initialized. The method first calls VideoWriter.release to close the already opened file.
  • bool Open(string filename, int fourcc, double fps, Size frameSize, IntPtr @params)
    • Summary: This is an overloaded member function, provided for convenience.
    • Parameter filename: Path to the file.
    • Parameter fourcc: The fourcc parameter.
    • Parameter fps: The fps parameter.
    • Parameter frameSize: The frameSize parameter.
    • Parameter params: The @params parameter.
    • Returns: true if video writer has been successfully initialized. The method first calls VideoWriter.release to close the already opened file.
  • bool Open(string filename, int apiPreference, int fourcc, double fps, Size frameSize, IntPtr @params)
    • Summary: This is an overloaded member function, provided for convenience.
    • Parameter filename: Path to the file.
    • Parameter apiPreference: The apiPreference parameter.
    • Parameter fourcc: The fourcc parameter.
    • Parameter fps: The fps parameter.
    • Parameter frameSize: The frameSize parameter.
    • Parameter params: The @params parameter.
    • Returns: true if video writer has been successfully initialized. The method first calls VideoWriter.release to close the already opened file.
  • bool IsOpened()
    • Summary: Returns true if video writer has been successfully initialized.
    • Returns: true if video writer has been successfully initialized, false otherwise.
  • void Release()
    • Summary: Closes the video writer.
    • Remarks:

The method is automatically called by subsequent VideoWriter.open and by the VideoWriter destructor.

  • bool Write(Mat image)
    • Summary: Writes the next video frame
    • Parameter image: The written frame. In general, color images are expected in BGR format. The function/method writes the specified image to video file. It must have the same size as has been specified when opening the video writer.
    • Returns: true if the frame was written successfully by the underlying backend, false otherwise (for example, on network errors when streaming, encoder failures, or unsupported input frames). Backends that do not surface per-frame status from their native API report true on best-effort success.
  • bool Set(int propId, double value)
    • Summary: Sets a property in the VideoWriter.
    • Parameter propId: Property identifier from VideoWriterProperties (eg. VIDEOWRITER_PROP_QUALITY) or one of videoio_flags_others
    • Parameter value: Value of the property.
    • Returns: true if the property is supported by the backend used by the VideoWriter instance.
  • double Get(int propId)
    • Summary: Returns the specified VideoWriter property
    • Parameter propId: Property identifier from VideoWriterProperties (eg. VIDEOWRITER_PROP_QUALITY) or one of videoio_flags_others
    • Returns: Value for the specified property. Value 0 is returned when querying a property that is not supported by the backend used by the VideoWriter instance.
  • int Fourcc(byte c1, byte c2, byte c3, byte c4)
    • Summary: Concatenates 4 chars to a fourcc code
    • Parameter c1: The c1 parameter.
    • Parameter c2: The c2 parameter.
    • Parameter c3: The c3 parameter.
    • Parameter c4: The c4 parameter.
    • Returns: a fourcc code This static method constructs the fourcc code of the codec to be used in the constructor VideoWriter.VideoWriter or VideoWriter.open.
  • string? GetBackendName()
    • Summary: Returns used backend API name
    • Remarks:

.: info Note Stream should be opened. .:

  • Returns: The backend API name as a string, or null if the stream is not opened.

⚙️ Static Methods (Cv2)

Cv2.VideoioRegistryGetBackendName

Signature: string? VideoioRegistryGetBackendName(VideoCaptureAPIs api)

Returns backend API name or "UnknownVideoAPI(xxx)"

Parameters:

  • api: backend ID (VideoCaptureAPIs)

Returns: The backend API name string, or "UnknownVideoAPI(xxx)" if the backend is not recognized.


Cv2.VideoioRegistryGetBackends

Signature: IntPtr VideoioRegistryGetBackends()

Returns list of all available backends

Returns: A pointer to the list of all available backend IDs.


Cv2.VideoioRegistryGetCameraBackends

Signature: IntPtr VideoioRegistryGetCameraBackends()

Returns list of available backends which works via VideoCapture(int index)

Returns: A pointer to the list of available camera backend IDs.


Cv2.VideoioRegistryGetStreamBackends

Signature: IntPtr VideoioRegistryGetStreamBackends()

Returns list of available backends which works via VideoCapture(filename)

Returns: A pointer to the list of available stream backend IDs.


Cv2.VideoioRegistryGetStreamBufferedBackends

Signature: IntPtr VideoioRegistryGetStreamBufferedBackends()

Returns list of available backends which works via VideoCapture(buffer)

Returns: A pointer to the list of available buffered-stream backend IDs.


Cv2.VideoioRegistryGetWriterBackends

Signature: IntPtr VideoioRegistryGetWriterBackends()

Returns list of available backends which works via VideoWriter()

Returns: A pointer to the list of available writer backend IDs.


Cv2.VideoioRegistryHasBackend

Signature: bool VideoioRegistryHasBackend(VideoCaptureAPIs api)

Returns true if backend is available

Parameters:

  • api: backend ID (VideoCaptureAPIs) to check availability for.

Returns: true if the specified backend is available, false otherwise.


Cv2.VideoioRegistryIsBackendBuiltIn

Signature: bool VideoioRegistryIsBackendBuiltIn(VideoCaptureAPIs api)

Returns true if backend is built in (false if backend is used as plugin)

Parameters:

  • api: backend ID (VideoCaptureAPIs) to check.

Returns: true if the backend is built in, false if it is used as a plugin.


Cv2.VideoioRegistryGetCameraBackendPluginVersion

Signature: string? VideoioRegistryGetCameraBackendPluginVersion(VideoCaptureAPIs api, int version_ABI, int version_API)

Returns description and ABI/API version of videoio plugin's camera interface

Parameters:

  • api: backend ID (VideoCaptureAPIs) to query.
  • version_ABI: output ABI version of the plugin's camera interface.
  • version_API: output API version of the plugin's camera interface.

Returns: The description string of the plugin's camera interface, or null if unavailable.


Cv2.VideoioRegistryGetStreamBackendPluginVersion

Signature: string? VideoioRegistryGetStreamBackendPluginVersion(VideoCaptureAPIs api, int version_ABI, int version_API)

Returns description and ABI/API version of videoio plugin's stream capture interface

Parameters:

  • api: backend ID (VideoCaptureAPIs) to query.
  • version_ABI: output ABI version of the plugin's stream capture interface.
  • version_API: output API version of the plugin's stream capture interface.

Returns: The description string of the plugin's stream capture interface, or null if unavailable.


Cv2.VideoioRegistryGetStreamBufferedBackendPluginVersion

Signature: string? VideoioRegistryGetStreamBufferedBackendPluginVersion(VideoCaptureAPIs api, int version_ABI, int version_API)

Returns description and ABI/API version of videoio plugin's buffer capture interface

Parameters:

  • api: backend ID (VideoCaptureAPIs) to query.
  • version_ABI: output ABI version of the plugin's buffer capture interface.
  • version_API: output API version of the plugin's buffer capture interface.

Returns: The description string of the plugin's buffer capture interface, or null if unavailable.


Cv2.VideoioRegistryGetWriterBackendPluginVersion

Signature: string? VideoioRegistryGetWriterBackendPluginVersion(VideoCaptureAPIs api, int version_ABI, int version_API)

Returns description and ABI/API version of videoio plugin's writer interface

Parameters:

  • api: backend ID (VideoCaptureAPIs) to query.
  • version_ABI: output ABI version of the plugin's writer interface.
  • version_API: output API version of the plugin's writer interface.

Returns: The description string of the plugin's writer interface, or null if unavailable.


🔢 Enumerations

UnnamedEnum0

Specifies pixel format options for video I/O operations.

MemberValueDescription
Gray0Grayscale pixel format
Rgba1RGBA (Red, Green, Blue, Alpha) pixel format
Bgr2BGR (Blue, Green, Red) pixel format
Yuv444p3YUV 4:4:4 planar pixel format

Codecs

Specifies available video codec identifiers.

MemberValueDescription
Mjpeg0Motion JPEG codec

StreamType

Specifies stream type identifiers for video I/O operations.

MemberValueDescription
Db0Data buffer stream
Dc1Data capture stream
Pc2Processed capture stream
Wb3Write buffer stream

VideoAccelerationType

Specifies hardware video acceleration types for decoding and encoding.

MemberValueDescription
None0No hardware acceleration
Any1Use any available hardware acceleration
D3d112DirectX 11 hardware acceleration
Vaapi3VA-API (Video Acceleration API, Linux)
Mfx4Intel Media SDK / oneVPL (MFX) acceleration
Drm5DRM (Direct Rendering Manager) acceleration

VideoCaptureAPIs

Specifies video capture backend API identifiers.

MemberValueDescription
Any0Auto-detect backend
V4l200Video4Linux backend
V4l2unchecked((int)(V4l))Video4Linux2 backend (alias for V4l)
Firewire300IEEE 1394 / FireWire backend
Firewareunchecked((int)(Firewire))Alias for Firewire
Ieee1394unchecked((int)(Firewire))Alias for Firewire (IEEE 1394)
Dc1394unchecked((int)(Firewire))Alias for Firewire (libdc1394)
Cmu1394unchecked((int)(Firewire))Alias for Firewire (CMU1394)
Dshow700DirectShow backend (Windows)
Pvapi800PvAPI / Prosilica GigE SDK backend
Android1000Android native camera backend
Xiapi1100XIMEA Camera API backend
Avfoundation1200AVFoundation backend (macOS/iOS)
Msmf1400Microsoft Media Foundation backend (Windows)
Winrt1410WinRT / Microsoft Windows Runtime backend
Intelperc1500Intel Perceptual Computing SDK backend
Realsense1500Intel RealSense backend (same value as Intelperc)
Openni21600OpenNI2 backend for depth sensors
Openni2Asus1610OpenNI2 backend for ASUS Xtion sensors
Openni2Astra1620OpenNI2 backend for Orbbec Astra sensors
Gphoto21700gPhoto2 backend for digital cameras
Gstreamer1800GStreamer multimedia framework backend
Ffmpeg1900FFmpeg backend
Images2000Image sequence backend (e.g. img_%02d.jpg)
Aravis2100Aravis GigE Vision SDK backend
OpencvMjpeg2200OpenCV built-in Motion JPEG codec
IntelMfx2300Intel Media SDK / oneVPL backend
Xine2400Xine multimedia library backend
Ueye2500IDS uEye camera SDK backend
Obsensor2600Orbbec depth/RGB sensor backend

VideoCaptureOBSensorDataType

Specifies data types for OBSensor (Orbbec) video capture devices.

MemberValueDescription
DepthMap0Depth map data from the sensor
BgrImage1BGR color image from the sensor
IrImage2Infrared image from the sensor

VideoCaptureOBSensorGenerators

Specifies stream generator flags for OBSensor (Orbbec) video capture devices.

MemberValueDescription
DepthGeneratorunchecked((int)(1 << 29))Depth stream generator flag
ImageGeneratorunchecked((int)(1 << 28))Color image stream generator flag
IrGeneratorunchecked((int)(1 << 27))Infrared stream generator flag
GeneratorsMaskunchecked((int)(DepthGenerator + ImageGenerator + IrGenerator))Combined bitmask of all generator flags

VideoCaptureOBSensorProperties

Wrapper for OpenCV's native functionality.

MemberValueDescription
IntrinsicFx26001Camera intrinsic focal length in X
IntrinsicFy26002Camera intrinsic focal length in Y
IntrinsicCx26003Camera intrinsic principal point X
IntrinsicCy26004Camera intrinsic principal point Y
RgbPosMsec26005RGB stream position in milliseconds
DepthPosMsec26006Depth stream position in milliseconds
DepthWidth26007Width of the depth frame
DepthHeight26008Height of the depth frame
DepthFps26009Framerate of the depth stream
ColorDistortionK126010Color lens radial distortion coefficient k1
ColorDistortionK226011Color lens radial distortion coefficient k2
ColorDistortionK326012Color lens radial distortion coefficient k3
ColorDistortionK426013Color lens radial distortion coefficient k4
ColorDistortionK526014Color lens radial distortion coefficient k5
ColorDistortionK626015Color lens radial distortion coefficient k6
ColorDistortionP126016Color lens tangential distortion coefficient p1
ColorDistortionP226017Color lens tangential distortion coefficient p2

VideoCaptureProperties

Wrapper for OpenCV's native functionality.

MemberValueDescription
Unknown-1Unknown / unsupported property
PosMsec0Current position in milliseconds
PosFrames10-based index of the next frame to decode/capture
PosAviRatio2Relative position (0 = start, 1 = end)
FrameWidth3Width of the video frames
FrameHeight4Height of the video frames
Fps5Frame rate (frames per second)
Fourcc64-character codec code
FrameCount7Total number of frames in the video
Format8Format of the Mat returned by retrieve()
Mode9Backend-specific mode value
Brightness10Brightness of the image (camera only)
Contrast11Contrast of the image (camera only)
Saturation12Saturation of the image (camera only)
Hue13Hue of the image (camera only)
Gain14Gain of the image (camera only)
Exposure15Exposure setting (camera only)
ConvertRgb16Whether images are converted to RGB
WhiteBalanceBlueU17White balance blue-U component
Rectification18Rectification flag for stereo cameras
Monochrome19Monochrome capture mode
Sharpness20Sharpness of the image (camera only)
AutoExposure21Auto-exposure mode (camera only)
Gamma22Gamma correction
Temperature23Color temperature
Trigger24Trigger mode (camera only)
TriggerDelay25Trigger delay (camera only)
WhiteBalanceRedV26White balance red-V component
Zoom27Camera zoom level
Focus28Camera focus setting
Guid29GUID of the camera device
IsoSpeed30ISO speed (camera only)
Backlight32Backlight compensation
Pan33Camera pan position
Tilt34Camera tilt position
Roll35Camera roll position
Iris36Camera iris setting
Settings37Pop up camera/video settings dialog
Buffersize38Internal buffer size
Autofocus39Autofocus mode (camera only)
SarNum40Sample aspect ratio numerator
SarDen41Sample aspect ratio denominator
Backend42Current backend identifier
Channel43Video input / channel number
AutoWb44Auto white balance
WbTemperature45White balance color temperature
CodecPixelFormat46Codec pixel format (fourcc code)
Bitrate47Video bitrate in kbits/s
OrientationMeta48Orientation metadata from the file
OrientationAuto49Auto-rotate frames based on metadata
HwAcceleration50Hardware acceleration type (see VideoAccelerationType)
HwDevice51Hardware device index for acceleration
HwAccelerationUseOpencl52Use OpenCL for hardware acceleration
OpenTimeoutMsec53Open timeout in milliseconds
ReadTimeoutMsec54Read timeout in milliseconds
StreamOpenTimeUsec55Time to open the stream in microseconds
VideoTotalChannels56Total number of video channels
VideoStream57Index of the selected video stream
AudioStream58Index of the selected audio stream
AudioPos59Current audio position
AudioShiftNsec60Audio shift in nanoseconds
AudioDataDepth61Audio data bit depth
AudioSamplesPerSecond62Audio sample rate (samples/second)
AudioBaseIndex63Base index of audio streams
AudioTotalChannels64Total number of audio channels
AudioTotalStreams65Total number of audio streams
AudioSynchronize66Enable audio-video synchronization
LrfHasKeyFrame67Whether the last read frame has a key frame
CodecExtradataIndex68Index for codec extradata
FrameType69Type of the current frame (I, P, B, etc.)
NThreads70Number of threads for decoding
Pts71Presentation timestamp of the current frame
DtsDelay72DTS (Decode Timestamp) delay
ImageSeqStart73Start index for image sequence

VideoWriterProperties

Wrapper for OpenCV's native functionality.

MemberValueDescription
Unknown-1Unknown / unsupported property
Quality1Quality setting (0–100) for JPEG-based codecs
Framebytes2Size of the encoded frame in bytes (read-only)
Nstripes3Number of stripes for parallel encoding
IsColor4Whether the output is a color video
Depth5Depth (bit depth) of the output frames
HwAcceleration6Hardware acceleration type (see VideoAccelerationType)
HwDevice7Hardware device index for acceleration
HwAccelerationUseOpencl8Use OpenCL for hardware acceleration
RawVideo9Write raw video without compression
KeyInterval10Interval between key frames
KeyFlag11Flag indicating whether current frame is a key frame
Pts12Presentation timestamp of the current frame
DtsDelay13DTS (Decode Timestamp) delay
ColorSpace14Output color space
EnableAlpha15Enable alpha channel in the output

Released under the Apache 2.0 and LGPL 2.1 Licenses.