阅读807 返回首页    go 阿里云


提交媒体信息作业__媒体信息接口_API使用手册_媒体转码-阿里云

描述

提交媒体信息作业接口,媒体转码服务会对输入文件进行媒体信息分析,同步返回输入文件的媒体信息;可通过”查询媒体信息作业”接口得到媒体信息分析结果。

请求参数

名称 类型 必填项 描述
Action String 操作接口名,系统规定参数,取值:SubmitMediaInfoJob
Input String 作业输入,Json对象,例如:
{
"Bucket":"example-bucket",
"Location":"oss-cn-hangzhou",
"Object":"example.flv"
}
需在控制台授予此Bucket权限给媒体转码服务。
UserData String 用户自定义数据,最大长度1024个字节。

返回参数

名称 类型 描述
MediaInfoJob AliyunMediaInfoJob 媒体信息作业

示例

请求示例

  1. https://mts.aliyuncs.com/?Action=SubmitMediaInfoJob&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%0A&PipelineId=88c6ca184c0e47098a5b665e2a126797<公共参数>

返回示例

XML:

  1. <SubmitMediaInfoJobResponse>
  2. <RequestId>25818875-5F78-4A13-BEF6-D7393642CA58</RequestId>
  3. <MediaInfoJob>
  4. <JobId>88c6ca184c0e47098a5b665e2a126797</JobId>
  5. <Input>
  6. <Bucket>example-bucket</Bucket>
  7. <Location>oss-cn-hangzhou</Location>
  8. <Object>example.flv</Object>
  9. </Input>
  10. <UserData>testid-001</UserData>
  11. <State>Analyzing</State>
  12. <Properties>
  13. <Streams>
  14. <VideoStreamList>
  15. <VideoStream>
  16. <Index>1</Index>
  17. <CodecName>h264</CodecName>
  18. <CodecLongName>H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10</CodecLongName>
  19. <Profile>High</Profile>
  20. <CodecTimeBase>1001/48000</CodecTimeBase>
  21. <CodecTagString>[0][0][0][0]</CodecTagString>
  22. <CodecTag>0x0000</CodecTag>
  23. <Width>1920</Width>
  24. <Height>1080</Height>
  25. <HasBFrames>1</HasBFrames>
  26. <Sar>1:1</Sar>
  27. <Dar>16:9</Dar>
  28. <PixFmt>yuv420p</PixFmt>
  29. <Level>41</Level>
  30. <Fps>25</Fps>
  31. <AvgFPS>24000/1001</AvgFPS>
  32. <Timebase>1/1000</Timebase>
  33. <StartTime>0.042000</StartTime>
  34. <Duration>100</Duration>
  35. <Bitrate>30541090</Bitrate>
  36. <NumFrames>100</NumFrames>
  37. <Lang>eng</Lang>
  38. <NetworkCost>
  39. <PreloadTime>8</PreloadTime>
  40. <CostBandwidth>10</CostBandwidth>
  41. <AvgBitrate>300.34</AvgBitrate>
  42. </NetworkCost>
  43. </aliyun_video_stream>
  44. </VideoStreamList>
  45. <AudioStreamList>
  46. <AudioStream>
  47. <Index>1</Index>
  48. <CodecName>dca</CodecName>
  49. <CodecTimeBase>1/48000</CodecTimeBase>
  50. <CodecLongName>DCA (DTS Coherent Acoustics)</CodecLongName>
  51. <CodecTagString>[0][0][0][0]</CodecTagString>
  52. <CodecTag>0x0000</CodecTag>
  53. <SampleFmt>fltp</SampleFmt>
  54. <Samplerate>48000</Samplerate>
  55. <Channels>2</Channels>
  56. <ChannelLayout>5.1(side)</ChannelLayout>
  57. <Timebase>1/1000</Timebase>
  58. <StartTime>0.042000</StartTime>
  59. <Duration>123</Duration>
  60. <Bitrate>1536000</Bitrate>
  61. <NumFrames>123</NumFrames>
  62. <Lang>eng</Lang>
  63. </aliyun_audio_stream>
  64. </AudioStreamList>
  65. <SubtitleStreamList>
  66. <SubtitleStream>
  67. <Index>3</Index>
  68. <Lang>eng</Lang>
  69. </aliyun_subtitle_stream>
  70. </SubtitleStreamList>
  71. </Streams>
  72. <Format>
  73. <NumStreams>1</NumStreams>
  74. <NumPrograms>2</NumPrograms>
  75. <FormatName>matroska,webm</FormatName>
  76. <FormatLongName>Matroska / WebM</FormatLongName>
  77. <StartTime>0.042000</StartTime>
  78. <Duration>17.600000</Duration>
  79. <Size>70569598</Size>
  80. <Bitrate>32077090</Bitrate>
  81. </Format>
  82. </Properties>
  83. <Code> </Code>
  84. <Message> </Message>
  85. <PipelineId>88c6ca184c0e47098a5b665e2a126797</PipelineId>
  86. <CreationTime>2014-01-10T12:00:00Z</CreationTime>
  87. </MediaInfoJob>
  88. </SubmitMediaInfoJobResponse>

