Windows Media Services SDK banner art
PreviousNext

About the Encoder Scripting Utility Sample

The Encoder Scripting Utility Sample is a program created using Microsoft® Visual Basic®. The utility adds functionality to Windows Media Encoder that helps users more easily work with script commands. Standard common dialog box, text box, and list controls handle text and other user input. Windows Media Encoder handles the encoding of the ASF stream. Visual Basic code handles the transfer of text and control data between user interface controls and Windows Media Encoder.

Creating a Windows Media Encoder Object

In order to pass text strings and control data to Windows Media Encoder, the Encoder Scripting Utility Sample creates an instance of Windows Media Encoder using Automation. In this sample, methods exposed by Windows Media Encoder are used to load the .asd file, to start and stop encoding, and to send script commands; properties exposed by Windows Media Encoder are used primarily to populate View Properties with read-only encoding data.

The Encoder object in the custom application functions nearly the same as Windows Media Encoder does when it is opened from the executable file (Nsrex.exe). But there are differences. When created as an Automation object, the Encoder user interface is not visible. Also, Automation cannot be used to create an ASF Stream Descriptor (.asd) file, which you need to configure Windows Media Encoder. For these reasons, the sample utility or any custom application using Encoder Automation must supply its own user interface and a procedure for loading an existing .asd file.

For more information about Windows Media Encoder Automation, see the Windows Media Encoder SDK.

Monitoring the Output

A script command monitor is also included in this sample. The monitor is a simple Web page that contains a Windows Media Player control and text boxes, which are used to display script commands after they are sent. You can enhance this page easily to display more of Windows Media Player, so you can view the text and marker areas.

Expanding on this Sample

The feel of a live presentation can extend beyond the small video display of Windows Media Player when you use script commands to control elements on your Web page. The following examples show how you can extend the capabilities of the Encoder Scripting Utility Sample by modifying the Visual Basic code source included in this SDK.

See Also

Using the Encoder Scripting Utility Sample, Windows Media Technologies Solutions Samples

PreviousNext


© 1996-1999 Microsoft Corporation. All rights reserved.