IWMEncAudioSource.PreProcessPass

Windows Media Encoder SDK banner art

The PreProcessPass property specifies and retrieves the preprocess pass count.

Syntax

IWMEncAudioSource.PreProcessPass = Integer
Integer = IWMEncAudioSource.PreProcessPass

Parameters

This property takes no parameters.

Property Value

An Integer that indicates the number of passes to make (0 or 1) for preprocessing.

Remarks

During one-pass encoding (where the PreProcessPass property is 0), audio content is analyzed and compressed at the same time.

During two-pass encoding (where the PreProcessPass property is 1), audio content is analyzed in the first pass, and then the best combinations of bit rate, frame rate, buffer size, and image quality are applied during the second pass. Two-pass encoding produces a better-quality result but the process takes longer. To use two-pass encoding, the input cannot be a live source and the output cannot be a broadcast.

Example Code

' Create a WMEncoder object.
  Dim Encoder As WMEncoder
  Set Encoder = New WMEncoder

' Create a source group.
  Dim SrcGrpColl As IWMEncSourceGroupCollection
  Dim SrcGrp As IWMEncSourceGroup
  Set SrcGrpColl = Encoder.SourceGroupCollection
  Set SrcGrp = SrcGrpColl.Add("SG_1")

' Add an audio source to the source group and specify an input file.
  Dim SrcAud As IWMEncAudioSource
  Set SrcAud = SrcGrp.AddSource(WMENC_AUDIO)
  SrcAud.SetInput "C:\InputFile.avi" ' REPLACE THIS.

' Use two-pass encoding.
  SrcAud.PreProcessPass = 1

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also