Processing Windows Media Script Commands

Windows Media Script metadata tags consist of a pair of strings. The first string is the name of the command, while the second is the command itself. For example, a command with the name "url" might have a command of "https://www.leadtools.com"

Or a command with the name "caption", might have a command of "This is a sample caption"

An application might process the above "url" command by opening the specified url in the default web browser, while the "caption" command might be processed by overlaying the text on the screen.

Windows Media Player will process some commands by default. See the Using Script Commands Supported by Windows Media Player topic on the Microsoft web site for a list of commands supported by Media Player. Our ConvertWMS demos will create a file containing "caption" commands. To make sure Media Player shows the captions in the files generated by our demos, make sure the "Lyrics, Captions and subtitles" are turned On in Media Player's options.

You can add the script commands in two ways:

  1. In the header
  2. In the stream

Our toolkit will send the LEAD MediaEvent event with MediaEventCode set to EC_OLE_EVENT only for command scripts inserted in the stream. For an example showing how to handle WMV script commands during video playback, refer to WMScript.

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Multimedia