WMEncBasicEdit.SaveProfile

Windows Media Encoder SDK banner art

The SaveProfile method saves the profile of the input file that is currently loaded as a new profile.

Syntax

WMEncBasicEdit.SaveProfile(strProfileFileName)

Parameters

strProfileFileName

[in]  String containing the profile's file name and path.

Return Values

This method does not return a value.

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