Struct cv::videoio::VideoWriter[][src]

pub struct VideoWriter { /* fields omitted */ }

VideoWriter provides easy access to write videos to files. -On Linux FFMPEG is used to write videos; -On Windows FFMPEG or VFW is used; -On MacOSX QTKit is used.

Implementations

impl VideoWriter[src]

pub fn new(
    path: &str,
    fourcc: c_int,
    fps: f64,
    frame_size: Size2i,
    is_color: bool
) -> VideoWriter
[src]

VideoWriter constructor. -path – Name of the output video file. -fourcc – 4-character code of codec used to compress the frames. For example, VideoWriter::fourcc(‘P’,‘I’,‘M’,‘1’) is a MPEG-1 codec, VideoWriter::fourcc(‘M’,‘J’,‘P’,‘G’) is a motion-jpeg codec etc. List of codes can be obtained at Video Codecs by FOURCC page. -fps – Framerate of the created video stream. -frame_size – Size of the video frames. -is_color – If it is not zero, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only).

pub fn open(
    &self,
    path: &str,
    fourcc: c_int,
    fps: f64,
    frame_size: Size2i,
    is_color: bool
) -> bool
[src]

VideoWriter constructor. -path – Name of the output video file. -fourcc – 4-character code of codec used to compress the frames. For example, VideoWriter::fourcc(‘P’,‘I’,‘M’,‘1’) is a MPEG-1 codec, VideoWriter::fourcc(‘M’,‘J’,‘P’,‘G’) is a motion-jpeg codec etc. List of codes can be obtained at Video Codecs by FOURCC page. -fps – Framerate of the created video stream. -frame_size – Size of the video frames. -is_color – If it is not zero, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only).

pub fn write(&self, mat: &Mat)[src]

Writes the specified image to video file. It must have the same size as has been specified when opening the video writer.

pub fn is_open(&self) -> bool[src]

Returns true if video writer has been initialized already.

pub fn set(&self, property: VideoWriterProperty, value: f64) -> bool[src]

Sets a property in the VideoWriter. Note: VideoWriterProperty::FrameBytes is read-only.

pub fn get(&self, property: VideoWriterProperty) -> Option<f64>[src]

Gets a property in the VideoWriter.

Trait Implementations

impl Debug for VideoWriter[src]

impl Default for VideoWriter[src]

impl Drop for VideoWriter[src]

Auto Trait Implementations

impl RefUnwindSafe for VideoWriter

impl !Send for VideoWriter

impl !Sync for VideoWriter

impl Unpin for VideoWriter

impl UnwindSafe for VideoWriter

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.