Welcome to MSDN Blogs Sign in | Join | Help

Back in October, we announced a new Microsoft video delivery technology called IIS Smooth Streaming.  In a nutshell, this approach combines both client (based on Silverlight) and server (based on IIS) components that, together, deliver scalable media experiences up to 720p+ over the internet using the plain old HTTP protocol.

We have had a preview of the technology running over at http://www.smoothhd.com courtesy of our CDN partner, Akamai.  We also added support for encoding to, and previewing, the new format in back in Expression Encoder 2 SP1.

Today we are announcing beta availability of the IIS Smooth Streaming component completing the picture and enable users to test the technology end to end..  You can download the extension over on the IIS Site.

There will also be a number of talks on all aspects of Smooth Streaming at MIX (including one I’m doing on encoding).. keep an eye on https://content.visitmix.com/2009/sessions/?categories=Media for more info. 

For more information and background on the technology check out the following links :

John Bocharov

I’ve seen the future and the future is… Smooth!

Smooth Streaming Questions- We’ve Got Answers!

Alex Zambelli

Smooth Streaming Architecture

The Birth of Smooth Streaming

A Brief History of Multi-Bitrate Streaming

SmoothMBRCalc

James Clarke (me :-) )

Inside Expression Encoder’s MediaPlayer control part 3: Smooth Streaming playback heuristics (coming soon)

Inside Expression Encoder’s MediaPlayer control part 2: Debugging IIS Smooth Streaming client code

Inside Expression Encoder’s MediaPlayer control part 1

We just released an update to the Silverlight Streaming publishing plugin to support the Silverlight 2 templates that were added in Expression Encoder 2 SP1.

You can get it from the Download Center here.

image

image We’ve just released an update to the SDK, which now incorporates the new features in Expression Encoder 2 Service Pack 1.

