Time for action – preparing a video to use it in Silverlight
Now, we are going to use Expression Encoder to convert the video from an AVI format
to an HD 720p Intranet (High Definition, 1280X720 pixels) encoding profile, compatible
with Silverlight 3:
- Save or copy the original video file (introduction_HD.avi) in a new folder
- Start Expression Encoder.
- Select File | New Job.
- Now, select File | Import…. Browse to the folder that holds the video file (C:\
Silverlight3D\Invaders3D\Media) and select the file introduction_
HD.avito import. Then, click on Open. Expression Encoder will analyze the file for a
few seconds and then, the first frame for the video will appear on the preview area.
- Expand Profile and select HD 720p Intranet from the Video combo box. This step
defines the desired video profile for the encoding process. The Video Profile options
will display the output video’s width, height, and aspect ratio, among other
parameter values, as shown in the following screenshot:
- Click on the Output tab, expand Job output and click on the Browse for output
folder button (…) on the right side of the Directory text box. Browse to the folder
that holds the original video file (C:\Silverlight3D\Invaders3D\Media)
and click on OK.
- Select File | Encode or click on the Encode button. Expression Blend will
begin the encoding job and will display the overall progress as shown in the
- After a few seconds (depending on the video length, resolution, and format),
Expression Blend will show Ready in the Status column.
- Right-click on the item (C:\Silverlight3D\Invaders3D\Media\
introduction_HD.avi) under Media Content and select Open File Location
in the context menu that appears. A new Explorer window will appear
showing the folder with a new sub-folder with the default user name as a
prefix, the date and the time. Enter this sub-folder and move the new video
file (introduction_HD.wmv) to the previously mentioned parent folder.
- Double-click on the new video file (introduction_HD.wmv) and watch
it using your default media player (Windows Media Player or VLC Media
Player, among others). Check whether the video quality, resolution, and
reproduction are as good as expected, as shown in the following screenshot:
What just happened?
You used Expression Blend to encode the original AVI video into a WMV (Windows Media
Video) with an HD 720p Intranet encoding profile. Now, the video has a 1280X720 pixels
resolution and it is compatible with Silverlight 3.
In this case, we created a video prepared for an application that runs on the
Intranet because we want to test the game. However, we will have to choose
a different encoding profile according to the Internet bandwidth off ered by
the hosting service and the average download speed available for the game's
potential players. The steps to encode the video using a different profile are the
same as the ones used in the previously explained procedure. The only step that
changes is the one in which we select the desired encoding profile.