WMEncoder.PreserveSourceTimecode

Windows Media Encoder SDK banner art

The PreserveSourceTimecode property specifies and retrieves a Boolean value indicating whether the content's original time code will be used in the output.

Syntax

WMEncoder.PreserveSourceTimecode = Boolean
Boolean = WMEncoder.PreserveSourceTimecode

Parameters

This property takes no parameters.

Property Value

A Boolean that indicates whether to preserve the original time code.

If this property fails, it returns an error number.

Return code Number Description
NS_E_INVALIDCALL_WHILE_ENCODER_RUNNING 0xC00D1B66L This property cannot be set while the encoder engine is running.

Remarks

Set the EnableTimecode property to True to use time codes in your video content, and then use this property to preserve an existing time code from your source content (set PreserveSourceTimecode to True) or to insert a new time code (set PreserveSourceTimecode to False). If False, a new time code of 01:00:00:00 is used. You can change this starting time code using the StartingTimecode property.

Note   To preserve the time code for a VTR that is connected through a COM port using the Sony RS422 protocol, you must set up an EDL for the session.

Example Code

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

' Enable the time code and preserve the existing one in the content.
  Encoder.EnableTimecode = True
  Encoder.PreserveSourceTimecode = True

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also