Share via


WMEncBasicEdit.OutputFile

Windows Media Encoder SDK banner art

The OutputFile property specifies and retrieves the name of the output file.

Syntax

WMEncBasicEdit.OutputFile = String
String = WMEncBasicEdit.OutputFile

Parameters

This property takes no parameters.

Property Value

A String specifying the output file name and path.

Remarks

Use the OutputFile property to specify the file to contain the result of the basic edit process. If an output file is not specified, the input file is modified.

Example Code

' Create the WMEncBasicEdit object.
  Dim BasicEdit As WMEncBasicEdit
  Set BasicEdit = New WMEncBasicEdit

' Specify the input, output, and configuration files.
  BasicEdit.MediaFile = "C:\InputFile.wmv"
  BasicEdit.OutputFile = "C:\OutputFile.wmv"
  BasicEdit.ConfigFile = "C:\ConfigFile.txt"

' Retrieve the duration of the input file, in seconds.
  Dim lFileDur As Long
  lFileDur = BasicEdit.Duration / 1000

' Retrieve the profile used by the input file.
  Dim Pro As WMEncProfile2
  Set Pro = BasicEdit.Profile

' Save the profile used by the input file.
  BasicEdit.SaveProfile "C:\BasicEditPro.prx"

' Add indexing to the file.
  BasicEdit.Index = True

' Specify a mark-in time of 5 seconds and a mark-out time of 10 seconds.
  BasicEdit.MarkIn = 5000
  BasicEdit.MarkOut = 10000

' Specify an output configuration file.
  BasicEdit.SaveConfigFile "C:\ConfigFile2.txt"

' Start the basic edit process.
  BasicEdit.Start

' Retrieve the run state.
  Dim BERunState as WMENC_BASICEDIT_STATE
  BERunState = BasicEdit.RunState

' Retrieve a run-time error.
  Dim lError As Long
  lError = BasicEdit.ErrorState
  If lError = 123456 Then
  ' Process the error.
  End If

' You can use a timer to retrieve the percentage complete.
  Dim lPercentComplete As Long
  lPercentComplete = BasicEdit.ProgressPercent

' Stop the edit process manually.
  ' BasicEdit.Stop

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also