Azure视频上载任务失败@“;“我的PlayReady任务”;错误:MediaProcessor:任务执行期间发生异常

Azure视频上载任务失败@“;“我的PlayReady任务”;错误:MediaProcessor:任务执行期间发生异常,azure,azure-media-services,Azure,Azure Media Services,我正在使用以下代码将DRM应用于我的视频文件。但是任务失败了,我应该怎么做才能让它工作 我可以看到“我的PlayReady任务”变为100%,突然抛出一个错误 错误详细信息: 我的游戏准备任务 MediaProcessor:任务执行期间发生异常 几天前它还在工作。不知道现在发生了什么 ********************Code sample ************************************************* private static IJob Encod

我正在使用以下代码将DRM应用于我的视频文件。但是任务失败了,我应该怎么做才能让它工作

我可以看到“我的PlayReady任务”变为100%,突然抛出一个错误

错误详细信息: 我的游戏准备任务 MediaProcessor:任务执行期间发生异常

几天前它还在工作。不知道现在发生了什么

********************Code sample *************************************************
private static IJob EncodeToAdaptiveBitrateAndConvertToSmoothAndProtect(string inputMediaFilePath, string configFilePath)
        {
            // Create asset and upload file
            IAsset asset = CreateAssestAndUploadSingleFile(AssetCreationOptions.None, inputMediaFilePath);

            // Create a new Job
            IJob job = mediaContext.Jobs.Create("Encode to multi-bitrate and convert to smooth job");


            // Create a new task to encode to Adaptive Bitrate 

            // Get a reference to the Windows Azure Media Encoder
            IMediaProcessor encoder = GetLatestMediaProcessorByName("Windows Azure Media Encoder");

            ITask adpativeBitrateTask = job.Tasks.AddNew("MP4 to Adaptive Bitrate Task",
               encoder,
               "H264 Adaptive Bitrate MP4 Set 720p",
               TaskOptions.None);

            // Specify the input Asset
            adpativeBitrateTask.InputAssets.Add(asset);

            // Add a new output Asset
            IAsset abrAsset = adpativeBitrateTask.OutputAssets.AddNew("Adaptive Bitrate Asset", AssetCreationOptions.None);


            // Create a new task to convert the Adaptive Bitrate Asset to a Smooth Streaming Asset

            // Get a reference to the Windows Azure Media Packager
            IMediaProcessor packager = GetLatestMediaProcessorByName("Windows Azure Media Packager");

            // Windows Azure Media Packager does not accept string presets, so load xml configuration
            string smoothConfig = File.ReadAllText(configFilePath);

            // Create a new Task to convert adaptive bitrate to Smooth Streaming
            ITask smoothStreamingTask = job.Tasks.AddNew("Adaptive Bitrate to Smooth Task",
               packager,
               smoothConfig,
               TaskOptions.None);

            // Specify the input Asset, which is the output Asset from the first task
            smoothStreamingTask.InputAssets.Add(abrAsset);

            // Add a new output Asset
            IAsset smoothOutputAsset = smoothStreamingTask.OutputAssets.AddNew("Smooth Asset", AssetCreationOptions.None);

            // Set up the third task to protect the Adaptive Bitrate Smooth Streaming Asset with PlayReady. 

            // Get a media encryptor reference
            IMediaProcessor playreadyProcessor = GetLatestMediaProcessorByName("Windows Azure Media Encryptor");

            // Read the configuration XML
            string configPlayReady = File.ReadAllText(configFilePathPlayReady);

            // Create a third task. 
            ITask playreadyTask = job.Tasks.AddNew("My PlayReady Task",
               playreadyProcessor,
               configPlayReady,
               TaskOptions.ProtectedConfiguration);

            // Add the input asset, which is the smooth streaming output asset from the second task. 
            playreadyTask.InputAssets.Add(smoothOutputAsset);

            // Add an output asset to contain the results of the job.
            playreadyTask.OutputAssets.AddNew("PlayReady protected output asset", AssetCreationOptions.None);

            // Use the following event handler to check job progress.  
            job.StateChanged += new EventHandler<JobStateChangedEventArgs>(StateChanged);

            // Launch the job.
            job.Submit();

            // Optionally log job details. 
            LogJobDetails(job.Id);

            // Check job execution and wait for job to finish. 
            Task progressJobTask = job.GetExecutionProgressTask(CancellationToken.None);
            progressJobTask.Wait();

            // Get a refreshed job reference after waiting on a thread.
            job = GetJob(job.Id);

            // Check for error
            if (job.State == JobState.Error)
            {
                 Console.WriteLine("\nExiting method due to job error.");
            }
            return job;

        }
