---
title: "AviWriter Constructor (Stream, Int32, Int32)"
canonical: https://www.graphicsmill.com/docs/gm5/C_Aurigma_GraphicsMill_Codecs_AviWriter_ctor_3_683c067e.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# AviWriter Constructor (Stream, Int32, Int32)
 
Creates and initializes new [AviWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_AviWriter.htm.md) class instance. You specify the result AVI dimensions here. It also opens this writer on specified file.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill.Codecs.AviProcessor (in Aurigma.GraphicsMill.Codecs.AviProcessor.dll)
 
## Syntax
  
```
Public Sub New ( _stream As Stream, _width As Integer, _height As Integer _
)
```
 
```csharp
public AviWriter(Stream stream,int width,int height
)
```
 
### Parameters
 
 - stream
     - Type: [System.IO.Stream](http://msdn2.microsoft.com/en-us/8f86tw9e)
Name of the file to open the writer on.

 - width
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
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](http://msdn2.microsoft.com/en-us/td2s409d)
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.
 
## 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](https://www.graphicsmill.com/docs/gm5/C_Aurigma_GraphicsMill_Codecs_AviWriter_ctor.htm.md).
2. Initialize all necessary settings.
3. Use the [Open(Stream)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatWriter_Open_1_bca7c9fe.htm.md) method to open the writer (when you are sure that the writer settings should not be changed).
   
## See Also

### Reference

- [AviWriter Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_AviWriter.htm.md)
- [AviWriter Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Codecs_AviWriter_ctor.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
