全部产品

游戏视频摘要

更新时间:2020-08-18 11:17:08

HighlightGameVideo游戏视频摘要

功能描述

为斗鱼提供特定游戏摘要和事件理解服务。输入斗鱼直播平台的一条游戏直播视频,通过分析视频内容,需要对这些直播/点播内容打上“事件标签”(例如击杀、狙杀、治疗、双排等),应用场景为游戏视频集锦、游戏直播间广告。目前支持绝地求生,后续会拓展至其他游戏类目。
image.png

API接口 & 输入输出协议

入参描述(非固定值的)

入参格式: json

字段 类型 是否必须 描述
VideoUrl String 视频入参地址
  • 输入限制
    • 分辨率:不超过1080P
    • 类型:MP4,AVI,MKV,MOV
    • 大小:不超过20GB

出参描述

出参格式:json

字段 类型 是否必须 描述
GameList Array 返回的游戏data
HighlightList Array 游戏中高光时刻
  • GameList:
    • “Id”: String //游戏片段id,由算法给出
    • “Start”: Float //开始时间,浮点数,单位秒
    • “End”: Float //结束时间,浮点数,单位秒
    • “GameInfo”: Map //摘要信息,不同的游戏内容不同
  • HighlightList:
    • “Start”: Float //开始时间,浮点数,单位秒
    • “End”: Float //结束时间,浮点数,单位秒

入参样例

  1. {
  2. "VideoUrl":"https://xxx.oss-cn-shanghai.aliyuncs.com/myfile***/1.flv"
  3. }

出参样例

正常结果

  1. {
  2. "RequestId":"5EF87D46-24C9-48BD-B26D-90CA1498506D",
  3. "Data":{
  4. "Status":"PROCESS_SUCCESS",
  5. "JobId":"1D9230AB-B916-4AC4-956A-13301F2E277B",
  6. "Result":"{"GameList":[{"Id":"game_1","Start":390,"End":953,"GameInfo":{"id":"game_1","start":390,"stop":953,"playersNumber":2,"viewMode":"TPP","mapMode":"快速加入","gameResult":"lose","ranking":33,"killNumber":0,"deathInfo":{"weaponType":"BerylM762","enemyID":"Mighty_Tautology"},"killInfo":[]}},{"Id":"game_2","Start":978,"End":2950,"GameInfo":{"id":"game_2","start":978,"stop":2950,"playersNumber":2,"viewMode":"TPP","mapMode":"快速加入","gameResult":"win","ranking":1,"killNumber":3,"deathInfo":{"weaponType":"","enemyID":""},"killInfo":[{"id":"game_2_kill_1","timeStamp":1303,"weaponType":"BerylM762","enemyID":"ChangGuC"},{"id":"game_2_kill_2","timeStamp":1345,"weaponType":"M16A4","enemyID":"Xqqcn"},{"id":"game_2_kill_3","timeStamp":2857,"weaponType":"AKM","enemyID":"Deldel322368744"}]}},{"Id":"game_3","Start":2982,"End":3301,"GameInfo":{"id":"game_3","start":2982,"stop":3301,"playersNumber":2,"viewMode":"TPP","mapMode":"快速加入","gameResult":"lose","ranking":3,"killNumber":0,"deathInfo":{"weaponType":"","enemyID":""},"killInfo":[]}},{"Id":"game_4","Start":3322,"End":4270,"GameInfo":{"id":"game_4","start":3322,"stop":4270,"playersNumber":2,"viewMode":"TPP","mapMode":"卡拉金","gameResult":"lose","ranking":6,"killNumber":0,"deathInfo":{"weaponType":"M416","enemyID":"tpQAQ66使"},"killInfo":[]}}],"HighlightList":[{"Start":1273.331,"End":1309.74},{"Start":1317.585,"End":1354.155},{"Start":2829.746,"End":2862.245}]}"
  7. }
  8. }

异常结果

  1. {
  2. "RequestId":"FCD43A2C-869E-46B4-BCAD-DE20962D9C4A",
  3. "Data":{
  4. "Status":"PROCESS_FAILED",
  5. "ErrorCode":"InvalidImage.Type",
  6. "ErrorMessage":"INVALID_INPUT",
  7. "JobId":"007A99B4-287B-4EB3-A065-67A78E12E74B"
  8. }
  9. }

查询任务结果

该接口为异步接口,当前并未返回真实的请求结果,您需要通过返回的RequestId调用GetAsyncJobResult接口来获取该接口的真实请求结果。详情请参见GetAsyncJobResult

错误码

errorCode errorMessage 含义
0 SUCCESS 成功
InvalidFile.Content EVENT_CLIPS_ERROR 集锦片段提取错误
InvalidFile.Content GAME_INFO_ERROR 视频分析理解错误
InvalidImage.Type INVALID_INPUT 输入格式无效,比如图像,或者非1080p视频

其它常见错误码请查看这里