使用该接口前需要在服务配置中设置回调Url。当智能识别判别有报警或有断流操作时,系统会通过POST方式推送视频流截图及识别信息。
名称 | 类型 | 描述 |
---|---|---|
RequestId | String | 该条任务请求ID |
UniqueName | String | 域名标识 |
App | String | 频道 |
Stream | String | 流名 |
NotifyType | String | 回调通知类型(断流:blocked,警示:warning) |
NotifyTime | Number | 通知发起或操作时间 |
Screenshot | Object | 截图信息,回调截图绑定的bucket,ks3存储路径,截图时间 |
RecogResult | Object[] | 在色情识别,性感识别,暴恐识别,群体识别上的阈值,识别匹配度和识别结果 |
Screenshot
参数名 | 类型 | 描述 |
---|---|---|
Bucket | String | 绑定bucket名称 |
Key | String | 截图文件ks3存储路径 |
ScreenshotTime | Number | 截图时间 |
RecogResult
参数名 | 类型 | 描述 |
---|---|---|
ScreenshotType | String | 截图类型(色情:porn,性感:sexy,暴恐:terrorism,群体:group,正常:normal |
Threshold | Number | 阈值 |
Rate | Number | 识别匹配度 |
Result | Boolean | 识别结果(true,false) |
POST http://yourdomain/api/notify/
{
"RequestId": "21c17ec8-b7c5-4fd0-8513-b1a0c497b453",
"UniqueName": "test",
"App": "live",
"Stream": "yourstream",
"NotifyType": "RECOVER",
"Screenshot": {
"Bucket": "zhy.bj",
"Key": "record/live/yourstream/picture/1477990602937_14380/zhenjiaping3-1477990603.jpg",
"ScreenshotTime": "1477990604"
},
"NotifyTime": "1477990905606",
"RecogResult": [
{
"ScreenshotType": "porn",
"Threshold": 0.9,
"Rate": 0.9914091229438782,
"Result": true
},
{
"ScreenshotType": "sexy",
"Threshold": 0.9,
"Rate": 0.9914091229438782,
"Result": true
},
{
"ScreenshotType": "terrorism",
"Threshold": 0.9,
"Rate": 0.9914091229438782,
"Result": true
},
{
"ScreenshotType": "group",
"Threshold": 0.9,
"Rate": 0.9914091229438782,
"Result": true
}
]
}
HTTP Status 200
No Content