RIA Development Center
FeaturesTipsEventsVideosSilverlight GallerySilverlight Hosting Resources
Brad Abrams gives a brief overview of what Microsoft .NET RIA Services is and how it's going to make your life simpler. Read more
See more tips
Which platform do you use most often?
(Check one)
AIR
AJAX
Flash
JavaFX
Silverlight
Other

View Results
Get regular email alerts when we publish new features!
DevX RIA Development Update

More Newsletters
Silverlight Streaming: Free Video Hosting for All (cont'd)

Using Expression Encoder 2
My next step was to use Expression® Encoder® 2 to encode this file for hosting on Silverlight Streaming. The purpose of Expression Encoder is to compress a video file to its smallest possible size given the constraints of its intended distribution channel—web, CD, DVD, LAN or iPod/Zune. Since there is a tradeoff between file size and image quality, a video file intended for use in a Silverlight web application will normally use greater compression even at a cost of image quality in order to provide the best overall user experience.

Expression Encoder is also capable of editing a video file to add or delete segments, as well as to add titles, pre-roll and post-roll advertising and captions. Since most users will also want to control the video (Play, Pause, Seek, Fast Forward, Reverse), Expression Encoder includes a collection of "Templates" representing various styles and designs of playback controls. This collection of templates is extensible so if you prefer to create your own design, it's easy to do so.

While it is possible to preview all of the included templates directly in Expression Encoder itself, I found the images of each player to be too small to properly evaluate, so I have posted screenshots of each one on my blog. Also included are links to live samples (delivered from the Silverlight Streaming server, obviously).

Figure 2. A sample of playback controls

The range of settings available in Expression Encoder is very extensive and can be quite intimidating to anyone with only minimal (or non-existent) video editing experience. Expression Encoder uses a collection of presets—termed "profiles"— to cover most scenarios. For Silverlight web applications the principal choices of profiles take into account two key factors: (1) the anticipated connection speed of projected users (on a scale from dialup to broadband) and (2) the simplicity or complexity of the video content (on a scale from screencast to a fast paced sporting event).

For slower connection speeds, Expression Encoder uses a higher compression algorithm. If the video content is almost entirely either simple content such as a screencast or complex content such as a sporting event, a Constant Bit Rate (CBR) encoding is generally recommended. On the other hand, if the video consists of a mixture of simple and complex content, a Variable Bit Rate (VBR) encoding is typically preferred.

Below is a table which shows the names of six profiles which apply to different combinations of these parameters. For example, from this table you can see that the maximum speed CBR is called "Streaming Broadband" and the slowest speed VBR is called "Web Server 256 K DSL".

Table 1. Expression Encoder Profiles for Constant Bit Rate and Variable Bit Rate Encoder

Table 2 illustrates the results of encoding my first Camtasia video. It shows for each profile, both the estimated and actual file sizes, along with the actual time required for encoding. In addition to the six profiles shown in the first table, this table includes the Screen Encoding profile which was explicitly designed to cover screencasts.

Table 2. Example file sizes and encoding times for Expression Encoder

You can view the results of each process by choosing the appropriate link:



Streaming
Broadband

Streaming
512 K DSL

Streaming
256 K DSL

Web Server
Broadband

Web Server
512 K DSL

Web Server
256 K DSL

Screen
Encoding

Previous Page: Silverlight Application for Deployment Next Page: Publishing Plugin for Expression Encoder 2
Page 1: Silverlight Application for Deployment Page 3: Publishing Plugin for Expression Encoder 2
Page 2: Using Expression Encoder 2 
Rate This Content:
Low     High
5 after 7 ratings