Json:

  1. {
  2. "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
  3. "MediaInfoJob": [{
  4. "JobId": "88c6ca184c0e47098a5b665e2a126797",
  5. "Input": {
  6. "Bucket": "example-bucket",
  7. "Location": "oss-cn-hangzhou",
  8. "Object": "example.flv"
  9. },
  10. "Properties":{
  11. "Streams":{
  12. "VideoStreamList":{
  13. "VideoStream":[
  14. {
  15. "Index":"1",
  16. "CodecName":"h264",
  17. "CodecLongName":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
  18. "Profile":"High",
  19. "CodecTimeBase":"1001/48000",
  20. "CodecTagString":"[0][0][0][0]",
  21. "CodecTag":"0x0000",
  22. "Width":"1920",
  23. "Height":"1080",
  24. "HasBFrames":"1",
  25. "Sar":"1:1",
  26. "Dar":"16:9",
  27. "PixFmt":"yuv420p",
  28. "Level":"41",
  29. "Fps":"25",
  30. "AvgFPS":"24000/1001",
  31. "Timebase":"1/1000",
  32. "StartTime":"0.042000",
  33. "Duration":"100",
  34. "Bitrate":"30541090",
  35. "NumFrames":"100",
  36. "Lang":"eng",
  37. "NetworkCost":{
  38. "PreloadTime":"8",
  39. "CostBandwidth":"10",
  40. "AvgBitrate":"300.34"
  41. }
  42. }]
  43. },
  44. "AudioStreamList":{
  45. "AudioStream":[
  46. {
  47. "Index":"1",
  48. "CodecName":"dca",
  49. "CodecTimeBase":"1/48000",
  50. "CodecLongName":"DCA (DTS Coherent Acoustics)",
  51. "CodecTagString":"[0][0][0][0]",
  52. "CodecTag":"0x0000",
  53. "SampleFmt":"fltp",
  54. "Samplerate":"48000",
  55. "Channels":"2",
  56. "ChannelLayout":"5.1(side)",
  57. "Timebase":"1/1000",
  58. "StartTime":"0.042000",
  59. "Duration":"123",
  60. "Bitrate":"1536000",
  61. "NumFrames":"123",
  62. "Lang":"eng"
  63. }
  64. ]},
  65. "SubtitleStreamList":{
  66. "SubtitleStream":[
  67. {
  68. "Index":"3",
  69. "Lang":"eng"
  70. }
  71. ]},
  72. "Format":{
  73. "NumStreams":"1",
  74. "NumPrograms":"2",
  75. "FormatName":"matroska,webm",
  76. "FormatLongName":"Matroska / WebM",
  77. "StartTime":"0.042000",
  78. "Duration":"17.600000",
  79. "Size":"70569598",
  80. "Bitrate":"32077090"},
  81. "UserData":"testid-001",
  82. "State": "Analyzing",
  83. "Code": "",
  84. "Message": "",
  85. "PipelineId": "88c6ca184c0e47098a5b665e2a126797",
  86. "CreationTime”:”2014-01-10T12:00:00Z"
  87. }
  88. }
  89. }]
  90. }

最后更新:2016-11-23 16:04:03

  上一篇:go web播放器常见问题___视频播放_使用手册_媒体转码-阿里云
  下一篇:go 查询媒体信息作业__媒体信息接口_API使用手册_媒体转码-阿里云