Enum VideoWriterProperties
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
VideoWriter generic properties identifier.
public enum VideoWriterProperties
Fields
ColorSpace = 14(open-only) GStreamer backend only. Pixel format for the encoding profile. Default is "I420". Other values: "NV12", "BGRx". See GStreamer raw video formats for more options.
Depth = 5Defaults to CV_8U.
DtsDelay = 13Specifies the maximum difference between presentation (pts) and decompression timestamps using the FPS time base. This property is necessary only when encapsulating externally encoded video where the decoding order differs from the presentation order. FFmpeg back-end only.
EnableAlpha = 15(open-only) FFmpeg backend only. Defines that input frames contain alpha channel.
FrameBytes = 2(Read-only): Size of just encoded video frame. Note that the encoding order may be different from representation order.
HwAcceleration = 6(open-only) Hardware acceleration type (see VideoAccelerationType). Setting supported only via params parameter in cv::VideoCapture constructor / .open() method. Default value is backend-specific.
HwAccelerationUseOpenCL = 8(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.
HwDevice = 7(open-only) Hardware device index (select GPU if multiple available). Device enumeration is acceleration type specific.
IsColor = 4If it is not zero, the encoder will expect and encode color frames, otherwise it will work with grayscale frames.
KeyFlag = 11Set to non-zero to signal that the following frames are key frames or zero if not, when encapsulating raw video (RawVideo != 0). FFmpeg back-end only.
KeyInterval = 10(open-only) Set the key frame interval when using raw video encapsulation (RawVideo != 0). Defaults to 1 when not set. FFmpeg back-end only.
NStripes = 3Number of stripes for parallel encoding. -1 for auto detection.
Pts = 12Specifies the frame presentation timestamp for each frame using the FPS time base. This property is only necessary when encapsulating externally encoded video where the decoding order differs from the presentation order, such as in GOP patterns with bi-directional B-frames. FFmpeg back-end only.
Quality = 1Current quality (0..100%) of the encoded video stream. Can be adjusted dynamically in some codecs.
RawVideo = 9(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. If the key frame interval is not 1 then it must be manually specified by the user, either during initialization by passing KeyInterval as one of the extra encoder params, or afterwards by setting KeyFlag with VideoWriter.Set() before writing each frame. FFmpeg backend only.