如何使用REST API进行视频拼接? [英] How can I do video stitching using REST APIs?
问题描述
我正在尝试使用v2 REST API进行视频拼接,基于此.NET示例:
I am trying to use a v2 REST API to do video stitching, based on this .NET example:
我理解请求正文应如下所示:
I understand the request body should look like this:
"任务":[
    {
      "配置":?????,
&NBSP; &NBSP; &NBSP; ""MediaProcessorId":"< uuid for Standard Media Processor",< b $ b &NBSP; &NBSP; &NBSP; ""TaskBody":"<?xml version = \" 1.0 \" encoding = \" utf-8 \"?>< taskBody>
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < inputAsset> JobInputAsset(0)< / inputAsset>
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < inputAsset> JobInputAsset(1)< / inputAsset>
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < outputAsset> JobOutputAsset(0)< / outputAsset>< / taskBody>"
&NBSP; &NBSP; }¥b $ b ]
"Tasks":[
{
"Configuration": ?????,
"MediaProcessorId": "<uuid for Standard Media Processor",
"TaskBody":"<?xml version=\"1.0\" encoding=\"utf-8\"?><taskBody>
<inputAsset>JobInputAsset(0)</inputAsset>
<inputAsset>JobInputAsset(1)</inputAsset>
<outputAsset>JobOutputAsset(0)</outputAsset></taskBody>"
}
]
虽然如何传入预设但我很困惑。 我知道我必须把它作为"配置"传递给我。属性,所以我只设置"配置"从.NET示例中预设的JSON?
I am confused though how to pass in the preset. I understand I have to pass it as "Configuration" property, so do I just set "Configuration" to the preset JSON from the .NET example?
推荐答案
Anna,
您是否已使用
this < a>试图编码单个输入视频的文章?如果没有,我建议这样做是为了熟悉提交编码任务。
Have you already tested with this article to try and encode a single input video? If not, I would recommend doing that in order to get familiar with submitting encode tasks.
一旦你这样做,执行拼接所需的更新应该是:
Once you have done so, the updates needed to perform stitching ought to be:
a。更新 " InputMediaAssets"
:[] 条目列出两个资产ID
a. Update the "InputMediaAssets" : [] entry to list the two Asset IDs
b。在
" Configuration" :"Adaptive Streaming",将"Adaptive Streaming"替换为"Adaptive Streaming"。使用预设的JSON来自 he
.NET示例
b. In "Configuration" : "Adaptive Streaming", replace "Adaptive Streaming" with the preset JSON from the .NET sample
< taskBody>你已经创建了以上看起来正确。
The <taskBody> you have created above looks right.
希望这会有所帮助!
这篇关于如何使用REST API进行视频拼接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!