怎样做电商网站好视频教学,wordpress短链,营销推广软文,制作网页教程的注意事项1、LiveNVR介绍
LiveNVR的安防监控的视频直播#xff0c;可以按标准的Onvif/RTSP协议接入监控设备#xff0c;也可以通过海康、大华、天地伟业等厂家私有SDK接入监控#xff0c;实现web页面的播放和录像回放。 可以分发HTTP-FLV、WS-FLV、WebRTC、RTMP、HLS(M3U8)、RTSP等多…1、LiveNVR介绍
LiveNVR的安防监控的视频直播可以按标准的Onvif/RTSP协议接入监控设备也可以通过海康、大华、天地伟业等厂家私有SDK接入监控实现web页面的播放和录像回放。 可以分发HTTP-FLV、WS-FLV、WebRTC、RTMP、HLS(M3U8)、RTSP等多中视频流
2、三种方法获取LiveNVR直播流地址获取
2.1、方法一、HTTP接口获取
2.1.1、接口说明 http://192.168.2.135:10800 是示例的ip及端口更换成自己部署的LiveNVR的ip及端口 通道相关 - 获取通道直播链接
2.1.2、获取HTTP-FLV流地址
2.1.2.1、接口调用示例 http://192.168.2.135:10800/api/v1/getchannelstream?channel1protocolflv 2.1.2.2、接口返回示例
获取接口返回的URL字段前面拼接上服务的ip和端口
{LiveQing: {Header: {CSeq: 1,Version: v1,MessageType: MSG_SC_SERVER_GET_CHANNEL_STREAM_ACK,ErrorNum: 200,ErrorString: Success OK},Body: {AudioEnable: false,ChannelName: 拉取 FLV,DeviceType: FLV,NumOutputs: 0,OSD: 拉取 FLV,Ondemand: true,Recording: false,SnapURL: /snap/channel_1.jpg?t1615518655678277862,SourceAudioCodecName: aac,SourceAudioSampleRate: 8000,SourceVideoCodecName: h264,SourceVideoFrameRate: 25,SourceVideoHeight: 576,SourceVideoWidth: 704,URL: /flv/hls/stream_1.flv}}
}2.1.3、获取WS-FLV流地址
2.1.3.1、接口调用示例 http://192.168.2.135:10800/api/v1/getchannelstream?channel1protocolws-flv 2.1.3.2、接口返回示例
获取接口返回的URL字段
{LiveQing: {Header: {CSeq: 1,Version: v1,MessageType: MSG_SC_SERVER_GET_CHANNEL_STREAM_ACK,ErrorNum: 200,ErrorString: Success OK},Body: {AudioEnable: false,ChannelName: 拉取 FLV,DeviceType: FLV,NumOutputs: 1,OSD: 拉取 FLV,Ondemand: true,Recording: false,SnapURL: /snap/channel_1.jpg?t1615519865764505509,SourceAudioCodecName: aac,SourceAudioSampleRate: 8000,SourceVideoCodecName: h264,SourceVideoFrameRate: 25,SourceVideoHeight: 576,SourceVideoWidth: 704,URL: ws://192.168.2.135:10800/ws-flv/hls/stream_1.flv}}
}
2.1.4、获取WebRTC流地址
2.1.4.1、接口调用示例 http://192.168.2.135:10800/api/v1/getchannelstream?channel1protocolwebrtc 2.1.4.2、接口返回示例
获取接口返回的URL字段
{LiveQing: {Header: {CSeq: 1,Version: v1,MessageType: MSG_SC_SERVER_GET_CHANNEL_STREAM_ACK,ErrorNum: 200,ErrorString: Success OK},Body: {AudioEnable: false,ChannelName: 拉取 FLV,DeviceType: FLV,NumOutputs: 1,OSD: 拉取 FLV,Ondemand: true,Recording: false,SnapURL: /snap/channel_1.jpg?t1615519865764505509,SourceAudioCodecName: aac,SourceAudioSampleRate: 8000,SourceVideoCodecName: h264,SourceVideoFrameRate: 25,SourceVideoHeight: 576,SourceVideoWidth: 704,URL: webrtc://192.168.2.135:10800/rtc/stream_1}}
}2.1.5、获取RTMP流地址
2.1.5.1、接口调用示例 http://192.168.2.135:10800/api/v1/getchannelstream?channel1protocolrtmp 2.1.5.2、接口返回示例
获取接口返回的URL字段服务需要开启对应的rtmp端口 TCP
{LiveQing: {Header: {CSeq: 1,Version: v1,MessageType: MSG_SC_SERVER_GET_CHANNEL_STREAM_ACK,ErrorNum: 200,ErrorString: Success OK},Body: {AudioEnable: false,ChannelName: 拉取 FLV,DeviceType: FLV,NumOutputs: 1,OSD: 拉取 FLV,Ondemand: true,Recording: false,SnapURL: /snap/channel_1.jpg?t1615519865764505509,SourceAudioCodecName: aac,SourceAudioSampleRate: 8000,SourceVideoCodecName: h264,SourceVideoFrameRate: 25,SourceVideoHeight: 576,SourceVideoWidth: 704,URL: rtmp://192.168.2.135:10935/hls/stream_1}}
}2.1.6、获取HLS流地址
2.1.6.1、接口调用示例 http://192.168.2.135:10800/api/v1/getchannelstream?channel1protocolhls 2.1.6.2、接口返回示例
获取接口返回的URL字段前面拼接上服务的ip和端口
{LiveQing: {Header: {CSeq: 1,Version: v1,MessageType: MSG_SC_SERVER_GET_CHANNEL_STREAM_ACK,ErrorNum: 200,ErrorString: Success OK},Body: {AudioEnable: false,ChannelName: 拉取 FLV,DeviceType: FLV,NumOutputs: 1,OSD: 拉取 FLV,Ondemand: true,Recording: false,SnapURL: /snap/channel_1.jpg?t1615519865764505509,SourceAudioCodecName: aac,SourceAudioSampleRate: 8000,SourceVideoCodecName: h264,SourceVideoFrameRate: 25,SourceVideoHeight: 576,SourceVideoWidth: 704,URL: /hls/stream_1/stream_1_live.m3u8}}
}2.1.7、RTSP
2.1.7.1、开启RTSP RTSP输出默认是关闭的开启需要在基础配置界面配置 RTSP端口默认554需要在服务器上开放此端口 TCP 2.1.7.2、获取RTSP流地址
2.1.7.2.1、接口调用示例 http://192.168.2.135:10800/api/v1/getchannelstream?channel1protocolrtsp 2.1.7.2、接口返回示例
获取接口返回的URL字段
{LiveQing: {Header: {CSeq: 1,Version: v1,MessageType: MSG_SC_SERVER_GET_CHANNEL_STREAM_ACK,ErrorNum: 200,ErrorString: Success OK},Body: {AudioEnable: false,ChannelName: 拉取 FLV,DeviceType: FLV,NumOutputs: 1,OSD: 拉取 FLV,Ondemand: true,Recording: false,SnapURL: /snap/channel_1.jpg?t1615519865764505509,SourceAudioCodecName: aac,SourceAudioSampleRate: 8000,SourceVideoCodecName: h264,SourceVideoFrameRate: 25,SourceVideoHeight: 576,SourceVideoWidth: 704,URL: rtsp://192.168.2.135:554/stream_3}}
}2.2、方法二浏览器F12查看播放地址 2.3、方法三安固定格式拼接
不调用开始直播可以获取播放地址吗可以的LiveNVR支持流地址播放直接启动通道拉流配置规则如下
2.3.1、HTTP端口直播流地址格式 WEBRTC: webrtc://{ip}:{port}/rtc/stream_{通道号} FLV: http://{ip}:{port}/flv/hls/stream_{通道号}.flv WS_FLV: ws://{ip}:{port}/ws-flv/hls/stream_{通道号}.flv HLS: http://{ip}:{port}/hls/stream_{通道号}/stream_{通道号}_live.m3u8 RTMP: rtmp://{ip}:{port}/hls/stream_{通道号} RTSP: rtsp://{ip}:{port}/stream_{通道号}
2.3.2、HTTPS端口直播流地址格式 WEBRTC: webrtc://{ip}:{port}/rtc/stream_{通道号} FLV: http://{ip}:{port}/flv/hls/stream_{通道号}.flv WS_FLV: ws://{ip}:{port}/ws-flv/hls/stream_{通道号}.flv HLS: http://{ip}:{port}/hls/stream_{通道号}/stream_{通道号}_live.m3u8 RTMP: rtmp://{ip}:{port}/hls/stream_{通道号} RTSP: rtsp://{ip}:{port}/stream_{通道号}
2.3.3、关闭静态流地址播放
livenvr.ini -[base_config]-allow_stream_start_by_url0 默认是开启此功能的配置后重启LiveNVR服务
[base_config]
allow_stream_start_by_url0 3、RTSP/HLS/FLV/RTMP拉流Onvif流媒体服务
支持 Windows Linux 及其它CPU架构国产、嵌入式…操作系统安装包下载 、 安装使用说明更多常见问题