I am using the Expression Encoder SDK to encode .avi and Flash files to a .wmv format suitable for Silverlight. By default, EE encodes files with audio using the the WMA PRO codec. If you are running Windows Server 2003, this is a problem as it doesn't support the WMA PRO codec and produces and error message similar to the following.
Error Message: The Audio Profile settings do not match a valid system profile.
Error Source: Microsoft.Expression.Encoder
Error Target Site: System.String GetProfileString()
I am looking for a way to change the default audio codec to something suitable for WS 2003.
I am aware that although not supported natively, there is a highly invasive way to install Windows Media Player 11 and it's codecs on WS 2003 but this involves registry tinkering and other hacks not suitable for our production environments so that solution is out.
Found an answer after a a lot of tinkering not much out there for documentation on the Encoder SDK. To change the codec using the SDK:
Encoder.MediaItem itemToTranscode = new Encoder.MediaItem(srcPath); itemToTranscode.OutputFormat.AudioProfile.Codec = AudioCodec.Wma;
This works fine with Windows Server 2003 and solves the issue.