About captions and script commands
With Microsoft Expression Encoder, you can add script commands to encoded media. You can import a script file in the formats .xml, .sami, .smi, or .dxfp, and add script commands to the imported commands. Alternatively, without importing a script file, you can manually add the script commands to the file. All your imported and added script commands appear in separate rows underneath the Timeline, and aligned with the time that they were implemented, so that you can easily distinguish your script events from your other Timeline markers. When you are ready to encode, you can choose to either embed these commands in the header or insert them into the stream. Inserting them into the stream may reduce incompatibilities; if you have a large number of script commands, putting them in the header may exceed character limits. You can also export the modified script as an XML file.
Script commands are best suited for interactivity and responding to events in the playback script. These commands are pairs of Unicode strings synchronized with a particular time in the multimedia stream. The first string identifies the type of command being sent, and the second specifies the command to process. During playback, when the stream reaches the time associated with a command, the control sends a script command event to the web page that contains it. An event-handling routine then responds to this event.
You can also use script commands to specify locations in a digital media file where you want to insert an event trigger. For instance, when a digital media file reaches a specified script command location, you can call a method to run a function, such as to display a web page, or to display captions and subtitles.
The Script Commands category in the Metadata panel is perfectly suited for adding captions to your videos, which is the most common use of this category. 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. Alternatively, you can import pre-written captions. Once you have imported the captions, you can add more, and modify the existing ones in the Script Commands category.
For information about how to create captions, see Add captions and other script commands.
Both Windows Media Player and Microsoft Silverlight packages can display captions. In Silverlight, by default, your caption appears without your performing any additional action. In Windows Media Player, you have to enable the Lyrics, Captions, and Subtitles feature to see your caption. See the Windows Media Player Help for more information.
Captioning is not currently supported in the Korean and Japanese languages.