---
title: "MediaFormatManager Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_MediaFormatManager.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/)

# MediaFormatManager Class
 
This is a class factory that creates a reader for the specified video file using Media Processor add-on.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill.Codecs.MediaProcessor (in Aurigma.GraphicsMill.Codecs.MediaProcessor.dll)
 
## Syntax
  
```
Public NotInheritable Class MediaFormatManager
```
 
```csharp
public sealed class MediaFormatManager
```
 
## Remarks
  
Use this class to create a reader of the appropriate type automatically based on the type of the specified video file.
 
This class is an analog of the [FormatManager](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatManager.htm.md) class, but works with video files. The [FormatManager](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatManager.htm.md) will not return Media Processor readers automatically.
 
For the list of file formats supported by different Media Processor readers, see the [System Requirements](https://www.graphicsmill.com/docs/gm5/MediaProcessorSystemRequirements.htm.md) topic.
 
## Examples
 This example shows how to create a reader. ```
'Create a reader using the class factory
Private Sub CreateReader(ByVal fileName As String)
    Try
        reader = MediaFormatManager.CreateFormatReader(fileName)
    Catch ex As System.Exception
        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, _
            MessageBoxIcon.Error)
    End Try
End Sub
``````csharp
//Create a reader using the class factory
private void CreateReader(String fileName)
{
    try
    {
        reader = MediaFormatManager.CreateFormatReader(fileName);
    }
    catch(System.Exception ex)
    {
        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK,
            MessageBoxIcon.Error);
    }

}
```
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - Aurigma.GraphicsMill.Codecs.MediaFormatManager
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
 
## Object Model

[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill.Codecs.MediaProcessor_ObjectModel_14.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_MediaFormatManager.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill.Codecs.MediaProcessor_ObjectModel_15.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IFormatReader.htm.md)
  
## See Also

### Reference

- [MediaFormatManager Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Codecs_MediaFormatManager.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
- [Aurigma.GraphicsMill.Codecs.DSReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_DSReader.htm.md)
- [Aurigma.GraphicsMill.Codecs.QTReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_QTReader.htm.md)
- [Aurigma.GraphicsMill.Codecs.WMReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_WMReader.htm.md)
