推特 阿里云技术文档正文

GetMediaMeta_视频管理类操作_API手册_智能媒体管理

admin 阿里云技术文档 2020-02-11 205 0
阿里云服务器优惠

GetMediaMeta

描述

获取多媒体文件信息。

请求参数

名称 类型 是否必填 描述
Project string Project
Action String GetMediaMeta
MediaUri string 媒体文件 Uri
OSS 地址规则为:oss://bucket/object,其中 bucket和当前 Project 在同一区域的 OSS 桶名, object 为文件路径。

数据类型 MediaMeta

IMM 参数 类型 描述
MediaFormat MediaFormat 媒体格式信息
MediaStreams MediaStreams 媒体流信息

数据类型 MediaFormat

IMM 参数 类型 描述
NumberStreams Integer
NumberPrograms Integer
FormatName String
FormatLongName String
Size String
Duration String
StartTime String
Bitrate String
CreationTime String

数据类型 MediaStreams

IMM 参数 类型 描述
VideoStreams []VideoStream 视频流信息
AudioStreams []AudioStream 音频流信息
SubtitleStreams []SubtitleStream 字幕流信息

数据类型 VideoStream

IMM 参数 类型 描述
Index Integer
CodecName String
CodecLongName String
CodecTimeBase String
CodecTagString String
Profile String
Width Integer
Height Integer
HasBFrames Integer
SampleAspectRatio String
DisplayAspectRatio String
PixelFormat String
Level Integer
FrameRrate String
AverageFrameRate String
TimeBase String
StartTime String
Duration String
Bitrate String
Frames String

数据类型 AudioStream

IMM 参数 类型 描述
Index Integer
CodecName String
CodecLongName String
CodecTimeBase String
CodecTagString String
SampleFormat String
SampleRate String
Channels Integer
ChannelLayout String
TimeBase String
StartTime String
Duration String
Bitrate String
Frames String
Language String

数据类型 SubtitleStream

IMM 参数 类型 描述
Index Integer
Language String

返回参数

名称 类型 描述
RequestId String 用户发送的每次接口调用请求,无论成功与否,系统都会返回一个唯一识别码 RequestId 给用户
MediaUri String 源文件
MediaMeta MediaMeta 媒体信息

示例

请求示例

  1. POST https://imm.cn-shanghai.aliyuncs.com
  2. ?Action=CreateVideoCompressTask
  3. &Project=test
  4. &MediaUri=oss://xxx/test/res.mkv

成功返回示例

  1. {
  2. "MediaUri": "oss://xxx/test/res.mkv",
  3. "RequestId": "CCC06DDD-D0DF-475A-A98B-7649D51D2AB2",
  4. "MediaMeta": {
  5. "MediaStreams": {
  6. "SubtitleStreams": [
  7. {
  8. "Index": 2,
  9. "Language": "eng"
  10. }
  11. ],
  12. "AudioStreams": [
  13. {
  14. "SampleRate": "44100",
  15. "Frames": "",
  16. "CodecName": "aac",
  17. "CodecTimeBase": "1/44100",
  18. "CodecTag": "0x0000",
  19. "Channels": 2,
  20. "ChannelLayout": "stereo",
  21. "Index": 1,
  22. "CodecTagString": "[0][0][0][0]",
  23. "SampleFormat": "fltp",
  24. "TimeBase": "1/1000",
  25. "Duration": "",
  26. "CodecLongName": "AAC (Advanced Audio Coding)",
  27. "Language": "eng",
  28. "StartTime": "0.000000",
  29. "Bitrate": ""
  30. }
  31. ],
  32. "VideoStreams": [
  33. {
  34. "SampleAspectRatio": "1:1",
  35. "Profile": "High",
  36. "Height": 720,
  37. "Frames": "",
  38. "CodecName": "h264",
  39. "CodecTimeBase": "1/50",
  40. "CodecTag": "0x0000",
  41. "HasBFrames": 2,
  42. "Index": 0,
  43. "CodecTagString": "[0][0][0][0]",
  44. "TimeBase": "1/1000",
  45. "DisplayAspectRatio": "16:9",
  46. "PixelFormat": "yuv420p",
  47. "Duration": "",
  48. "CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
  49. "Language": "",
  50. "Level": 31,
  51. "StartTime": "0.000000",
  52. "AverageFrameRate": "25/1",
  53. "Width": 1280,
  54. "FrameRrate": "25/1",
  55. "Bitrate": ""
  56. }
  57. ]
  58. },
  59. "MediaFormat": {
  60. "CreationTime": "",
  61. "FormatName": "matroska,webm",
  62. "Duration": "7704.573000",
  63. "NumberStreams": 3,
  64. "FormatLongName": "Matroska / WebM",
  65. "StartTime": "0.000000",
  66. "Bitrate": "1874",
  67. "Size": "1805645"
  68. }
  69. }
  70. }

若在使用中有疑问,请参考 FAQ,或者进入 钉钉用户群 实时交流。

版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

评论

-----