Skip to the content
Link back to Cal State L.A.
Multimedia Services

Multimedia Services


Editing your session configuration: Scripts

Inserting script commands

You can insert script commands into a stream while you are encoding. The encoder supports the following types of script commands:

  • Captions. Free-form text strings that are displayed in a player along with your encoded content. For the captions to be visible, users must have enabled captions in their player.
  • Closed captioning. If your capture card supports capturing closed captioning data, you can encode the closed captioning.
  • URLs. When inserted into a stream, the user's default browser opens and the requested URL loads into the browser. If you have embedded the player within a browser, the requested URL replaces the player, and users cannot view the rest of the stream. You can GET around this either by displaying the requested URL in a separate frame in the same browser instance or by opening an additional instance of the browser.
  • Custom script commands. In addition to supporting captions and URLs, a player automatically processes FILENAME, EVENT, and OPENEVENT script commands. You can use the FILENAME command to open a specific digital media file at the time you specify. You can use the EVENT command to create custom script commands. For example, you can insert an advertisement into the stream. Note that the code for the specified event must be defined in the Windows Media metafile for the stream for the player to perform the specified event. The OPENEVENT command precedes the actual EVENT command. The OPENEVENT command allows the player to pre-buffer the content so that when the specified event occurs, the switch between streams appears to be seamless.

For detailed information about the script commands supported by Windows Media Player 9 Series, see the Windows Media Player 9 Series Software Development Kit (SDK). For information about the script commands supported by Windows Media Services 9 Series, see the Windows Media Services 9 Series SDK.

Because script commands are saved in the stream, they are not available for editing.

Inserting script commands into an encoding session requires that you select scripts as a source type when setting up your session. You cannot include scripts when you set up a session using the New Session Wizard, but you can add scripts to the session through the Source stab of the Properties panel.

top

To insert script commands while encoding

  1. On the toolbar, click Properties, and then click the Sources tab.
  2. In Source from, click Devices.

    -or-

    To insert script commands while sourcing from a file, click Both device and file.

  3. Select the Script check box, and then click Script Panel.
  4. Click Apply, and then click Start Encoding.
  5. On the Script panel, click the button for the kind of script you want to insert. You can insert a caption (text string), URL, or custom script command.
  6. Do one of the following:
    • If you are inserting a caption or URL, type the text or URL that you want to insert.
    • If you are inserting a custom script, type the script command type and value.
  7. Click Insert at the point you want to insert the script into the stream. The Total script sentry on the Monitor panel increments with each script command that you insert.
top

To encode closed captioning data

  1. On the toolbar, click Properties, and then click the Sources tab.
  2. In Source from, click Devices.
  3. Select the Script check box, and then click the name of the capture card that supports closed captioning.
  4. If you want to configure the card, click Configure.
top