edit-icon download-icon

SubmitAnalysisJob

Last Updated: Feb 06, 2018

Description

When you submit a file to the preset template analysis job interface, the MPS will intelligently analyze the input file to recommend a preset template suitable for the input file; the template analysis job result may be obtained through the “Query Template Analysis Job” interface, or the asynchronous notification mechanism.

Note:The result of the preset template analysis is only retained for half a month and will be deleted after this two-week period. If the job is submitted again using the recommended template preset more than half a month later, the transcoding job will fail. The failed error code is: AnalysisResultNotFound.

Request parameter

Name Type Required or not Description
Action String Yes Operation interface name, system-defined parameter, value:SubmitAnalysisJob
Input String Yes Input, Json Object:
{"Bucket":"example-bucket", "Location":"oss-cn-hangzhou", "Object":"example.flv"}
You need to grant this Bucket read permission to the MPS on the Bucket Authorization page in the console’s Resource Control Channel.
Priority String No The task’s transcoding priority within its corresponding pipe, in the range of [1-10]. Set to 6 by default,10 is the highest priority.
UserData String No User-defined data, the maximum length is 1,024 bytes.
PipelineId String Yes The pipe ID, if asynchronous notification is required, ensure that this pipe is bound to the available message subject.

Return parameters

Name Type Description
AnalysisJob AliyunAnalysisJob System Preset Template Analysis Job

Example

Request example

  1. 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<Public parameters>

Return example

XML

  1. <SubmitAnalysisJobResponse>
  2. <RequestId>25818875-5F78-4A13-BEF6-D7393642CA58</RequestId>
  3. <AnalysisJob>
  4. <Id>88c6ca184c0e47098a5b665e2a126797</Id>
  5. <InputFile>
  6. <Bucket>example-bucket</Bucket>
  7. <Location>oss-cn-hangzhou</Location>
  8. <Object>example.flv</Object>
  9. </InputFile>
  10. <AnalysisConfig>
  11. <QualityControl>
  12. <RateQuality>25</RateQuality>
  13. <MethodStreaming>network</MethodStreaming>
  14. </QualityControl>
  15. </AnalysisConfig>
  16. <UserData>testid-001</UserData>
  17. <State>Success</State>
  18. <TemplateList list="true">
  19. <Template>
  20. <Id>S00000000-000020</Id>
  21. <Name>FLV-UD</Name>
  22. <Container>
  23. <Format>flv</Format>
  24. </Container>
  25. <Video>
  26. <Codec>Auto</Codec>
  27. <Profile>Auto</Profile>
  28. <Bitrate>Auto</Bitrate>
  29. <Crf>Auto</Crf>
  30. <Width>Auto</Width>
  31. <Height>Auto</Height>
  32. <Fps>Auto</Fps>
  33. <Gop>Auto</Gop>
  34. </Video>
  35. <Audio>
  36. <Codec>Auto</Codec>
  37. <Samplerate>Auto</Samplerate>
  38. <Bitrate>Auto</Bitrate>
  39. <Channels>Auto</Channels>
  40. </Audio>
  41. <State>Normal</State>
  42. </Template >
  43. </TemplateList>
  44. <Code> </Code>
  45. <Message> </Message>
  46. <Percent>100</Percent>
  47. <CreationTime>2014-01-10T12:00:00Z</CreationTime>
  48. <PipelineId>88c6ca184c0e47098a5b665e2a126797</PipelineId>
  49. </AnalysisJob>
  50. </SubmitAnalysisJobResponse>

JSON

  1. {
  2. "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
  3. "AnalysisJob": {
  4. "Id": "88c6ca184c0e47098a5b665e2a126797",
  5. "InputFile": {
  6. "Bucket": "example-bucket",
  7. "Location": "oss-cn-hangzhou",
  8. "Object": "example.flv"
  9. },
  10. "AnalysisConfig": {
  11. "QualityControl": {
  12. "RateQuality": 25,
  13. "MethodStreaming": "network"
  14. }
  15. },
  16. "UserData":"testid-001",
  17. "State": "Success",
  18. "Code": "",
  19. "Message": "",
  20. "Percent": 100,
  21. "PipelineId": "88c6ca184c0e47098a5b665e2a126797",
  22. "CreationTime”:”2014-01-10T12:00:00Z",
  23. "TemplateList": {
  24. "Template": [{
  25. "Id": "S00000000-000020",
  26. "Name": "FLV-UD",
  27. "Container": {
  28. "Format": "flv"
  29. },
  30. "Video": {
  31. "Codec": "Auto",
  32. "Profile": "Auto",
  33. "Bitrate": "Auto",
  34. "Crf": "Auto",
  35. "Width": "Auto",
  36. "Height": "Auto",
  37. "Fps": "Auto",
  38. "Gop": "Auto"
  39. },
  40. "Audio": {
  41. "Codec": "AAC",
  42. "Samplerate": "44100",
  43. "Bitrate": "Auto",
  44. "Channels": "Auto"
  45. },
  46. "State": "Normal"
  47. }]
  48. }
  49. }
  50. }
Thank you! We've received your feedback.