You are currently browsing the monthly archive for July 2009.
The latest release of Expression Encoder 3.0 is almost ready to ship and has a lot of great enhancements including new presets for H.264, full control of the H.264 encoding parameters, a new Screen Capture tool (which looks fantastic!) and a new object model API that include support for Live Encoding.
James Clarke provides a great overview of the new features in this blog post.
To check out the Screen Capture tool in action, check out Keith Comb’s HD Screencast demo post here.
Today I wanted to check out the new API, particularly the new sample PowerShell 2.0 module that James built out to put into the SDK.
You can locate the new sample PowerShell cmdlet in the Samples directory of the SDK : C:\Program Files (x86)\Microsoft Expression\Encoder 3\SDK\Samples\EncoderPowerShellModule.
The sample comes as a Visual Studio C# project that you need to compile. I converted the project to a VS 2010 solution and then compiled it quickly without any issues.
Note that there is a post-build script that is run to copy the output into your WindowsPowershell modules folder – watch out for that if you have Powershell configured in a non-default way.
I created a folder called ExpressionEncoder in my Modules folder under WindowsPowershell and deployed the ExpressionEncoder.dll into that folder.
The big trick if you are running on Windows 7 RC x64, you have to launch the PowerShell (x86) version and not the x64 version or you will get an error message that the Microsoft.Expression.Encoder assembly can’t be found. That is due to the fact that it is a 32 bit assembly and it can’t be loaded from the x64 version of PowerShell 2.0.
Once you switch over to the x86 version of PowerShell 2.0, you can edit your $profile, and add the following line to it.
Now you can do something like the following to batch convert a folder of media to a specific profile template:
ls ‘C:\users\Public\Videos\Samples’ | Convert-Media -VC1IISSmoothStreamingSD480pVBR -TemplateBlackGlass -Output $home\desktop
This example runs all files in a folder through the Zune HD Profile for H.264 and outputs it to a directory.
Once the encoding is kicked off, you will see the progress in your PowerShell console. It will display the current clip, progress percentage, the current pass and a progress bar will be displayed as well.
Now, you can get more complex and write some very handy PowerShell scripts to generate media in your own workflows! I love Powershell, and I’m looking forward to using this a lot in my own work.