文档
测试

获取流信息

GET
http://serverip:8000/api/streams/{app_name}/{stream_name}

接口描述

获取流信息

请求参数

参数名
类型
描述
必填
app_name
string
App名称
可选
stream_name
string
Stream名称
可选

响应参数

参数名
类型
描述
必填
publisher
Object
推流者信息
必填
subscribers
Object[]
播流者信息数组
必填
subcount
int
播流者数量
必填
subbytes
int
播放总出口流量
必填

说明 / 示例

{ "code": 200, "error": "", "data": { "live": { "a": { "publisher": { "id": "la986cjr9wttd1ez9jp69nqg54aa341w", "ip": "[::1]:37930", "app": "live", "name": "a", "protocol": "rtmp", "createtime": 1582524428710, "inbytes": 28590509, "outbytes": 0, "audio": { "codec": "AAC", "profile": "LC", "samplerate": 44100, "channels": 2 }, "video": { "codec": "H264", "width": 1920, "height": 1080, "profile": "High", "level": 40, "fps": 0 } }, "subscribers": null, "subcount": 0 }, "b": { "publisher": { "id": "x7lbb04chy8nc5g0xt8x09rt9hufxsgu", "ip": "[::1]:37928", "app": "live", "name": "b", "protocol": "rtmp", "createtime": 1582524419898, "inbytes": 29063273, "outbytes": 0, "audio": { "codec": "AAC", "profile": "LC", "samplerate": 44100, "channels": 2 }, "video": { "codec": "H264", "width": 1920, "height": 1080, "profile": "High", "level": 40, "fps": 0 } }, "subscribers": null, "subcount": 0 }, "c": { "publisher": { "id": "thb1q8kzowoe6898rlug8y9ntsa6we3b", "ip": "[::1]:37934", "app": "live", "name": "c", "protocol": "rtmp", "createtime": 1582524478751, "inbytes": 5100155, "outbytes": 0, "audio": { "codec": "AAC", "profile": "LC", "samplerate": 44100, "channels": 2 }, "video": { "codec": "H264", "width": 1920, "height": 1080, "profile": "High", "level": 40, "fps": 0 } }, "subscribers": null, "subcount": 0 }, "d": { "publisher": { "id": "2r8ggst4jyghubwsju8r7vbi6jcsp9n9", "ip": "[::1]:37932", "app": "live", "name": "d", "protocol": "rtmp", "createtime": 1582524474718, "inbytes": 5567191, "outbytes": 0, "audio": { "codec": "AAC", "profile": "LC", "samplerate": 44100, "channels": 2 }, "video": { "codec": "H264", "width": 1920, "height": 1080, "profile": "High", "level": 40, "fps": 0 } }, "subscribers": null, "subcount": 0 }, "s": { "publisher": { "id": "wx8wezd67r9ly8b2crqmvon3o50k6vyp", "ip": "192.168.0.2:47070", "app": "live", "name": "s", "protocol": "rtmp", "createtime": 1582524306515, "inbytes": 33883239, "outbytes": 0, "audio": { "codec": "AAC", "profile": "LC", "samplerate": 44100, "channels": 2 }, "video": { "codec": "H264", "width": 1280, "height": 720, "profile": "High", "level": 31, "fps": 0 } }, "subscribers": null, "subcount": 0 } } } } 备注 当app_name和stream_name都传入时,才返回subscribers,所有该流订阅者的信息 当只传入app_name时,列出所有app_name的推流信息 当app_name和stream_name都不传入时,返回服务器上所有推流信息