全部产品
云市场

CreateVideoAnalyseTask

更新时间:2019-04-22 12:40:55

描述

创建一个视频分析的任务。该任务需要一个视频类型的 project,目前包括VideoStarter,VideoPOC。

请求参数

名称 类型 是否必填 描述
Project string Project
Action String CreateVideoAnalyseTask
VideoUri string 视频 Uri
OSS 地址规则为:oss://bucket/object,其中 bucket和当前 Project 在同一区域的 OSS 桶名, object 为文件路径。
TgtUri string 存储数据的 OSS 地址 帧在 imgs, 语音在 audio,结果为 result/result.txt
NotifyTopicName String 异步通知的 TopicName
NotifyEndpoint String 异步反向通知的 Endpoint,作业处理状态可以通过该 Endpoint 异步通知到调用者

返回参数

名称 类型 描述
RequestId String 用户发送的每次接口调用请求,无论成功与否,系统都会返回一个唯一识别码 RequestId 给用户
TaskId String TaskId 表示一个 task
TaskType String Task 所属类型

示例

请求示例

  1. POST https://imm.cn-shanghai.aliyuncs.com
  2. ?Action=CreateVideoAnalyseTask
  3. &Project=test
  4. &TgtUri=oss://xxx/test/res
  5. &VideoUri=oss://xxx/test/1.mp4

成功返回示例

  1. {
  2. "RequestId": "10AFFE69-73BA-47C2-8A85-029AA9DA72A3",
  3. "TaskId": "VideoAnalyseTask-ffcdec0c-73ba-451a-bec4-a9fe3f4cd765",
  4. "TaskType": "VideoAnalyseTask"
  5. }

结果说明

名称 类型 描述
VideoTags VideoTag 数组 视频标签数组
Audios Audio 数组 音频信息数组
Frames Frame 数组 帧信息数组
FailReasons FailReason 数组 错误信息数组

数据结构Audio

名称 类型 描述
SourcePosition String 时间戳信息
AudioUri String 语音资源路径
STTs AudioText 语音转文字数组

数据结构FailReason

名称 类型 描述
Uri String 资源信息
Fail String 错误详细信息 结构为
[HTTPStatusCode ErrorCode] ErrorMessage

结果展示

  1. {
  2. "VideoTags": [
  3. {
  4. "VideoTagName": "一套鼓乐器",
  5. "VideoTagEnName": "Drum kit",
  6. "VideoTagConfidence": 0.0373968
  7. },
  8. {
  9. "VideoTagName": "唱片骑师",
  10. "VideoTagEnName": "Disc jockey",
  11. "VideoTagConfidence": 0.0151516
  12. },
  13. {
  14. "VideoTagName": "跳舞",
  15. "VideoTagEnName": "Dance",
  16. "VideoTagConfidence": 0.0105581
  17. }
  18. ],
  19. "Audios": [
  20. {
  21. "SourcePosition": "00000000.000",
  22. "AudioUri": "oss://imm-test-spark-cn-shanghai/test/vidoeanalyse/oss/res2/fairy/audio/0.000.wav",
  23. "STTs": [
  24. {
  25. "Library": Default”,
  26. "Text": "你好",
  27. "BeginTime": 1.29,
  28. "EndTime": 16.265,
  29. "SilenceDuration": 0,
  30. "EmotionValue": 70,
  31. "ChannelId": 0,
  32. "SpeechRate": 60
  33. }
  34. ]
  35. }
  36. ],
  37. "Frames": [
  38. {
  39. "SourcePosition": "00000010.000",
  40. "ImageUri": "oss://imm-test-spark-cn-shanghai/test/vidoeanalyse/oss/res2/fairy/imgs/10.000.jpg",
  41. "Faces": [
  42. {
  43. "FaceId": "a18e38b6f962230b6529a17d59a7a231",
  44. "PersonId": "NOTREADY",
  45. "Age": 27,
  46. "AgeConfidence": 1,
  47. "Gender": "Female",
  48. "GenderConfidence": 1,
  49. "FaceAttributes": {
  50. "LeftEye": "99.902",
  51. "LeftEyeConfidence": 1,
  52. "RightEye": "99.948",
  53. "RightEyeConfidence": 1,
  54. "FaceBoundary": {
  55. "Width": 101,
  56. "Height": 625,
  57. "Left": 625,
  58. "Top": 151
  59. }
  60. }
  61. }
  62. ],
  63. "Tags": [
  64. {
  65. "TagName": "新娘",
  66. "TagLevel": 2,
  67. "TagConfidence": 0.7957686,
  68. "ParentTagName": "其他"
  69. }
  70. ],
  71. "Celebritys": [
  72. {
  73. "CelebrityName": "哈娜·海耶斯",
  74. "CelebrityLibraryName": "Stars",
  75. "CelebrityConfidence": 0.75660336,
  76. "CelebrityBoundary": {
  77. "Width": 105,
  78. "Height": 126,
  79. "Left": 635,
  80. "Top": 258
  81. }
  82. }
  83. ],
  84. "OCRs": [
  85. {
  86. "OCRContents": "你好",
  87. "OCRConfidence": 0.87826407,
  88. "OCRBoundary": {
  89. "Width": 116,
  90. "Height": 18,
  91. "Left": 1101,
  92. "Top": 629
  93. }
  94. }
  95. ]
  96. }
  97. ],
  98. "FailReasons": [
  99. {
  100. "Uri": "oss://XXXX/test/vidoeanalyse/set/res26/imgs/30.000.jpg",
  101. "Fail": "[400 InvalidImage] This Image is not support by VideoFrameTags."
  102. }
  103. ]
  104. }