提交預置模板分析作業介面,ApsaraVideo for Media Processing服務會對輸入檔案進行智能分析,推薦出適合輸入檔案的預置模板;可通過查詢範本分析作業介面得到模板分析作業結果,也可使用非同步通知機制。

说明 預置模板分析的結果只保留半個月,半個月後將被刪除,若半個月後再使用推薦的預置模板提交作業將返迴轉碼作業失敗,失敗的錯誤碼為: 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"
                }]
         }
      }
    }