提交预置模板分析作业接口,媒体处理服务会对输入文件进行智能分析,推荐出适合输入文件的预置模板;可通过查询模板分析作业接口得到模板分析作业结果,也可使用异步通知机制。

说明 预置模板分析的结果只保留半个月,半个月后将被删除,若半个月后再使用推荐的预置模板提交作业将返回转码作业失败,失败的错误码为: AnalysisResultNotFound

请求参数

名称 类型 是否必须 描述
Action String 操作接口名,系统规定参数,取值:SubmitAnalysisJob
Input String 输入,Json对象:{"Bucket":"example-bucket","Location":"oss-cn-hangzhou","Object":"example.flv"}需在控制台中资源控制频道里的Bucket授权页面授予此Bucket读权限给媒体转码服务。
Priority String 任务在其对应管道内的转码优先级。
  • u取值范围:[1-10]
  • 10为最高优先级。
  • 默认值:6
UserData String 用户自定义数据。

最大长度1024个字节

PipelineId String 管道ID。

若需要异步通知,须保证此管道绑定了可用的消息主题

返回参数

名称 类型 描述
AnalysisJob AliyunAnalysisJob 系统预置模板分析作业

示例

请求示例
http://mts.cn-hangzhou.aliyuncs.com/?Action=SubmitAnalysisJob&Input=%7B%22Bucket%22%3A%22example-bucket%22%2C%22Location%22%3A%22oss-cn-hangzhou%22%2C%0A%22Object%22%3A%22example.flv%22%7D%7D<公共参数>

返回示例

XML
<SubmitAnalysisJobResponse>
        <RequestId>25818875-5F78-4A13-BEF6-D7393642CA58</RequestId>
        <AnalysisJob>
            <Id>88c6ca184c0e47098a5b665e2a126797</Id>
            <InputFile>
               <Bucket>example-bucket</Bucket>
               <Location>oss-cn-hangzhou</Location>
               <Object>example.flv</Object>
            </InputFile>
            <AnalysisConfig>
                <QualityControl>
                    <RateQuality>25</RateQuality>
                    <MethodStreaming>network</MethodStreaming>
                </QualityControl>
            </AnalysisConfig>
            <UserData>testid-001</UserData>
            <State>Success</State>
            <TemplateList list="true">
                <Template>
                    <Id>S00000000-000020</Id>
                    <Name>FLV-UD</Name>
                    <Container>
                        <Format>flv</Format>
                    </Container>
                    <Video>
                        <Codec>Auto</Codec>
                        <Profile>Auto</Profile>
                        <Bitrate>Auto</Bitrate>
                        <Crf>Auto</Crf>
                        <Width>Auto</Width>
                        <Height>Auto</Height>
                        <Fps>Auto</Fps>
                        <Gop>Auto</Gop>
                    </Video>
                    <Audio>
                        <Codec>Auto</Codec>
                        <Samplerate>Auto</Samplerate>
                        <Bitrate>Auto</Bitrate>
                        <Channels>Auto</Channels>
                    </Audio>
                    <State>Normal</State>
                </Template >
            </TemplateList>
            <Code> </Code>
            <Message> </Message>
            <Percent>100</Percent>
            <CreationTime>2014-01-10T12:00:00Z</CreationTime>
            <PipelineId>88c6ca184c0e47098a5b665e2a126797</PipelineId>
        </AnalysisJob>
    </SubmitAnalysisJobResponse>
JSON
{
     "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
     "AnalysisJob": {
         "Id": "88c6ca184c0e47098a5b665e2a126797",
         "InputFile": {
                 "Bucket": "example-bucket",
                 "Location": "oss-cn-hangzhou",
                 "Object": "example.flv"
         },
         "AnalysisConfig": {
                "QualityControl": {
                    "RateQuality": 25,
                    "MethodStreaming": "network"
                }
         },
         "UserData":"testid-001",
         "State": "Success",
         "Code": "",
         "Message": "",
         "Percent": 100,
         "PipelineId": "88c6ca184c0e47098a5b665e2a126797",
         "CreationTime”:”2014-01-10T12:00:00Z",
         "TemplateList": {
            "Template": [{
                "Id": "S00000000-000020",
                "Name": "FLV-UD",
                "Container": {
                    "Format": "flv"
                    },
                "Video": {
                    "Codec": "Auto",
                    "Profile": "Auto",
                    "Bitrate": "Auto",
                    "Crf": "Auto",
                    "Width": "Auto",
                    "Height": "Auto",
                    "Fps": "Auto",
                    "Gop": "Auto"
                    },
                "Audio": {
                    "Codec": "AAC",
                    "Samplerate": "44100",
                    "Bitrate": "Auto",
                    "Channels": "Auto"
                    },
                "State": "Normal"
                }]
         }
      }
    }