• How to use the Microsoft Expression Encoder 4 player templates with Wowza Media Server

    A quick tutorial on how to use the Microsoft Expression 4 player templates with Wowza Media Server to stream live and video on demand content to the Silverlight player.

    Application Setup

    Follow the instructions in one of these tutorials based on the type of streaming (live or video on demand) and if live, type of encoder being used:

    VOD: How to set up video on demand streaming

    Live (RTMP, RTSP/RTP): How to set up live streaming using an RTMP-based encoder

    Live (MPEG-TS: How to publish and play a live stream (MPEG-TS based encoder)

    Live (Native RTP with SDP file): How to set up live streaming using a native RTP encoder with SDP file

    Live (IP Camera (RTSP/RTP re-streaming)): How to re-stream video from an IP camera (RTSP/RTP re-streaming)

    You can download a trial of the Microsoft Expression 4 encoder technology here: http://www.microsoft.com/expression. Both the Microsoft Expression Blend 4 and Microsoft Expression Web 4 products contain the Silverlight player templates. After you have one of these two products installed, the player tempaltes are located in [program-files]/Microsoft Expression/Encoder 4/Templates/[lang] (path may slightly different depending on the product you have installed) folder. For this example we will use the BlackGlass template. Here are the instructions to use this template with Wowza Media Server 2:

    1. Copy the following files to your web server (any web server will do, IIS is not required):

      BlackGlass/Default.html
      BlackGlass/MediaPlayerTemplate.xap
      BlackGlass/Preview.png
      BlackGlass/SmoothStreaming.xap
      BlackGlass/TimedTextLibrary.xap
    2. Edit Default.html and change the <Playlist> section at the bottom of the file:

      From this:
      <Playlist>
          <AutoLoad><$=AutoLoadString(TemplateParameter.LoadOptions)$></AutoLoad>
          <AutoPlay><$=AutoPlayString(TemplateParameter.LoadOptions)$></AutoPlay>
          <DisplayTimeCode><$=TemplateParameter.DisplayTimeCode.ToString().ToLower()$></DisplayTimeCode>
          <EnableOffline><$=TemplateParameter.EnableOffline.ToString().ToLower()$></EnableOffline>
          <EnablePopOut><$=TemplateParameter.EnablePopOut.ToString().ToLower()$></EnablePopOut>
      
          <EnableCaptions><$=TemplateParameter.EnableCaptions.ToString().ToLower()$></EnableCaptions>
          <EnableCachedComposition><$=TemplateParameter.EnableCachedComposition.ToString().ToLower()$></EnableCachedComposition>
          <StretchNonSquarePixels><$=StretchNonSquarePixelsString(TemplateParameter.StretchNonSquarePixels)$></StretchNonSquarePixels>
          <StartMuted><$=TemplateParameter.Muted.ToString().ToLower()$></StartMuted>
      
          <StartWithPlaylistShowing><$=TemplateParameter.StartWithPlaylistShowing.ToString().ToLower()$></StartWithPlaylistShowing>
      
      
          <Items>
      	<$=PlayListParam(TemplateParameter.AllowedCodecs)$>
          </Items>
      </Playlist>'/>
      To this:
      <Playlist>
          <AutoLoad>false</AutoLoad>
          <AutoPlay>false</AutoPlay>
          <DisplayTimeCode>false</DisplayTimeCode>
          <EnableOffline>true</EnableOffline>
          <EnablePopOut>true</EnablePopOut>
      
          <EnableCaptions>true</EnableCaptions>
          <EnableCachedComposition>true</EnableCachedComposition>
          <StretchNonSquarePixels>NoStretch</StretchNonSquarePixels>
          <StartMuted>false</StartMuted>
      
          <StartWithPlaylistShowing>false</StartWithPlaylistShowing>
      
      
          <Items>
      
      					<PlaylistItem>
      						<AudioCodec>WmaProfessional</AudioCodec>
      						<Description></Description>
      						<FileSize>40349346</FileSize>
      						<IsAdaptiveStreaming>true</IsAdaptiveStreaming>
      						<MediaSource>http://[wowza-ip-address]:1935/vod/smil:sample.mp4/Manifest</MediaSource>
      						<ThumbSource></ThumbSource>
      						<Title>sample</Title>
      						<DRM>false</DRM>
      						<VideoCodec>H264</VideoCodec>
      						<FrameRate>29.9700898503294</FrameRate>
      						<Width>568</Width>
      						<Height>320</Height>
      						<AspectRatioWidth>16</AspectRatioWidth>
      						<AspectRatioHeight>9</AspectRatioHeight>
      					</PlaylistItem>
          </Items>
      </Playlist>'/>
      Where [wowza-ip-address] is the ip address of the server running Wowza Media Server.


    If you're having problems or want to discuss this article, post in our forum.