Working in the Script Commands panel
In the Script Commands panel, you can add both captions and other script commands. The Script Commands panel works best if your requirements fall into the following scenarios:
You want to add captions to your media and would like to export the captions either as an XML file or as a DXFP file. A DXFP file is an external file that contains the captions, and to which the media file links.
You have an existing Windows Media file that contains captions or script commands and you want to add additional captions or script commands, or you want to edit them in Microsoft Expression Encoder.
You want to add script commands that may trigger the video, as it plays back, to start an action at a specific time, such as opening a web page when your video reaches a specific frame during playback.
When you add script commands to your video, the Timeline expands to show you the locations of the commands. Each command type appears in its own row. For example, all captions have markers in a single row. If you enter a script command that instructs the video to open a URL on playback, this command will appear in another row. This method of display is a good way to visually track, and adjust the location of, every caption or command in your video. This overview of your interactive elements can be very effective in precisely organizing the message or effect of your video, and can help you sharply refine the timing and presentation of many different elements.
You can add captions at any chosen frame in the Timeline, and then encode your video. During playback, when the specified frame appears, your caption is displayed.
The Script Commands category displaying added script commands
To add captions or other script commands
In a Transcoding Project or Silverlight Project, click the Metadata tab on the right side of the application. If you can't see the Metadata tab, on the View menu, click Metadata.
On the Metadata tab, click the arrow next to Script Commands to expand the options.
On the Timeline, drag the playhead to the point in the video where you want to add a script command.
In the Script Commands category, click Add . The Timeline expands to reveal the marker in its own row at the playhead location.
Do either of the following:
In the Type column, add a command type. If you want to create a caption, type caption. If you want to export your caption as a DFXP file, you must type caption, subtitle, or description in the box. Expression Encoder will export captions only when you use one of those three type names. If you want to enter a script command, just type the name of the command. You can type a maximum of 1,023 characters for this value. Each different type of script command that you create will appear in its own row underneath the Timeline.
In the Command column, type the command. If you are creating captions, type the caption that you want to display. During playback, the caption will be displayed until playback reaches another marker, or until the end of the video. You can type a maximum of 10,239 characters for this value.
On the Save script commands in menu, click the location where you want Expression Encoder to save your commands. This specifies whether you want to embed the captions or commands in the file header or in the bit stream. If you want to export your captions or commands to a separate file, see the procedure "To export captions and script commands," later in this topic.
You must now encode your video in order to view your captions. How you view the captions depends on whether you chose to use a Microsoft Silverlight template. To view your captions in your encoded projects, do one of the following:
If you encode the video using a Silverlight template, choose a VC-1 or IIS Smooth Streaming codec, and select the Show captions during playback template option, you will see the captions when you play back the file. For more information about setting template options, see Set Silverlight template options.
If you did not encode the video using a Silverlight template, you will have to activate the caption display in the playback application that you use. Consult the Help file for your playback application for information about enabling caption display for that application.
For more information about encoding, see Encoding your media.
To adjust the position of captions or script commands on the Timeline
Do any of the following:
To change the time that a command appears, in the Timeline, drag the marker corresponding to that command.
In the Script Commands category (in the Metadata panel), locate the marker that you want to adjust. In the Time column, click the value and type a new one.
In the Script Commands category (in the Metadata panel), select the row that corresponds to the marker that you want to move. On the Timeline, drag the playhead to a new time. Then, in the Script Commands panel, click Update Time .
To import a script
In an open job, click the Metadata tab on the right side of the application. If you can't see the Metadata tab, on the View menu, click Metadata.
On the Metadata tab, click the arrow next to Script Commands to expand the options.
On the Script command options menu , click Import. Browse to a script file, and then click Open.
To delete script commands
- In the Script Commands category (in the Metadata panel), locate the command that you want to delete, and then click Remove script command.
To export captions and script commands
- On the Script commands options menu , click Export to export your captions or script commands as an XML file. Browse to the location where you want to save the file, and then click Save.
See also
Tasks
Captioning in a Live Broadcasting Project
Concepts
Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.