Here are the main things that are new in the SDK :-

  • We’ve improved the formatting of the help file so things are hopefully a little easier to read.

  • We have a new updated object model layout diagram.

  • New files to give updated Intellisense comments.

  • Some new samples in Visual Basic.

  • Added ASF indexing support. For more information, see AsfIndexer in the Programming
    Reference.
  • A new Mode property, EncoderSku, which gives more accurate SKU information than Mode.IsExpress.

  • A new MediaItem property, FileOutputMode, which you can use to select ASF MBR as well as "Adaptive Smooth Streaming" output modes.

  • Enhancements to how output files are generated and accessed.

  • New audio overlay functionality for MediaItem.

  • Two new AAC base profiles for AudioProfiles.

  • Two new H.264 base profiles for VideoProfiles.

  • A new AdaptiveStreaming profile for both AudioProfiles and VideoProfiles.

  • A new VideoProfile profile, VideoProfileMbrDeltaCollection, which you can use to customize MBR and/or AdaptiveStreaming output streams.

  • A new default resize mode of SuperSampling instead of Bicubic.

    Here’s the link to download the updated SDK.

    http://www.microsoft.com/downloads/details.aspx?FamilyId=9A077A3D-58CE-454C-B486-153F0578BE4A&displaylang=en

  • SP1 has just gone live here:

    http://www.microsoft.com/downloads/details.aspx?FamilyId=A29BE9F9-29E1-4E70-BF67-02D87D3E556E&displaylang=en

    In addition to the enhancements that are documented in this post, the update includes support for the authoring of IIS Smooth Streaming content.

    Note that the authoring of both IIS Smooth Streaming and H.264 for devices are only available in the full product, not the trial.  The remainder of the features such as audio overlays and WebDAV publishing are available both in the trial and the full product.

    Today we are announcing:

    • IIS Smooth Streaming, a new adaptive streaming technology evolved from work done for the web distribution NBC Olympics.
    • Akamai is launching a preview of a new service called “Akamai AdaptiveEdge Streaming for Microsoft Silverlight” that will enable HD video experiences on the web (see http://www.smoothHD.com for more info).

    As part of the announcement we will be shipping support for IIS Smooth Streaming in Expression Encoder 2 SP1 including the ability to simultaneously encode to multiple bitrates required to enable an adaptive streaming scheme, support for outputting to the new file format as well as support for the format in our Silverlight 2 player skins.

    In simple terms, adaptive streaming is an approach that enables video playback to adapt, in real time, to changing network conditions and PC load and be able to offer the appropriate bitrate at any particular instant.  The IIS Smooth Streaming implementation offers various optimizations that make deployment and management of such a scheme simpler and more cost effective.  IIS Smooth Streaming will be an upcoming feature of the IIS Media Pack.

    Expression Encoder 2 SP1 will be available real soon now.. when it drops, we’ll be following up with more info on the new features and how to create IIS Smooth Streaming content.  In the meantime you can check out the demos over at http://www.smoothHD.com.

    Since the release of Expression Encoder 2 back in May of this year, we’ve been hard at work on new features. Today we are announcing Expression Encoder 2 SP1, which we plan to release by the end of the year as a free upgrade to Expression Encoder 2. There are a wide variety of enhancements across many areas of the product in this release and you’ll find a comprehensive list below. The three top-line features are: Silverlight 2 templates, H.264 support and WebDAV publishing available out of the box. Additionally, and consistent with a service pack release, we’ve fixed a decent number of bugs.

    Silverlight 2 Player Templates

    Our SIlverlight Player templates provide a quick and easy way to get a Silverlight video experience created including rich functionality such as DVD style chapter navigation, subtitles and metadata. With the advent of Silverlight 2, the first Silverlight release to including the .NET CLR, we have completely rewritten our player from the ground up.

    MediaPlayer control

    For starters, we’ve made a Silverlight 2 custom control called MediaPlayer. This is a core component shared by all of our new templates. It is completely customizable via our integrated “Edit in Blend”, just like the Silverlight 2 intrinsic controls.

    image

    Some of the new properties of the player include

    • Utilization of Silverlight 2 controls e.g. buttons, sliders that can be independently styled
    • Use of the Visual State Manager to enable declarative states e.g. for fullscreen mode
    • Adaptive layout for better resizing
    • Playlist support in all players (including metadata display)
    • Byte-range seeking: When a user clicks forward on the timeline into a non-downloaded region, the player will cancel the current progressive download and start a new one from the point that has been seeked to.

    You can use the MediaPlayer control outside of our player templates simply by referencing the project (source code included in the box). It is quick and easy to get up and running in XAML. Reference the control and instantiate thus:

    image

    When editing in Blend, rich UI is available for editing properties (e.g. playlists as shown here:)

    image

    Finally, we’ve removed all of the complex JavaScript needed to invoke the player from an HTML page; this is now accomplished with a simple <object/> tag.

    H.264 encoding for devices

    Since we shipped our V1 release, we’ve heard loud and clear from customers that they’d like more output formats than just VC-1. One of the most common scenarios that kept cropping up is content producers that are embracing Silverlight for web video but also wish to make the content available as a Podcast for devices.

    We are therefore happy to announce that, starting with V2 SP1, we are adding H.264/AAC encoding to the product. For this release we are supporting two device profiles: a baseline 320x240 for smaller flash memory based devices and a 640x480 profile for larger screen resolutions.

    Since it has been announced that Silverlight is going to support H.264 you can expect us to broaden our encoding support for the format in the future.

    A/B compare enhancements

    Band mode allows you to drag out a number of bands (as many or as few as you need) to better discern the difference between original and encoded videos. As before, you can play back in the mode and rotate the bands through 90 degrees.

    image

    Diff Mode plots the degree of difference of the source vs encoded as a luminance map. If the encoded clip is identical to the source, its difference would be rendered all black (this can be inverted by double-clicking).

    image

    Audio Overlays

    Audio overlays work just like video overlays only they now enable you to overlay an audio track complete with relative level and fade in / out.

    They also enable a workflow for adding an external audio track to a mute video source and outputting a muxed A/V output.

    We’ve also enabled the audio from a video overlay to be enabled / mixed in if desired.

    WebDAV publishing in the box

    Publish to IIS, Sharepoint and other servers that support the WebDAV protocol.

    image

    Bug fixes / minor features

    There is a reasonably large list of small fixes that have gone into this release, many too minor to mention. The following are the more noteworthy:

    · Copy/paste markers and script commands: e.g. to/from Excel

    · Cancelling multi-file encode no longer deletes completed items

    · Removing items from jobs no longer deletes output

    · Enhanced trimming of overlays (from front, drag middle)

    · Run encode as background priority: so you can still use your machine for other tasks. Controllable via a setting

    · Mouse wheel support for zooming, mouse pan support

    · Enhanced Warning Triangles

    · Better default for cropping output. E.g. If you have a 16:9 video that only had 4:3 video inside it, if you choose 4:3 output and select crop, we’ll automatically crop out the correct portion in the middle.

    · Edit in Visual Studio option for templates

    · Couple of additional VC-1 advanced encoding properties

    · We now index unindex WMV/ASF files

    · Source Mode stream copying will now work even for cases where we don’t support the source CODEC as an output type in our UI e.g. WMScreen

    So there we have it. As always, feedback gratefully received,

    Hope this helps

    The Expression Encoder Team

    In case you missed this press release, we just announced that H.264 support is coming to both Silverlight and Expression Encoder.

    Later this week, at the International Broadcasting Conference (IBC) 2008 in Amsterdam, Microsoft Corp. will demonstrate an important new capability for Silverlight - playback of H.264-based video. H264 is a standard video specification that delivers high-definition video over a variety of delivery channels. During the event, Microsoft will also highlight how customers in Europe are reaping the benefits of adopting Silverlight.

    At IBC 2008 we will be demonstrating a technology preview of H.264 video and Advanced Audio Coding (AAC) audio playback support in Silverlight, and H.264 authoring using Microsoft Expression Encoder and Windows Server 2008 for delivery. Until now, Silverlight has supported the SMPTE VC-1 and Windows Media formats, as well as MP3 for audio, enabling customers to take advantage of broad support across the Windows Media ecosystem, including third-party tools, service providers and content delivery networks.

    We’ll be talking more about the next release of Expression Encoder at Streaming Media West 2008 in a couple of weeks time.

    We've just released an update to Expression Encoder 2 that allows VB.NET developers to build solutions using the Expression Encoder 2 SDK

    You can get the update here:

    http://www.microsoft.com/downloads/details.aspx?FamilyId=8727DD51-61B3-4692-ABDE-4FDD2779B0D0&displaylang=en

    The cool part is that the update is only required on developer machines.  Any apps created in VB.NET on a machine with the fix will run against the unmodified Expression Encoder 2 release bits.

    Hope this helps

    James

    A XAML overlay is a vector-based graphic that is rendered into the users video like a lower third, a logo bug, etc...  XAML is Extensible Application Markup Language and is a declarative XML-based language created by Microsoft which is used to initialize structured values and objects.  Below are examples of XAML overlays.

    james2smily_face

    The goal of the this walk through is to allow you to be able to understand how to get your XAML design from Expression Design into Expression Encoder. 

    To create a XAML overlay start by creating your graphic in Microsoft Expression Design or importing a design into Microsoft Expression Design.

    After finishing your design you need to make the XAML overlay you created digestible by Microsoft Expression Blend (if you want to animate it) by completing the following steps using Microsoft Expression Design.

    Select All

    File>Export

    Export as XAML WPF Canvas(Take note of where you save this file)

    Silverlight XAML is not supported

    export

    At this point you can use the XAML overlay as a static graphic overlay in Microsoft Expression Encoder.

     

    If you wish to animate the overlay follow these instructions.

    Open Microsoft Expression Blend

    Create a new project a WPF Application (.exe)

    image

    In the project panel right click on csproj file and Link to Existing Item…

    image

    Navigate to the XAML file you created in Microsoft Expression Design and Double click on the XAML file in the project tab

    image

    This will open up the XAML file that you created in Microsoft Expression Design and open it in Microsoft Expression Blend.

    At this point you should be able to animate the XAML.

    Add a new storyboard then add your animation key frames to create your animation.

    image

    Then navigate to the file menu and select save and your animated XAML overlay is ready for Microsoft Expression Encoder.

    In Microsoft Expression Encoder add overlay and navigate to original Microsoft Expression Design XAML file from design and add this file as an overlay.  After adding the overlay you can customize length visible, fade in, and fade out.  On the video window you can scale the graphic and place it in the desired position. Since it is vector-based, the quality of text and graphical elements will be maintained.

    image image

    Now that Expression Encoder 2 has been released, the team is hard at work on the next version of the product.
    We want to be as responsive to community feedback as possible, and would like to set up a panel of customers with whom we can have ongoing conversations.

    What is the Customer Panel?

    The Customer Panel is a way for us to build strong relationships with users of our product. We'll use it as a way to understand your needs, workflows as well as how you use the product. We'll also use it to float future feature ideas and get feedback on them

    What is the time requirement?

    The Customer Panel is an ongoing project. The overall impact should be minimal and if at any point you no longer want to participate, just tell us. Typically we'll aim to reach out the Panel every couple of months or so. There may some times when we reach out more frequently.

    How is this different to a Technology Adoption Program (TAP)?

    TAPs are for specific releases and focus on getting you pre-releases of the software to play with. We'll use the same framework for the Customer Panel, but it is longer lived and goes beyond a particular release. This is an opportunity to have lasting impact on product direction.

    OK sign me up!

    If you want to take part, please send me an email by clicking here.

    I'm pleased to announced that we just pushed a preview of the SLS publishing plugin for Expression Encoder 2 live:

    http://download.microsoft.com/download/2/2/a/22a8da23-ffa7-4e5a-8fed-8239d3a7b322/SLSPlugin for Expression Encoder 2.msi

    This plugin makes it very easy to publish and manage your encoded Silverlight video experiences online via the Silverlight Streaming service from within the Expression Encoder application.

    As well as adding support for Expression Encoder 2, the plugin has a number of enhancements:

    1. File-by-file upload:  Removes the zip step and improves uploaded reliability and performance.
    2. Better upload progress reporting.
    3. Quota display that shows available/remaining online storage space.
    4. Support for application republishing: you can replace or merge existing applications.
      image
    5. UI enhancements (eg resizable preview window, application list sorted in inverse date order etc).

    Hope this helps,

    James

    image

    AVCHD (Advanced Video Codec High Definition) is a file format commonly used by the latest generation of consumer HD camcorders. It consists of an AC-3 audio stream and an AVC (H.264) video stream encapsulated into a custom MPEG2 transport stream container.

    While Expression Encoder 2 does not natively support that file type, it is possible to use them if the right components are installed. More specifically, three DirectShow components are required:

    1. A MPEG2-TS splitter that supports the AVCHD variant.
    2. An AVC (H.264) decoder.
    3. An AC-3 decoder.

    After installing those 3 components, you should be able to playback the M2TS files directly in Windows Media Player as well as importing and using them within Expression Encoder 2.

    Also, David Sayed posted a very nice and detailed article on one of the multiple ways to get Expression Encoder 2 to support AVCHD files: http://blogs.msdn.com/david_sayed/archive/2008/05/31/avchd-recipe-for-expression-encoder-2.aspx

    But if you own a Sony or Canon camcorder, you can also take advantage of the DirectShow filters that shipped with the bundled software.

     

    Sony AVCHD Camcorders (SR, CX, UX and TG series)

    Sony camcorder users: Sony Picture Motion Browser comes with a MPEG2-TS splitter and an AVC decoder. To use them in Expression Encoder 2, simply register sjvtdl.ax and SMParse.ax found in “C:\Program Files\Sony\Sony Picture Utility\Shared4” by following those steps:

    1. Press the Start button, select “All Programs” and “Accessories” and right-click on “Command Prompt”.
    2. In the context menu, select “Run as administrator”.
    3. Click on the "Continue" button when the "User Access Control" appears. A command prompt window will appear.
    4. In the command prompt, type: regsvr32 “C:\Program Files\Sony\Sony Picture Utility\Shared4\sjvtdl.ax”
    5. Repeat step #3 with SMParse.ax
    6. Close the command prompt.

    Note: You will still need an AC-3 decoder to decode the audio.

    M2TS files should now be playable via Windows Media Player and can be imported in Expression Encoder 2.

     

    Canon AVCHD Camcorders (HG10, HF10/100)

    Canon Pixela ImageMixer 3 SE registers all the required DirectShow components required by Expression Encoder upon it's installation.

     

    Usage in Expression Encoder 2

    To import the MTS or M2TS files in Expression Encoder, simply select "All Fles (*.*)" in the file picker in the import dialog. Then select the wanted MTS and M2TS files. The files will be treated like any other video files.

    Known Expression Encoder 2 limitations:

    1. Expression Encoder doesn't currently support 6 channel authoring, so DD5.1 audio will be downsampled to stereo.
    2. Only deinterlaced encoding operations are currently supported.

     

    We are hoping to further enhance the AVCHD workflow in future versions of Expression Encoder.

     

    Last week we released the Expression Encoder 2 SDK. Here's a little video of Charles and I, giving a quick introduction. Apologies for the rather close camera angle as Charles was just holding the camera with his left hand, and it didn't help that our makeup and wardrobe department was out that day.

    You can get it from the following location.

    Microsoft® Expression® Encoder 2 SDK

    Please try it out and don't hesitate to send us your feedback.

    21 Comments
    Filed under:

    This post is an update to the previous Getting started with the Expression Encoder Object Model post, but updated to work with the RTM version of Expression Encoder V2 as the progress event handler changed a little from Beta to RTM.

    (This post assume you’ve already installed Expression Encoder V2 available from here, and that you have Visual Studio 2005 or 2008 installed.)

    First of all start Visual Studio and select File… New Project… You can choose which type of application you would prefer, like a WPF or Windows Forms application. For my test here, I’m just going to choose a Console Application. Give it a suitable name.

    image

    Go ahead and click OK.

    Before you can start coding against the Expression Encoder object model you need to add references to the applicable assemblies. Select Project…Add Reference from the menu. When the dialog comes up you need to select

    Microsoft.Expression.Encoder
    Microsoft.Expression.Encoder.Types
    Microsoft.Expression.Encoder.Utilites

    and because some of our types derive from ObservableCollection you also need to select

    WindowsBase.

    You can select them one at a time or hold down CTRL and multi-select each one before clicking OK.

    image

    Now we're ready to do some coding.

    To make it easier to pick up the Encoder classes let's first of all add a using statement. Just add the following near the top of the file where the other using statements are.

    using Microsoft.Expression.Encoder;

    One of the main classes that you'll end up dealing with in Expression Encoder is the MediaItem class. This allows you to find out information about a video or audio file and ultimately allow you to encode it. To create one of these you just pass the filename of the media file you want.to the constructor.

    e.g.
    MediaItem mediaItem = new MediaItem(@"C:\input\video.avi");

    Obviously, you'll change the filename to the one you want to use.

    Once this has been created you'll be able to access a bunch of information about the file

    e.g.
    FileDuration
    OriginalAspectRatio
    OriginalVideoSize

    This is also the way you'll control how the video is encoded. If you type mediaItem followed by a "." you should trigger the Intellisense drop down which shows you all the properties and methods on this item. You should see a lot of properties that correspond to options in the UI of the main Encoder application. If you want Intellisense comments to appear and want to check out the help file, see this post.

    For now we'll just use the defaults.

    Before we can encode the file we need to create and add it to a Job.

    This is simply done by the following statements.

    Job job = new Job();
    job.MediaItems.Add(mediaItem);

    If you want to encode multiple files in the same job you can go ahead and create multiple MediaItem's and add them to the job.

    Before you encode you need to set the directory where the output will go. This is done by setting the OutputDirectory property.

    job.OutputDirectory = @"C:\output";

    By default Expression Encoder will create output in sub folders named using the Job Id. These will be something along the lines of your machine name followed by the current date and time, e.g. "DEAN 4-21-2008 11.00.47 PM".

    You can turn this feature off by setting the CreateSubfolder property.

    job.CreateSubfolder = false;

    Then the output will be created in the output directory directly.

    For the simplest case, that’s all you need before encoding the job. This is done by just calling the Encode method.

    job.Encode();

    Putting it all together your program should look something like this.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.Expression.Encoder;
    
    namespace MyEncoderApplication
    {
        class Program
        {
            static void Main(string[] args)
            {
                MediaItem mediaItem = new MediaItem(@"C:\input\video.avi");


    // Create a job and the media item for the video we wish // to encode.
    Job job = new Job(); job.MediaItems.Add(mediaItem);
                // Set the output directory and encode
                job.OutputDirectory = @"C:\output";
                job.Encode();
            }
        }
    }

    Now you should be able to compile and run the application. After it's finished running, you should have the encoded output file underneath the output directory. It should have a filename that matches the original, but with a .wmv file extension.

    If you run the application and it crashes, then that is probably because an exception was thrown that is not currently being caught. For example if your MediaItem points to a file that doesn't exist or isn't a valid media file, you will see that an InvalidMediaFileException is thrown. You can then run it under the debugger to get more details.

    Assuming everything worked OK then for your next step you'll probably want to show some progress during the encode. First of all you need to a add a progress event handler function. Something like the following

    static void OnProgress(object sender, EncodeProgressEventArgs e)
    {
        Console.WriteLine(e.Progress);
    }
    

    Obviously here we're just dumping the progress to the screen on each line. If you were writing a GUI app you would probably update a progress bar or something similar.

    To tell Encoder to call this function you need the following line when you're creating the job.

    job.EncodeProgress 
        += new EventHandler<EncodeProgressEventArgs>(OnProgress);
    

    Now you’re code should look something like the following.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.Expression.Encoder;
    
    namespace MyEncoderApplication
    {
        class Program
        {
            static void Main(string[] args)
            {
                MediaItem mediaItem = new MediaItem(@"C:\input\video.avi");
    
                // Create a job and the media item for the video we wish
                // to encode.
                Job job = new Job();
                job.MediaItems.Add(mediaItem);
    
                // Set up the progress callback function
                job.EncodeProgress 
                    += new EventHandler<EncodeProgressEventArgs>(OnProgress);
    
                // Set the output directory and encode.
                job.OutputDirectory = @"C:\output";
                
                job.Encode();
            }
    
            static void OnProgress(object sender, EncodeProgressEventArgs e)
            {
                Console.WriteLine(e.Progress);
            }
        }
    }
    
    

    When you compile and run the application you should now see a bunch of numeric values going to 100, something like the following.

    clip_image002

    That’s it for a basic encoding app. From here you can now try experimenting with various properties on the MediaItem. For example, if you want to try tweaking the output profile, you can look at this post – Changing the output profile.

    Note that if you’re running a 64-bit OS then you may also need to change your Target Platform within Visual Studio from “Any CPU” to "x86” as Expression Encoder is 32-bit.

    11 Comments
    Filed under:

    We're busy working on a more official SDK and some samples that use the Expression Encoder object model, but in the meantime here's a link to a zip file that contains a couple of XML files that will enable Intellisense comments and a CHM help file.

    ExpressionEncoderOM.zip

     (UPDATE: I've also added the file as an attachment to this post in case the server that contains the first link isn't up).

    Once you've installed Expression Encoder 2 and downloaded and extracted the zip file, copy the two XML files to your "\Program Files\Microsoft Expression\Encoder 2\SDK" directory. The next time you create or load a project that uses the object model you should get descriptions for the methods and properties like below.

    Intellisense

    The CHM file is a help file that was actually built from the source code using Sandcastle. If you open the file and it just says "Navigation to the webpage was canceled" in the right pane you need to "Unblock" the file first. Right click the CHM file, select Properties and on the General tab click the Unblock button near the bottom right. Now reopen the file and everything should be fine.

    Help

    Hope you find these useful and let us know if you have any questions.

    3 Comments
    Filed under:

    Attachment(s): ExpressionEncoderOM.zip
    More Posts Next page »
     
    Page view tracker