This documentation is for the old version. Go to the latest Graphics Mill docs

AviWriter Constructor (Stream, Int32, Int32, Int32, Int32, Int32, Boolean, IntPtr, Int32, Int32)

Creates and initializes new AviWriter class instance. You set all possible AVI writer parameters here. It also opens this writer on specified file.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill.Codecs.AviProcessor (in Aurigma.GraphicsMill.Codecs.AviProcessor.dll)

Syntax

Visual Basic
Public Sub New ( _
	stream As Stream, _
	width As Integer, _
	height As Integer, _
	quality As Integer, _
	framesPerSecond As Integer, _
	compressorHandler As Integer, _
	showOptionDialog As Boolean, _
	optionDialogParent As IntPtr, _
	keyFrameRate As Integer, _
	bytesPerSecond As Integer _
)
C#
public AviWriter(
	Stream stream,
	int width,
	int height,
	int quality,
	int framesPerSecond,
	int compressorHandler,
	bool showOptionDialog,
	IntPtr optionDialogParent,
	int keyFrameRate,
	int bytesPerSecond
)

Parameters

stream

Type: System.IO.Stream

Name of the file to open the writer on.
width

Type: System.Int32

An integer value which specifies the width of the AVI you need to get. If 0 is specified, the width will be taken from the first frame added to the writer.
height

Type: System.Int32

An integer value which specifies the height of the AVI you need to get. If 0 is specified, the height will be taken from the first frame added to the writer.
quality

Type: System.Int32

Value in range [0, 10000] which specifies the quality of the AVI file. Higher values means better quality (but larger file size).

The quality setting is meaningful not for each AVI compressor. That's why it may be disregarded depending on the value of the CompressorHandler property.

framesPerSecond

Type: System.Int32

An integer value which specifies how many frames should be played in one second.
compressorHandler

Type: System.Int32

An integer number containing the compressor handler.
showOptionDialog

Type: System.Boolean

A Boolean value which whether to display the options dialog to specify the writer object settings.
optionDialogParent

Type: System.IntPtr

A value which contains the HWND of the options dialog parent window.
keyFrameRate

Type: System.Int32

An integer value which specifies the key frame value.

This value is ignored by most compressors. It is used by those compressors which are based on MPEG algorithm (e.g. DivXPro5, XvidMpeg4, etc).

bytesPerSecond

Type: System.Int32

An integer value which specifies the amount of bytes per second.

This value is ignored by most compressors. It is used by those compressors which are based on MPEG algorithm (e.g. DivXPro5, XvidMpeg4, etc).

Remarks

When you open the writer with this constructor, you will not be able to change the writer settings (such as dimensions, compressor settings, frames per second, etc). So use this constructor only if you are sure that you need not change the writer parameters. Otherwise you should:

  1. Use the constructor without parameters.
  2. Initialize all necessary settings.
  3. Use the Open(Stream) method to open the writer (when you are sure that the writer settings should not be changed).

See Also

Reference