0
我正在使用Azure媒體服務與asp.net c#應用程序來連接資產中的媒體剪輯併爲此創建新作業。獲取RequestEntityTooLarge例外
當我連接10個或更少的剪輯合併成單個剪輯(我正在創建來自發布在Azure上的Feed的高光,持續時間爲1分鐘的不同點)。它工作正常,我得到一個完美的剪輯合併之後。
當我增加沒有。的剪輯超過10,我得到了job.submit()方法的異常(RequestEntityTooLarge)。以下是我的代碼。
public string LaunchJobs_OneJobPerInputAsset_OneTaskPerfConfig(CloudMediaContext _context, IMediaProcessor processor, List<IAsset> selectedassets, string jobname, int jobpriority, string taskname, string outputassetname, List<ClipConfig> configuration, AssetCreationOptions myAssetCreationOptions, TaskOptions myTaskOptions, string storageaccountname = "")
{
string assetJobId = "";
string tasknameloc = "";
int count = 0;
outputAssetsList = new List<IAsset>();
// a job per asset, one task per config
foreach (IAsset asset in selectedassets)
{
string jobnameloc = jobname.Replace(Constants.NameconvInputasset, asset.Name);
IJob myJob = _context.Jobs.Create(jobnameloc, jobpriority);
_contextGlobal = _context;
foreach (var config in configuration)
{
if (config.PublishUrl.Contains(asset.Locators.SingleOrDefault().Path))
{
tasknameloc = taskname.Replace(Constants.NameconvInputasset, asset.Name).Replace(Constants.NameconvAMEpreset, config.Configuration);
ITask myTask = myJob.Tasks.AddNew(
tasknameloc,
processor,
config.Configuration,
myTaskOptions);
myTask.InputAssets.Add(asset);
// Add an output asset to contain the results of the task
string outputassetnameloc = outputassetname.Replace(Constants.NameconvInputasset, asset.Name).Replace(Constants.NameconvAMEpreset, config.Configuration);
outputassetnameloc = outputassetnameloc + '_' + count;
if (storageaccountname == "")
{
myTask.OutputAssets.AddNew(outputassetnameloc, asset.StorageAccountName, myAssetCreationOptions); // let's use the same storage account than the input asset
}
else
{
myTask.OutputAssets.AddNew(outputassetnameloc, storageaccountname, myAssetCreationOptions);
}
outputAsssetDetailforConcatenate.Add(new ClipConfig { Name = outputassetnameloc, StartTime = config.StartTime, Duration = config.Duration });
count++;
}
else
{
continue;
}
}
// Submit the job and wait until it is completed.
bool Error = false;
try
{
myJob.StateChanged += new EventHandler<JobStateChangedEventArgs>(JobStateChanged);
myJob.Submit();// I am getting exception in this line if the no. of clips are greater then 10.
myJob.GetExecutionProgressTask(CancellationToken.None);
outputAssetsList.AddRange(myJob.OutputMediaAssets);
// Call function to update status in session
SetStatusValueInSession("Clip generation job has submitted.");
assetJobId = myJob.Id;
}
catch (Exception ex)
{
// Add useful information to the exception
Error = true;
}
if (Error)
{
assetJobId = "There is error in job process.";
}
}
return assetJobId;
}
是否有任何限制連接只有10個剪輯或有任何設置,以增加no。 Azure媒體服務中的素材片段?