OpenCV
4.10.0
Open Source Computer Vision
|
enum cv::VideoCaptureAPIs |
#include <opencv2/videoio.hpp>
cv::VideoCapture API backends identifier.
Select preferred API for a capture object. To be used in the VideoCapture::VideoCapture() constructor or VideoCapture::open()
#include <opencv2/videoio.hpp>
cv::VideoCapture generic properties identifier.
Reading / writing properties involves many layers. Some unexpected result might happens along this chain. Effective behaviour depends from device hardware, driver and API Backend.
Enumerator | |
---|---|
CAP_PROP_POS_MSEC Python: cv.CAP_PROP_POS_MSEC | Current position of the video file in milliseconds. |
CAP_PROP_POS_FRAMES Python: cv.CAP_PROP_POS_FRAMES | 0-based index of the frame to be decoded/captured next. When the index i is set in RAW mode (CAP_PROP_FORMAT == -1) this will seek to the key frame k, where k <= i. |
CAP_PROP_POS_AVI_RATIO Python: cv.CAP_PROP_POS_AVI_RATIO | Relative position of the video file: 0=start of the film, 1=end of the film. |
CAP_PROP_FRAME_WIDTH Python: cv.CAP_PROP_FRAME_WIDTH | Width of the frames in the video stream. |
CAP_PROP_FRAME_HEIGHT Python: cv.CAP_PROP_FRAME_HEIGHT | Height of the frames in the video stream. |
CAP_PROP_FPS Python: cv.CAP_PROP_FPS | Frame rate. |
CAP_PROP_FOURCC Python: cv.CAP_PROP_FOURCC | 4-character code of codec. see VideoWriter::fourcc . |
CAP_PROP_FRAME_COUNT Python: cv.CAP_PROP_FRAME_COUNT | Number of frames in the video file. |
CAP_PROP_FORMAT Python: cv.CAP_PROP_FORMAT | Format of the Mat objects (see Mat::type()) returned by VideoCapture::retrieve(). Set value -1 to fetch undecoded RAW video streams (as Mat 8UC1). |
CAP_PROP_MODE Python: cv.CAP_PROP_MODE | Backend-specific value indicating the current capture mode. |
CAP_PROP_BRIGHTNESS Python: cv.CAP_PROP_BRIGHTNESS | Brightness of the image (only for those cameras that support). |
CAP_PROP_CONTRAST Python: cv.CAP_PROP_CONTRAST | Contrast of the image (only for cameras). |
CAP_PROP_SATURATION Python: cv.CAP_PROP_SATURATION | Saturation of the image (only for cameras). |
CAP_PROP_HUE Python: cv.CAP_PROP_HUE | Hue of the image (only for cameras). |
CAP_PROP_GAIN Python: cv.CAP_PROP_GAIN | Gain of the image (only for those cameras that support). |
CAP_PROP_EXPOSURE Python: cv.CAP_PROP_EXPOSURE | Exposure (only for those cameras that support). |
CAP_PROP_CONVERT_RGB Python: cv.CAP_PROP_CONVERT_RGB | Boolean flags indicating whether images should be converted to RGB. |
CAP_PROP_WHITE_BALANCE_BLUE_U Python: cv.CAP_PROP_WHITE_BALANCE_BLUE_U | Currently unsupported. |
CAP_PROP_RECTIFICATION Python: cv.CAP_PROP_RECTIFICATION | Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently). |
CAP_PROP_MONOCHROME Python: cv.CAP_PROP_MONOCHROME | |
CAP_PROP_SHARPNESS Python: cv.CAP_PROP_SHARPNESS | |
CAP_PROP_AUTO_EXPOSURE Python: cv.CAP_PROP_AUTO_EXPOSURE | DC1394: exposure control done by camera, user can adjust reference level using this feature. |
CAP_PROP_GAMMA Python: cv.CAP_PROP_GAMMA | |
CAP_PROP_TEMPERATURE Python: cv.CAP_PROP_TEMPERATURE | |
CAP_PROP_TRIGGER Python: cv.CAP_PROP_TRIGGER | |
CAP_PROP_TRIGGER_DELAY Python: cv.CAP_PROP_TRIGGER_DELAY | |
CAP_PROP_WHITE_BALANCE_RED_V Python: cv.CAP_PROP_WHITE_BALANCE_RED_V | |
CAP_PROP_ZOOM Python: cv.CAP_PROP_ZOOM | |
CAP_PROP_FOCUS Python: cv.CAP_PROP_FOCUS | |
CAP_PROP_GUID Python: cv.CAP_PROP_GUID | |
CAP_PROP_ISO_SPEED Python: cv.CAP_PROP_ISO_SPEED | |
CAP_PROP_BACKLIGHT Python: cv.CAP_PROP_BACKLIGHT | |
CAP_PROP_PAN Python: cv.CAP_PROP_PAN | |
CAP_PROP_TILT Python: cv.CAP_PROP_TILT | |
CAP_PROP_ROLL Python: cv.CAP_PROP_ROLL | |
CAP_PROP_IRIS Python: cv.CAP_PROP_IRIS | |
CAP_PROP_SETTINGS Python: cv.CAP_PROP_SETTINGS | Pop up video/camera filter dialog (note: only supported by DSHOW backend currently. The property value is ignored) |
CAP_PROP_BUFFERSIZE Python: cv.CAP_PROP_BUFFERSIZE | |
CAP_PROP_AUTOFOCUS Python: cv.CAP_PROP_AUTOFOCUS | |
CAP_PROP_SAR_NUM Python: cv.CAP_PROP_SAR_NUM | Sample aspect ratio: num/den (num) |
CAP_PROP_SAR_DEN Python: cv.CAP_PROP_SAR_DEN | Sample aspect ratio: num/den (den) |
CAP_PROP_BACKEND Python: cv.CAP_PROP_BACKEND | Current backend (enum VideoCaptureAPIs). Read-only property. |
CAP_PROP_CHANNEL Python: cv.CAP_PROP_CHANNEL | Video input or Channel Number (only for those cameras that support) |
CAP_PROP_AUTO_WB Python: cv.CAP_PROP_AUTO_WB | enable/ disable auto white-balance |
CAP_PROP_WB_TEMPERATURE Python: cv.CAP_PROP_WB_TEMPERATURE | white-balance color temperature |
CAP_PROP_CODEC_PIXEL_FORMAT Python: cv.CAP_PROP_CODEC_PIXEL_FORMAT | (read-only) codec's pixel format. 4-character code - see VideoWriter::fourcc . Subset of AV_PIX_FMT_* or -1 if unknown |
CAP_PROP_BITRATE Python: cv.CAP_PROP_BITRATE | (read-only) Video bitrate in kbits/s |
CAP_PROP_ORIENTATION_META Python: cv.CAP_PROP_ORIENTATION_META | (read-only) Frame rotation defined by stream meta (applicable for FFmpeg and AVFoundation back-ends only) |
CAP_PROP_ORIENTATION_AUTO Python: cv.CAP_PROP_ORIENTATION_AUTO | if true - rotates output frames of CvCapture considering video file's metadata (applicable for FFmpeg and AVFoundation back-ends only) (https://github.com/opencv/opencv/issues/15499) |
CAP_PROP_HW_ACCELERATION Python: cv.CAP_PROP_HW_ACCELERATION | (open-only) Hardware acceleration type (see VideoAccelerationType). Setting supported only via |
CAP_PROP_HW_DEVICE Python: cv.CAP_PROP_HW_DEVICE | (open-only) Hardware device index (select GPU if multiple available). Device enumeration is acceleration type specific. |
CAP_PROP_HW_ACCELERATION_USE_OPENCL Python: cv.CAP_PROP_HW_ACCELERATION_USE_OPENCL | (open-only) If non-zero, create new OpenCL context and bind it to current thread. The OpenCL context created with Video Acceleration context attached it (if not attached yet) for optimized GPU data copy between HW accelerated decoder and cv::UMat. |
CAP_PROP_OPEN_TIMEOUT_MSEC Python: cv.CAP_PROP_OPEN_TIMEOUT_MSEC | (open-only) timeout in milliseconds for opening a video capture (applicable for FFmpeg and GStreamer back-ends only) |
CAP_PROP_READ_TIMEOUT_MSEC Python: cv.CAP_PROP_READ_TIMEOUT_MSEC | (open-only) timeout in milliseconds for reading from a video capture (applicable for FFmpeg and GStreamer back-ends only) |
CAP_PROP_STREAM_OPEN_TIME_USEC Python: cv.CAP_PROP_STREAM_OPEN_TIME_USEC | (read-only) time in microseconds since Jan 1 1970 when stream was opened. Applicable for FFmpeg backend only. Useful for RTSP and other live streams |
CAP_PROP_VIDEO_TOTAL_CHANNELS Python: cv.CAP_PROP_VIDEO_TOTAL_CHANNELS | (read-only) Number of video channels |
CAP_PROP_VIDEO_STREAM Python: cv.CAP_PROP_VIDEO_STREAM | (open-only) Specify video stream, 0-based index. Use -1 to disable video stream from file or IP cameras. Default value is 0. |
CAP_PROP_AUDIO_STREAM Python: cv.CAP_PROP_AUDIO_STREAM | (open-only) Specify stream in multi-language media files, -1 - disable audio processing or microphone. Default value is -1. |
CAP_PROP_AUDIO_POS Python: cv.CAP_PROP_AUDIO_POS | (read-only) Audio position is measured in samples. Accurate audio sample timestamp of previous grabbed fragment. See CAP_PROP_AUDIO_SAMPLES_PER_SECOND and CAP_PROP_AUDIO_SHIFT_NSEC. |
CAP_PROP_AUDIO_SHIFT_NSEC Python: cv.CAP_PROP_AUDIO_SHIFT_NSEC | (read only) Contains the time difference between the start of the audio stream and the video stream in nanoseconds. Positive value means that audio is started after the first video frame. Negative value means that audio is started before the first video frame. |
CAP_PROP_AUDIO_DATA_DEPTH Python: cv.CAP_PROP_AUDIO_DATA_DEPTH | (open, read) Alternative definition to bits-per-sample, but with clear handling of 32F / 32S |
CAP_PROP_AUDIO_SAMPLES_PER_SECOND Python: cv.CAP_PROP_AUDIO_SAMPLES_PER_SECOND | (open, read) determined from file/codec input. If not specified, then selected audio sample rate is 44100 |
CAP_PROP_AUDIO_BASE_INDEX Python: cv.CAP_PROP_AUDIO_BASE_INDEX | (read-only) Index of the first audio channel for .retrieve() calls. That audio channel number continues enumeration after video channels. |
CAP_PROP_AUDIO_TOTAL_CHANNELS Python: cv.CAP_PROP_AUDIO_TOTAL_CHANNELS | (read-only) Number of audio channels in the selected audio stream (mono, stereo, etc) |
CAP_PROP_AUDIO_TOTAL_STREAMS Python: cv.CAP_PROP_AUDIO_TOTAL_STREAMS | (read-only) Number of audio streams. |
CAP_PROP_AUDIO_SYNCHRONIZE Python: cv.CAP_PROP_AUDIO_SYNCHRONIZE | (open, read) Enables audio synchronization. |
CAP_PROP_LRF_HAS_KEY_FRAME Python: cv.CAP_PROP_LRF_HAS_KEY_FRAME | FFmpeg back-end only - Indicates whether the Last Raw Frame (LRF), output from VideoCapture::read() when VideoCapture is initialized with VideoCapture::open(CAP_FFMPEG, {CAP_PROP_FORMAT, -1}) or VideoCapture::set(CAP_PROP_FORMAT,-1) is called before the first call to VideoCapture::read(), contains encoded data for a key frame. |
CAP_PROP_CODEC_EXTRADATA_INDEX Python: cv.CAP_PROP_CODEC_EXTRADATA_INDEX | Positive index indicates that returning extra data is supported by the video back end. This can be retrieved as cap.retrieve(data, <returned index>). E.g. When reading from a h264 encoded RTSP stream, the FFmpeg backend could return the SPS and/or PPS if available (if sent in reply to a DESCRIBE request), from calls to cap.retrieve(data, <returned index>). |
CAP_PROP_FRAME_TYPE Python: cv.CAP_PROP_FRAME_TYPE | (read-only) FFmpeg back-end only - Frame type ascii code (73 = 'I', 80 = 'P', 66 = 'B' or 63 = '?' if unknown) of the most recently read frame. |
CAP_PROP_N_THREADS Python: cv.CAP_PROP_N_THREADS | (open-only) Set the maximum number of threads to use. Use 0 to use as many threads as CPU cores (applicable for FFmpeg back-end only). |
#include <opencv2/videoio.hpp>
cv::VideoWriter generic properties identifier.
Enumerator | |
---|---|
VIDEOWRITER_PROP_QUALITY Python: cv.VIDEOWRITER_PROP_QUALITY | Current quality (0..100%) of the encoded videostream. Can be adjusted dynamically in some codecs. |
VIDEOWRITER_PROP_FRAMEBYTES Python: cv.VIDEOWRITER_PROP_FRAMEBYTES | (Read-only): Size of just encoded video frame. Note that the encoding order may be different from representation order. |
VIDEOWRITER_PROP_NSTRIPES Python: cv.VIDEOWRITER_PROP_NSTRIPES | Number of stripes for parallel encoding. -1 for auto detection. |
VIDEOWRITER_PROP_IS_COLOR Python: cv.VIDEOWRITER_PROP_IS_COLOR | If it is not zero, the encoder will expect and encode color frames, otherwise it will work with grayscale frames. |
VIDEOWRITER_PROP_DEPTH Python: cv.VIDEOWRITER_PROP_DEPTH | Defaults to CV_8U. |
VIDEOWRITER_PROP_HW_ACCELERATION Python: cv.VIDEOWRITER_PROP_HW_ACCELERATION | (open-only) Hardware acceleration type (see VideoAccelerationType). Setting supported only via |
VIDEOWRITER_PROP_HW_DEVICE Python: cv.VIDEOWRITER_PROP_HW_DEVICE | (open-only) Hardware device index (select GPU if multiple available). Device enumeration is acceleration type specific. |
VIDEOWRITER_PROP_HW_ACCELERATION_USE_OPENCL Python: cv.VIDEOWRITER_PROP_HW_ACCELERATION_USE_OPENCL | (open-only) If non-zero, create new OpenCL context and bind it to current thread. The OpenCL context created with Video Acceleration context attached it (if not attached yet) for optimized GPU data copy between cv::UMat and HW accelerated encoder. |
VIDEOWRITER_PROP_RAW_VIDEO Python: cv.VIDEOWRITER_PROP_RAW_VIDEO | (open-only) Set to non-zero to enable encapsulation of an encoded raw video stream. Each raw encoded video frame should be passed to VideoWriter::write() as single row or column of a CV_8UC1 Mat.
|
VIDEOWRITER_PROP_KEY_INTERVAL Python: cv.VIDEOWRITER_PROP_KEY_INTERVAL | (open-only) Set the key frame interval using raw video encapsulation (VIDEOWRITER_PROP_RAW_VIDEO != 0). Defaults to 1 when not set. FFMpeg backend only. |
VIDEOWRITER_PROP_KEY_FLAG Python: cv.VIDEOWRITER_PROP_KEY_FLAG | Set to non-zero to signal that the following frames are key frames or zero if not, when encapsulating raw video (VIDEOWRITER_PROP_RAW_VIDEO != 0). FFMpeg backend only. |