Google's acquisition of YouTube.com, an online video streaming
site is an apt example of where the Internet is moving towards. Blog is the
latest hype, but that is going to change very soon. The bandwidth cost is
coming down a lot day by day. Microsoft announcement of Silverlight technology
is a great boon to all developers who are internet savvy. I was a great fan of
Adobe Flash player. Now I can use Silverlight media controls to stream video
files. As an added bonus, Microsoft Silverlight Streaming by Windows live
provides us up to 4GB of FREE hosting space. In this article I will show you
how we can host a media file using Silverlight controls at Windows Live. Once a
media file is hosted, we can invoke the media file from any other web page. If
you have a blog, you can show the media file from your blog. Your website's
bandwidth is not used. Sounds interesting! Let us dive deep.

2) Click File -> Import and then select the media file
that you want to stream.

3) On the settings tab, choose the Video format. You may
want to select a format which is less than or equal to 700 Kbps. This is due to
the fact that, video files hosted at Silverlight Streaming should be less than
or equal to 700 Kbps. You have to follow some other criteria as well.

a) Video file must be smaller than 22mb.

b) Run time for any video file should be shorter than 10
minutes.

4) On the Output tab, choose the Template that you want to
use to stream your video. When you choose a pre-defined template, Media Encoder
will automatically provide you with all controls that are usually found in a
Windows Media Player (such as Play button, Pause button, slider control, volume
control, file download progress bar control, etc).

As per the above example, to stream the video file,
"BabyShower.wmv" from Silverlight.live.com, we have to follow some
rules.

A) The first rule is to create a file called
"manifest.xml." The manifest.xml file describes the application to
the hosting service. It is like a mediator. In the above screen shot, you can
see around 14 files. We only need 7 files plus the manifest.xml. Those seven
files are all .js files except the Silverlight.js, player.xaml and the .WMV
file. The XML file should look like listing 1.

F) Click the "Manage Applications" link and then
click "Upload a Silverlight Application."

G) Provide an "Application Name" and upload the
zip file that you created in step (C).

Now you have hosted a Silverlight application at Silverlight
streaming. You can stream the video from any other web page no matter where it
is hosted. After you have uploaded the zip file, you will get a screen similar
to the following.

Figure 4

As per the above instructions, all you have to do is to
include the following code in your web page.

Now that you have seen how to host a video file at Silverlight
streaming account, I will show you an example of how to have a common web page
which will have hyperlinks to all video files hosted in your Silverlight
streaming account. This way, you can share all your video files using one
common web page. Let me assume you have hosted 5 video files using the
techniques that you have seen so far in this article.

In the above code I have used a custom JavaScript function
named, "showVideo." You guessed it right; the function is defined
inside the "CreateSilverlight.js" file. The content of the Create
Silverlight file will look like Listing 5.

What I have done above is a very simple tweak from the code
that we got after we uploaded the zip file. I created an argument for the
method, CreteSilverlight called intID. The value of intID is passed by the
showVideo function. Again, the argument for the showVideo function is being
passed by the webpage which shows the video names with hyperlinks. So, if you
want to add a new video, all you have to do is add another row in the web page
with a different argument to the ShowVideo function. Also, you will have to
add another if statement inside the CreateSilverlight function which actually
initiates the video streaming.

Hope you enjoyed the new way of streaming video files
through the latest Silverlight technology from Microsoft. Silverlight is still
in beta and we have so much restriction on the video file size that we can
stream and also on the video bit rate quality. As per the current standards,
the video running time for a single video cannot exceed 10 minutes. We can
overcome this by splitting our video into multiple video files and playing video
file one after the other. I have another article which talks about how to play
video files which run more then 10 minutes. Until then, keep your fingers
crossed!