Generate a template

Expression Studio 4.0

Generating a Microsoft Silverlight template is the essential part of the workflow when you create live broadcasts that you want encased in a Silverlight player. When you generate a Silverlight template for your live broadcast, you are creating all the files necessary to play back media using a Silverlight template. Generating a template creates a .xap file and a default.html file. A .xap file contains an application manifest (AppManifest.xaml) file and all the necessary resources that the template requires. The default.html file hosts the media player in a web page. Generating a template is equivalent to choosing and encoding with a Silverlight template in a Transcoding Project or a Silverlight Project. Microsoft Expression Encoder creates the same files when encoding from these projects that it creates when you choose to generate a Silverlight template. You have the option of generating your template for playback on the server by specifying a publishing point and entering pertinent WebDAV information, or you can choose to generate your template for local storage to facilitate local broadcasting.

Expression Encoder includes several Silverlight templates, however you will be able to access others in the gallery as they become available.

If you chose to generate your template to a server, then you can also preview it from the server that you generated to.


You can only generate a template if you choose a Streaming option (Broadcast or Publishing Point) as an output type. You cannot generate a template if you chose only File Archive as an output type. For more information on output types, see Set the Broadcast stream options.

Caution noteWarning

If you are planning to broadcast using Silverlight templates, they will not work if you are streaming to a Streaming Media Services publishing point and have set either WMS Negotiate Authentication or WMS Digest Authentication on the publish point.

To generate a Silverlight template for live broadcasting

  1. Make sure that you have chosen and configured a Streaming output option, either Broadcast or Publishing Point. Access the Streaming options on the Output tab. For more information on choosing Output options in a Live Broadcasting project, see Set the Broadcast stream options.

  2. Choose an encoding option from the Encode tab or add a preset. For more information on choosing output formats, see Set Audio options and Set Video options. For more information on setting presets, see Apply presets.

  3. Click the Templates tab. If the Templates tab is not visible, then, on the Window menu, click Templates.

  4. In the templates menu, choose a template. To access other Silverlight templates, click Get more templates online.

  5. Click Generate.

  6. The Output type menu displays the streaming option that you selected in the Output tab. You can change this option only from the Output tab. Regardless which streaming option that you choose, you can still generate your template either locally or on a server.

  7. Do one of the following:

    • To generate a template to your local hard drive, select Generate template locally and, in the Directory box, enter the location where you want to save the template.

    • To publish your template, select Publish template to server using WebDAV. Set the options according to the following descriptions:

      • Server URL   Type or select the location of the server to which you want to publish your media.

      • Directory Name   Type the name of the directory to which you want to publish the folder or file. To upload the entire folder and not just a single file, select the Use job output folder check box.

      • Authentication   Select the authentication that you want to use. Select Anonymous to allow any user to upload files to a server without using a user name or password. Select Basic  to require that a user specify a user name and password before files can be uploaded to a server. Basic authentication sends the user name and password as unencrypted text. Select Digest  to require that a user specify a user name and password before files can be uploaded to a server. Digest authentication applies a digest algorithm (a form of encryption) to the user name and password before sending them to the server. Select Windows to use the credentials cached on the Windows client computer to validate the user's permissions on the server.

      • Username   Select or type the user name that you want to use.

      • Password   Type the password that you want to use. To save the password, click Save Password. To show the password as text, click Show Password.

      • Authenticate   Click this to validate your credentials on the server.

  8. Click Generate. Expression Encoder creates the template files in the location that you specified. If you chose a publishing point, the files also include an html file that specifies the server location of the publishing point. In addition, if you specified an IIS Streaming server as your publishing point location, and are not creating a VC-1 output stream, then Expression Encoder will also generate an html file called "m2ts.html" that contains an HTML5 video tag that allows users to access the HTML file to play back your broadcast on Apple mobile devices. To accomplish playback on Apple mobile devices, you must enable that capability in the IIS Manager on the streaming server. For more information see the IIS Live Smooth Streaming site Gg602439.xtlink_newWindow(en-us,Expression.40).png.

  9. (Optional) If you want to generate another template for another output type, repeat steps 6 to 8.

  10. Click Finish to close the Generate Template dialog box. If you change any of your output options after you have generated the template, you will need to regenerate it by repeating all of the previous steps.

  11. You can view how your broadcast will look in the template that you chose by clicking Preview. For more information on previewing your template, see Preview a Silverlight template.

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.

Community Additions