Class CudaVideoWriter
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
stringName of the output video file. Only AVI file format is supported.
frameSize
SizeSize of the input video frames.
codec
CudaCodecVideo codec
fps
doubleFramerate of the created video stream.
format
CudaVideoWriter.ColorFormatSurface 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
StreamUse 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
IInputArrayThe written frame.