Table of Contents

Class CudaVideoWriter

Namespace
Emgu.CV.Cuda
Assembly
Emgu.CV.dll

Works only under Windows, Supports only H264 video codec and AVI files.

public class CudaVideoWriter : SharedPtrObject, IDisposable
Inheritance
CudaVideoWriter
Implements
Inherited Members

Constructors

CudaVideoWriter(string, Size, CudaCodec, double, ColorFormat, Stream)

The constructors initialize video writer.

public CudaVideoWriter(string fileName, Size frameSize, CudaCodec codec, double fps, CudaVideoWriter.ColorFormat format = ColorFormat.Bgr, Stream stream = null)

Parameters

fileName string

Name of the output video file. Only AVI file format is supported.

frameSize Size

Size of the input video frames.

codec CudaCodec

Video codec

fps double

Framerate of the created video stream.

format CudaVideoWriter.ColorFormat

Surface format of input frames. BGR or gray frames will be converted to YV12 format before encoding, frames with other formats will be used as is.

stream Stream

Use a Stream to call the function asynchronously (non-blocking) or null to call the function synchronously (blocking).

Methods

DisposeObject()

Release all the unmanaged memory assocuated with this VideoWriter

protected override void DisposeObject()

Release()

Waits until the encoding process has finished

public void Release()

Write(IInputArray)

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

public void Write(IInputArray frame)

Parameters

frame IInputArray

The written frame.