*******************代码示例*************************************************
私有静态IJob编码以适应活动策略,并转换为MoothandProtect(字符串输入MediaFilePath,字符串配置FilePath)
{
//创建资产并上载文件
IAsset asset=CreateAssetStandUploadSingleFile(AssetCreationOptions.None,inputMediaFilePath);
//创建新作业
IJob job=mediaContext.Jobs.Create(“编码为多比特率并转换为平滑作业”);
//创建新任务以编码为自适应比特率
//获取对Windows Azure媒体编码器的引用
IMediProcessor encoder=GetLatestMediaProcessorByName(“Windows Azure媒体编码器”);
ITask ADPATIVEBITATETASK=job.Tasks.AddNew(“MP4到自适应比特率任务”,
编码器,
“H264自适应比特率MP4设置720p”,
任务选项(无);
//指定输入资源
ADPATIVEBITATETASK.InputAssets.Add(资产);
//添加新的输出资产
IAsset abrAsset=adpativeBitrateTask.OutputAssets.AddNew(“自适应比特率资产”,AssetCreationOptions.None);
//创建新任务以将自适应比特率资源转换为平滑流式传输资源
//获取对Windows Azure Media Packager的引用
IMediProcessor packager=GetLatestMediaProcessorByName(“Windows Azure媒体打包器”);
//Windows Azure Media Packager不接受字符串预设,因此请加载xml配置
字符串smoothConfig=File.ReadAllText(configFilePath);
//创建新任务以将自适应比特率转换为平滑流
ITask smoothStreamingTask=job.Tasks.AddNew(“平滑任务的自适应比特率”,
包装商,
smoothConfig,
任务选项(无);
//指定输入资源,它是第一个任务的输出资源
smoothStreamingTask.InputAssets.Add(abrAsset);
//添加新的输出资产
IAsset smoothOutputAsset=smoothStreamingTask.OutputAssets.AddNew(“平滑资产”,AssetCreationOptions.None);
//设置第三个任务,使用PlayReady保护自适应比特率平滑流媒体资源。
//获取媒体加密程序引用
IMedipProcessor playreadyProcessor=GetLatestMediaProcessorByName(“Windows Azure媒体加密程序”);
//读取配置XML
字符串configPlayReady=File.ReadAllText(configFilePathPlayReady);
//创建第三个任务。
ITask playreadyTask=job.Tasks.AddNew(“我的PlayReady任务”,
playreadyProcessor,
配置PlayReady,
TaskOptions.ProtectedConfiguration);
//添加输入资产,它是第二个任务的平滑流输出资产。
playreadyTask.InputAssets.Add(smoothOutputAsset);
//添加输出资源以包含作业的结果。
playreadyTask.OutputAssets.AddNew(“PlayReady受保护的输出资产”,AssetCreationOptions.None);
//使用以下事件处理程序检查作业进度。
job.StateChanged+=新事件处理程序(StateChanged);
//开始工作。
job.Submit();
//可以选择记录作业详细信息。
LogJobDetails(job.Id);
//检查作业执行情况并等待作业完成。
Task progressJobTask=job.GetExecutionProgressTask(CancellationToken.None);
progressjobstask.Wait();
//等待线程后获取刷新的作业引用。
job=GetJob(job.Id);
//检查错误
if(job.State==JobState.Error)
{
Console.WriteLine(“\n由于作业错误而初始化方法”);
}
返回工作;
}

您使用的是什么playready许可证服务器? 从代码的角度来看,一切看起来都很好。由于示例中未包含playready保护预设,我假设它看起来类似于本文中的示例:
请确保可以从公共网络访问LicensequisitionUrl中的值,并且您的keySeedValue或keyID和contentKey仍然有效。

是否有一个作业ID可以从失败的实例中共享?

您使用的是几周前工作的相同媒体文件,还是新媒体文件?尝试使用以前可用的媒体文件。我正在使用相同的媒体文件。。而且它在Azure上运行良好——即使现在平滑流式URL运行良好,只有Playready部分在达到100%后失败