2.2.7.13.1 VideoWriter::Create

Version Info

Minimum Origin Version Required: Origin 9 SR0

Description

Syntax

int Create( LPCTSTR fileName, int codec, double fps, int width, int height, bool bColor = true )

Parameters

fileName
[Input] The file path and name of the generated video
codec
[Input] The fourCC code indicating compression method
fps
[Input] Number of frames per second
width
[Input] The video width in pixel
height
[Input] The video height in pixel
bColor
[Input]

Return

0: Success

none 0 values: Error code

Examples

#include <..\OriginLab\VideoWriter.h>

void VideoWriter_Create_ex1()
{
	// Use the raw format without compression.
	int codec = CV_FOURCC(0,0,0,0); 
 
	// Create a VideoWriter object.
	VideoWriter vw;
	int err = vw.Create("D:\\example.avi", codec, 2, 800, 600);
	
	if( err==0 )
		out_str("Create video success!");
	
}

Remark

SeeAlso

Release

Header to Included

VideoWriter.h