从 Azure 媒体编码器迁移到 Media Encoder StandardMigrate from Azure Media Encoder to Media Encoder Standard

媒体服务徽标media services logo


本文介绍了从旧 Azure 媒体编码器 (AME) 媒体处理器(即将停用)迁移到 Media Encoder Standard 媒体处理器的步骤。This article discusses the steps for migrating from the legacy Azure Media Encoder (AME) media processor (which is being retired) to the Media Encoder Standard media processor. 有关停用日期,请参阅此旧组件主题。For the retirement dates, see this legacy components topic.

使用 AME 对文件进行编码时,客户通常使用了命名预设字符串,如 H264 Adaptive Bitrate MP4 Set 1080pWhen encoding files with AME, customers typically used a named preset string such as H264 Adaptive Bitrate MP4 Set 1080p. 为了进行迁移,需要更新代码以使用 Media Encoder Standard 媒体处理器而不是 AME,以及一个等效的系统预设(如 H264 Multiple Bitrate 1080p)。In order to migrate, your code needs to be updated to use the Media Encoder Standard media processor instead of AME, and one of the equivalent system presets like H264 Multiple Bitrate 1080p.

迁移到 Media Encoder StandardMigrating to Media Encoder Standard

下面是使用旧媒体处理器的典型 C# 代码示例。Here is a typical C# code sample that uses the legacy media processor.

// Declare a new job. 
IJob job = _context.Jobs.Create("AME Job"); 
// Get a media processor reference, and pass to it the name of the  
// processor to use for the specific task. 
IMediaProcessor processor = GetLatestMediaProcessorByName("Azure Media Encoder"); 

// Create a task with the encoding details, using a string preset. 
// In this case " H264 Adaptive Bitrate MP4 Set 1080p" preset is used. 
ITask task = job.Tasks.AddNew("My encoding task", 
    processor, 
    " H264 Adaptive Bitrate MP4 Set 1080p", 
    TaskOptions.None); 

下面是使用 Media Encoder Standard 的已更新版本。Here is the updated version that uses Media Encoder Standard.

// Declare a new job. 
IJob job = _context.Jobs.Create("Media Encoder Standard Job"); 
// Get a media processor reference, and pass to it the name of the  
// processor to use for the specific task. 
IMediaProcessor processor = GetLatestMediaProcessorByName("Media Encoder Standard"); 

// Create a task with the encoding details, using a string preset. 
// In this case " H264 Multiple Bitrate 1080p" preset is used. 
ITask task = job.Tasks.AddNew("My encoding task", 
    processor, 
    "H264 Multiple Bitrate 1080p", 
    TaskOptions.None); 

高级方案Advanced scenarios

如果已使用 AME 的架构为 AME 创建了自己的编码预设,则会有一个用于 Media Encoder Standard 的等效架构If you had created your own encoding preset for AME using its schema, there is an equivalent schema for Media Encoder Standard. 如果你对如何将旧设置映射到新编码器有疑问,请通过 amshelp@microsoft.com 与我们联系If you have questions on how to map the older settings to the new encoder, please reach out to us via amshelp@microsoft.com

已知差异Known differences

与旧的 AME 编码器相比,Media Encoder Standard 更强大、更可靠、性能更好且输出质量更好。Media Encoder Standard is more robust, reliable, has better performance, and produces better quality output than the legacy AME encoder. 此外:In addition:

后续步骤Next steps