根据GB28181规范,接入设备或是网关平台,在LiveGBS的web管理后台的,国标设备菜单界面中可以查看到设备列表
上一层的设备可以是一个NVR,一个下级平台,一个单兵设备。点击设备列表的 【查看通道】,可以查看到设备下面具体的视频通道(摄像头)。
默认播放的 ws_flv 的直播流, 可以点击下面的选项,切换播放的直播流格式
通道可以配置开启分享, 分享之后,可以获得一个具体的播放页面,分享的是页面地址并非原始流地址。可以直接集成分享页面到自己的业务系统中(通过iframe方式集成)
通过调用接口的方式获取直播流地址,具体接口 实时直播 - 开始直播 /api/v1/stream/start
接口请求示例
http://192.1638.2.135:10000/api/v1/stream/start?serial=34020000001110000234&code=34020000001320000234
接口返回示例
{
"AudioEnable": false,
"CDN": "",
"CascadeSize": 0,
"ChannelCustomName": "演示",
"ChannelID": "34020000001320000234",
"ChannelName": "演示",
"ChannelPTZType": 1,
"DeviceID": "34020000001110000234",
"Duration": 2,
"FLV": "http://192.1638.2.135:10000/sms/34020000002020000001/flv/hls/34020000001110000234_34020000001320000234.flv",
"HLS": "http://192.1638.2.135:10000/sms/34020000002020000001/hls/34020000001110000234_34020000001320000234/34020000001110000234_34020000001320000234_live.m3u8",
"RTMP": "rtmp://192.1638.2.135:11935/hls/34020000001110000234_34020000001320000234",
"RTSP": "rtsp://192.1638.2.135:554/34020000001110000234_34020000001320000234",
"WS_FLV": "ws://192.1638.2.135:10000/sms/34020000002020000001/ws-flv/hls/34020000001110000234_34020000001320000234.flv",
"InBitRate": 0,
"InBytes": 0,
"NumOutputs": 0,
"Ondemand": true,
"OutBytes": 0,
"RecordStartAt": "",
"RelaySize": 0,
"SnapURL": "/snap/34020000001110000234/34020000001320000234.jpg?t=1594177940107633780",
"SourceAudioCodecName": "",
"SourceAudioSampleRate": 0,
"SourceVideoCodecName": "",
"SourceVideoFrameRate": 0,
"SourceVideoHeight": 0,
"SourceVideoWidth": 0,
"StartAt": "2020-07-08 11:16:14",
"StreamID": "stream:34020000001110000234:34020000001320000234",
"Transport": "TCP"
}
取接口返回的 FLV 字段
"FLV": "http://192.1638.2.135:10000/sms/34020000002020000001/flv/hls/34020000001110000234_34020000001320000234.flv",
取接口返回的 HLS 字段
"HLS": "http://192.1638.2.135:10000/sms/34020000002020000001/hls/34020000001110000234_34020000001320000234/34020000001110000234_34020000001320000234_live.m3u8",
取接口返回的 FLV 字段
"RTMP": "rtmp://192.1638.2.135:11935/hls/34020000001110000234_34020000001320000234",
取接口返回的 WS_FLV字段
"WS_FLV": "ws://192.1638.2.135:10000/sms/34020000002020000001/ws-flv/hls/34020000001110000234_34020000001320000234.flv",
取接口返回的 RTSP 字段
"RTSP": "rtsp://39.98.57.187:554/34020000001110000234_34020000001320000234",
支持 Windows|Linux 64 位系统环境,支持内网、私有云部署