3D Game Development with Microsoft Silverlight 3

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:

  1. Save or copy the original video file (introduction_HD.avi) in a new folder
  2. Start Expression Encoder.
  3. Select File | New Job.
  4. 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.
  5. 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:
  6. Click on the Output tab, expand Job output and click on the Browse for output
    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.
  7. 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
    following screenshot:
  8. After a few seconds (depending on the video length, resolution, and format),
    Expression Blend will show Ready in the Status column.
  9. 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.
  10. 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
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.

Pages: 1 2 3 4 5

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Share This

Share this post with your friends!