Constructor VideoWriter
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
VideoWriter()
public VideoWriter()
VideoWriter(string, FourCC, double, Size, bool)
Creates video writer structure.
public VideoWriter(string fileName, FourCC fourcc, double fps, Size frameSize, bool isColor = true)
Parameters
fileNamestringName of the output video file.
fourccFourCC4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fpsdoubleFrame rate of the created video stream.
frameSizeSizeSize of video frames.
isColorboolIf it is true, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only).
VideoWriter(string, VideoCaptureAPIs, FourCC, double, Size, bool)
Creates video writer structure.
public VideoWriter(string fileName, VideoCaptureAPIs apiPreference, FourCC fourcc, double fps, Size frameSize, bool isColor = true)
Parameters
fileNamestringName of the output video file.
apiPreferenceVideoCaptureAPIsallows to specify API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_GSTREAMER.
fourccFourCC4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fpsdoubleFrame rate of the created video stream.
frameSizeSizeSize of video frames.
isColorboolIf it is true, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only).
VideoWriter(string, FourCC, double, Size, int[])
Creates video writer structure.
public VideoWriter(string fileName, FourCC fourcc, double fps, Size frameSize, int[] prms)
Parameters
fileNamestringName of the output video file.
fourccFourCC4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fpsdoubleFrame rate of the created video stream.
frameSizeSizeSize of video frames.
prmsint[]The
paramsparameter allows to specify extra encoder parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) see cv::VideoWriterProperties
VideoWriter(string, FourCC, double, Size, VideoWriterPara)
Creates video writer structure.
public VideoWriter(string fileName, FourCC fourcc, double fps, Size frameSize, VideoWriterPara prms)
Parameters
fileNamestringName of the output video file.
fourccFourCC4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fpsdoubleFrame rate of the created video stream.
frameSizeSizeSize of video frames.
prmsVideoWriterParaParameters of VideoWriter for hardware acceleration
VideoWriter(string, VideoCaptureAPIs, FourCC, double, Size, int[])
Creates video writer structure.
public VideoWriter(string fileName, VideoCaptureAPIs apiPreference, FourCC fourcc, double fps, Size frameSize, int[] prms)
Parameters
fileNamestringName of the output video file.
apiPreferenceVideoCaptureAPIsallows to specify API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_GSTREAMER.
fourccFourCC4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fpsdoubleFrame rate of the created video stream.
frameSizeSizeSize of video frames.
prmsint[]The
paramsparameter allows to specify extra encoder parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) see cv::VideoWriterProperties
VideoWriter(string, VideoCaptureAPIs, FourCC, double, Size, VideoWriterPara)
Creates video writer structure.
public VideoWriter(string fileName, VideoCaptureAPIs apiPreference, FourCC fourcc, double fps, Size frameSize, VideoWriterPara prms)
Parameters
fileNamestringName of the output video file.
apiPreferenceVideoCaptureAPIsallows to specify API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_GSTREAMER.
fourccFourCC4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fpsdoubleFrame rate of the created video stream.
frameSizeSizeSize of video frames.
prmsVideoWriterParaParameters of VideoWriter for hardware acceleration