pub trait VideoWriter: VideoWriterConst {
    // Required method
    fn as_raw_mut_VideoWriter(&mut self) -> *mut c_void;

    // Provided methods
    fn write(&mut self, frame: &dyn ToInputArray) -> Result<()> { ... }
    fn release(&mut self) -> Result<()> { ... }
}
Expand description

Video writer interface.

Available when built with WITH_NVCUVENC=ON while Nvidia’s Video Codec SDK is installed.

Encoding support is dependent on the GPU, refer to the Nvidia Video Codec SDK Video Encode and Decode GPU Support Matrix for details.

Note:

  • An example on how to use the videoWriter class can be found at opencv_source_code/samples/gpu/video_writer.cpp

Required Methods§

Provided Methods§

source

fn write(&mut self, frame: &dyn ToInputArray) -> Result<()>

Writes the next video frame.

Parameters
  • frame: The framet to be written.

The method encodes the specified image to a video stream. The image must have the same size and the same surface format as has been specified when opening the video writer.

source

fn release(&mut self) -> Result<()>

Waits until the encoding process has finished before calling EncoderCallback::onEncodingFinished().

Implementors§