VideoWriterProperties
import { VideoWriterProperties } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods.
cv::VideoWriter generic properties identifier. See: VideoWriter::get(), VideoWriter::set()
Constructors and members
static VIDEOWRITER_PROP_UNKNOWN
Returned by VideoWriter::get if the requested property is unknown or unsupported
VIDEOWRITER_PROP_UNKNOWN: VideoWriterPropertiesValue<-1>,static VIDEOWRITER_PROP_QUALITY
Current quality (0..100%) of the encoded videostream. Can be adjusted dynamically in some codecs.
VIDEOWRITER_PROP_QUALITY: VideoWriterPropertiesValue<1>,static VIDEOWRITER_PROP_FRAMEBYTES
(Read-only): Size of just encoded video frame. Note that the encoding order may be different from representation order.
VIDEOWRITER_PROP_FRAMEBYTES: VideoWriterPropertiesValue<2>,static VIDEOWRITER_PROP_NSTRIPES
Number of stripes for parallel encoding. -1 for auto detection.
VIDEOWRITER_PROP_NSTRIPES: VideoWriterPropertiesValue<3>,static VIDEOWRITER_PROP_IS_COLOR
If it is not zero, the encoder will expect and encode color frames, otherwise it
VIDEOWRITER_PROP_IS_COLOR: VideoWriterPropertiesValue<4>,static VIDEOWRITER_PROP_DEPTH
Defaults to CV_8U.
VIDEOWRITER_PROP_DEPTH: VideoWriterPropertiesValue<5>,static VIDEOWRITER_PROP_HW_ACCELERATION
(open-only) Hardware acceleration type (see #VideoAccelerationType). Setting supported only via params parameter in VideoWriter constructor / .open() method. Default value is backend-specific.
VIDEOWRITER_PROP_HW_ACCELERATION: VideoWriterPropertiesValue<6>,static VIDEOWRITER_PROP_HW_DEVICE
(open-only) Hardware device index (select GPU if multiple available). Device enumeration is acceleration type specific.
VIDEOWRITER_PROP_HW_DEVICE: VideoWriterPropertiesValue<7>,static 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_HW_ACCELERATION_USE_OPENCL: VideoWriterPropertiesValue<8>,static VIDEOWRITER_PROP_RAW_VIDEO
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 back-end only.
VIDEOWRITER_PROP_RAW_VIDEO: VideoWriterPropertiesValue<9>,static 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 back-end only.
VIDEOWRITER_PROP_KEY_INTERVAL: VideoWriterPropertiesValue<10>,static 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 back-end only.
VIDEOWRITER_PROP_KEY_FLAG: VideoWriterPropertiesValue<11>,static VIDEOWRITER_PROP_PTS
Specifies 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. The value should be provided by your external encoder and for video sources with fixed frame rates it is equivalent to dividing the current frame's presentation time (CAP_PROP_POS_MSEC) by the frame duration (1000.0 / VideoCapture::get(CAP_PROP_FPS)). It can be queried from the resulting encapsulated video file using VideoCapture::get(CAP_PROP_PTS). FFmpeg back-end only.
VIDEOWRITER_PROP_PTS: VideoWriterPropertiesValue<12>,static VIDEOWRITER_PROP_DTS_DELAY
Specifies the maximum difference between presentation (pts) and decompression timestamps (dts) using the FPS time base. This property is necessary only when encapsulating externally encoded video where the decoding order differs from the presentation order, such as in GOP patterns with bi-directional B-frames. The value should be calculated based on the specific GOP pattern used during encoding. For example, in a GOP with presentation order IBP and decoding order IPB, this value would be 1, as the B-frame is the second frame presented but the third to be decoded. It can be queried from the resulting encapsulated video file using VideoCapture::get(CAP_PROP_DTS_DELAY). Non-zero values usually imply the stream is encoded using B-frames. FFmpeg back-end only.
VIDEOWRITER_PROP_DTS_DELAY: VideoWriterPropertiesValue<13>,static VIDEOWRITER_PROP_COLOR_SPACE
(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.
VIDEOWRITER_PROP_COLOR_SPACE: VideoWriterPropertiesValue<14>,static VIDEOWRITER_PROP_ENABLE_ALPHA
(open-only) FFmpeg backend only. Defines that input frames contain alpha channel.
VIDEOWRITER_PROP_ENABLE_ALPHA: VideoWriterPropertiesValue<15>These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.