Struct cv::videoio::VideoWriter [−][src]
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]
path: &str,
fourcc: c_int,
fps: f64,
frame_size: Size2i,
is_color: bool
) -> VideoWriter
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]
&self,
path: &str,
fourcc: c_int,
fps: f64,
frame_size: Size2i,
is_color: bool
) -> bool
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]
fn default() -> 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,