[][src]Function opencv::cudacodec::create_video_writer

pub fn create_video_writer(
    file_name: &str,
    frame_size: Size,
    fps: f64,
    format: SurfaceFormat
) -> Result<Ptr<dyn VideoWriter>>

Creates video writer.

Parameters

  • fileName: Name of the output video file. Only AVI file format is supported.
  • frameSize: Size of the input video frames.
  • fps: Framerate of the created video stream.
  • format: Surface format of input frames ( SF_UYVY , SF_YUY2 , SF_YV12 , SF_NV12 , SF_IYUV , SF_BGR or SF_GRAY). BGR or gray frames will be converted to YV12 format before encoding, frames with other formats will be used as is.

The constructors initialize video writer. FFMPEG is used to write videos. User can implement own multiplexing with cudacodec::EncoderCallBack .

C++ default parameters

  • format: SF_BGR