Welcome to Pete Brown's 10rem.net

First time here? If you are a developer or are interested in Microsoft tools and technology, please consider subscribing to the latest posts.

You may also be interested in my blog archives, the articles section, or some of my lab projects such as the C64 emulator written in Silverlight.

(hide this)

Expression Encoder SDK Now Available

Pete Brown - 06 June 2008

This one almost slipped past me.

Lots of folks have asked about ways to automate encoding videos for Silverlight applications both on the client and on the server.

Ben Waggoner just announced that Expression Encoder 2 includes a .NET object model for automation.

The code in the SDK example looks really simple and straight-forward:

static void Main(string[] args)
{
    MediaItem mediaItem = new MediaItem(@"C:\Users\Public\Videos\Sample Videos\Bear.wmv");

    // 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);
}

I haven't tried it out yet, but it looks like it would work in both server and client scenarios as they provide a number of examples including console and wpf. If you give it a spin, let me know how it works for you.

       
posted by Pete Brown on Friday, June 6, 2008
filed under:        

11 comments for “Expression Encoder SDK Now Available”

  1. Einarsays:
    Do you know how the licensing model for the Expression Encoder is? It's not free like the Windows Media Encoder, right? So it will not enable people to use this SDK without buying one Expr. Media Encoder license per server/workstation I guess ...or am I wrong?
  2. Kevin LaChapellesays:
    Expression Encoder Express is free like Windows Media Encoder. Download the trial from http://www.microsoft.com/Expression/products/overview.aspx?key=encoder and after the trial period is over it will become Express and continue to work in a feature limited mode.
  3. Vikas kumarsays:
    I am unable to encode Live Recording (from Hardware device like Camera, Microphone, Headphone, etc.).

    And also found no any help about this topic.

    While it rund fine in the newer version of Expression Encoder editor
  4. Sergiosays:
    Hi,

    so to build an application using SDK that schedule some video sequences, video can be file (avi, wmv..ecc..ecc or streaming)...which way do Have I to follow?

    I can't add media file and streaming video to the "job"?
  5. Petesays:
    I'm looking into what it takes to license the SDK. I'll ping those folks again.

    @Mike I haven't looked into that. I have little experience with the SDK, but if it can take frames of video (as an array of bytes) and compress/stream then it should work. On the silverlight webcam side, you write a VideoSink class and wire it up to the webcam you're streaming.

    Pete

Comment on this Post

Remember me

3 trackbacks for “Expression Encoder SDK Now Available”

  1. Christopher Steensays:
    ASP.NET The difference between ID, ClientID and UniqueID [Via: Atanas Korchev ] New AJAX Control Toolkit...
  2. Community Blogssays:
    On the heels of yesterday's 17 links, there's 11 today, and at least one other hidden away. I've