Click or drag to resize
Accord.NET (logo)

AVIWriter Class

AVI files writing using Video for Windows interface.
Inheritance Hierarchy
SystemObject
  Accord.Video.VFWAVIWriter

Namespace:  Accord.Video.VFW
Assembly:  Accord.Video.VFW (in Accord.Video.VFW.dll) Version: 3.8.0
Syntax
public class AVIWriter : IDisposable
Request Example View Source

The AVIWriter type exposes the following members.

Constructors
  NameDescription
Public methodAVIWriter
Initializes a new instance of the AVIWriter class.
Public methodAVIWriter(String)
Initializes a new instance of the AVIWriter class.
Top
Properties
  NameDescription
Public propertyCodec
Codec used for video compression.
Public propertyFrameRate
Desired playing frame rate.
Public propertyHeight
Height of video frames.
Public propertyPosition
Current position in video stream.
Public propertyQuality
Compression video quality.
Public propertyWidth
Width of video frames.
Top
Methods
  NameDescription
Public methodAddFrame
Add new frame to the AVI file.
Public methodClose
Close video file.
Public methodDispose
Dispose the object.
Protected methodDispose(Boolean)
Dispose the object.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Destroys the instance of the AVIWriter class.
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOpen
Create new AVI file and open it for writing.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

The class allows to write AVI files using Video for Windows API.

Sample usage:

// instantiate AVI writer, use WMV3 codec
AVIWriter writer = new AVIWriter( "wmv3" );
// create new AVI file and open it
writer.Open( "test.avi", 320, 240 );
// create frame image
Bitmap image = new Bitmap( 320, 240 );

for ( int i = 0; i < 240; i++ )
{
    // update image
    image.SetPixel( i, i, Color.Red );
    // add the image as a new frame of video file
    writer.AddFrame( image );
}
writer.Close( );
See Also