Microsoft DirectX 9.0

AVI Mux Filter

The AVI Mux filter accepts multiple input streams and interleaves them into AVI format. The filter uses separate input pins for each input stream, and one output pin for the AVI stream.

Video capture or authoring applications can use this filter to save files to disk in AVI format. The filter is typically connected to the File Writer filter, but it can connect to any filter whose input pin supports the IStream and IMemInputPin interfaces.

Filter Interfaces IBaseFilter, IConfigAviMux, IConfigInterleaving, IMediaSeeking, IPersistMediaPropertyBag, ISpecifyPropertyPages
Input Pin Media Types Any major type that corresponds to an old-style FOURCC, or MEDIATYPE_AUXLine21Data. (For more information, see FOURCCMap Class.)
  • If the major type is MEDIATYPE_Audio, the format must be FORMAT_WaveFormatEx.
  • If the major type is MEDIATYPE_Video, the format must be FORMAT_VideoInfo or FORMAT_DvInfo.
  • If the major type is MEDIATYPE_Interleaved, the format must be FORMAT_DvInfo.
Input Pin Interfaces IAMStreamControl, IMemInputPin, IPin, IPropertyBag, IQualityControl
Output Pin Media Types MEDIATYPE_Stream, MEDIASUBTYPE_Avi
Output Pin Interfaces IPin, IQualityControl
Filter CLSID CLSID_AviDest
Property Page CLSID CLSID_AviMuxProptyPage, CLSID_AviMuxProptyPage1
Executable qcap.dll
Merit MERIT_DO_NOT_USE
Filter Category CLSID_LegacyAmFilterCategory

Remarks

The following remarks describe various aspects of the AVI Mux filter's functionality.

Pins

When the AVI Mux filter is created, it has one input pin. As each input pin is connected, the filter creates a new input pin.

Stream Properties

The input pins support the IPropertyBag interface for setting properties on individual streams. Currently, the following property is defined:

Property Description
name The name of the stream. This property is written as a 'strn' chunk.

If the filter is running or paused, the IPropertyBag::Write method returns VFW_E_WRONG_STATE.

Frame Rates

If the upstream filter does not specify a frame rate in the AvgTimePerFrame member of the VIDEOINFOHEADER structure, the AVI Mux uses the time stamps on the first video frame. The AVI file format does not support variable frame rates.

Dropped Frames

The AVI Mux filter calculates dropped frames based on each sample's media times, if available, or else the sample's time stamps. It writes a zero-length index entry for every dropped frame.

Stream Duration

In the AVI Mux filter's implementation of IMediaSeeking::GetDuration, the filter queries each upstream source filter's IMediaSeeking interface and returns the duration of the longest stream. If one of the upstream filters fails the Mux's QueryInterface call for IMediaSeeking or fails IMediaSeeking::GetDuration, then the AVI Mux passes that failure code back to your application but will still fill in the output parameter pDuration with the longest duration, if any was found. In this case, the value of pDuration is not necessarily the length of the longest input stream.

AVI 2.0 File Format Extensions

DirectShow currently supports the following AVI 2.0 file format extensions:

For more information, see version 1.02 of the OpenDML AVI File Format Extensions published by the OpenDML AVI M-JPEG File Format Subcommittee, February 28, 1996.