Create new AVI file and open it for writing.

Namespace:  AForge.Video.VFW
Assembly:  AForge.Video.VFW (in AForge.Video.VFW.dll) Version: 2.2.4.0 (2.2.4.0)

Syntax

C#
public void Open(
	string fileName,
	int width,
	int height
)

Parameters

fileName
Type: System..::.String
AVI file name to create.
width
Type: System..::.Int32
Video width.
height
Type: System..::.Int32
Video height.

Remarks

The method opens (creates) a video files, configure video codec and prepares the stream for saving video frames with a help of AddFrame(Bitmap) method.

Exceptions

ExceptionCondition
System.IO..::.IOExceptionFailed opening the specified file.
AForge.Video..::.VideoExceptionA error occurred while creating new video file. See exception message.
System..::.OutOfMemoryExceptionInsufficient memory for internal buffer.
System..::.ArgumentExceptionVideo file resolution must be a multiple of two.

See Also