大华监控测试记录

rtsp://admin:admin@192.168.1.110:554/h264/ch1/main/av_stream

成功1
rtsp://admin:admin@192.168.1.110:554/cam/realmonitor?channel=1&subtype=0

rtsp://admin:admin@192.168.1.110:554/cam/realmonitor?channel=1&subtype=1

http://ivi.bupt.edu.cn/hls/cctv1hd.m3u8

ffmpeg -i "rtsp://admin:admin@192.168.1.110:554/cam/realmonitor?channel=1&subtype=0" -c copy -f hls -hls_time 2.0 -hls_list_size 0 -hls_wrap 15 C:/hls/test.m3u8


ffmpeg -i "rtsp://admin:admin@192.168.1.110:554/cam/realmonitor?channel=1&subtype=0" -f hls -hls_list_size 5 -hls_time 10 -hls_wrap 10 C:/hls/live.m3u8


ffmpeg -i rtsp://admin:12345@58.49.57.103:10554/h264/ch33/sub/av_stream -strict -2 -c:v libx264 -c:a aac -f hls f:nginxwwwhlsipc1ipc1.m3u8

大华专用
ffmpeg -f rtsp -rtsp_transport tcp -i "rtsp://admin:admin@192.168.1.110:554/cam/realmonitor?channel=1&subtype=0" -strict -2 -c:v libx264 -vsync 2 -c:a aac -f hls -hls_time 4 -hls_list_size 5 -hls_wrap 10 D:/EasyDarwinVideo/test2.m3u8

说明:
username: 用户名。例如admin。
password: 密码。例如admin。
ip: 为设备IP。例如 10.7.8.122。
port: 端口号默认为554,若为默认可不填写。
channel: 通道号,起始为1。例如通道2,则为channel=2。
subtype: 码流类型,主码流为0(即subtype=0),辅码流为1(即subtype=1)。
例如,请求某设备的通道2的辅码流,Url如下

■RTSP端口号默认为554,若为默认可不填写。用户使用苹果浏览器QuickTime或者VLC播放实时监控时可使用以下格式播放。黑莓手机也支持该功能。
■ 实时监控码流Url格式,请求实时监控码流Rtsp流媒体服务时,应在Url中指明请求的通道号、码流类型,如果需要认证信息,还有提供用户名和密码。
■ 用户使用黑莓手机访问时,需将码流编码模式设为H.264B,分辨率设为CIF,并将音频关掉。
Url格式说明如下:
rtsp://username:password@ip:port/cam/realmonitor?channel=1&subtype=0
其中:
username:用户名。例如admin。
password:密码。例如admin。
ip:为设备IP。例如 10.7.8.122。
port:端口号默认为554,若为默认可不填写。
channel:通道号,起始为1。例如通道2,则为channel=2。
subtype:码流类型,主码流为0(即subtype=0),辅码流为1(即subtype=1)。
例如,请求某设备的通道2的辅码流,Url如下:
rtsp://admin:admin@10.12.4.84:554/cam/realmonitor?channel=2&subtype=1
如果不需认证,则用户名和密码无需指定,使用如下格式即可:
rtsp://ip:port/cam/realmonitor?channel=1&subtype=0


dos窗口输入 ffmpeg -version 命令,如有信息则说明成功:

http://172.29.101.1:10008

http://192.168.1.106:10008

http://172.26.146.1:10008


.m3u8
application/x-mpegURL
.ts
video/vnd.dlna.mpeg-tts


打开IIS,找到“HTTP响应标头”点进去,

在右侧可以看到添加,然后添加如下标头即可

Access-Control-Allow-Headers:Content-Type, api_key, Authorization
Access-Control-Allow-Origin:*

Access-Control-Allow-Credentials:true

Access-Control-Allow-Headers:origin,x-requested-with,content-type

Access-Control-Allow-Methods:POST,GET,OPTIONS

Access-Control-Allow-Origin:*


http://localhost:8091/jeely/20190212/out.m3u8

http://localhost:8091/jeely/20190213/out.m3u8

http://localhost:8091/jeely/20190215/out.m3u8


easy-player-lib.min.js
https://blog.csdn.net/staritstarit/article/details/85727515
https://www.npmjs.com/package/easy-player/v/2.2.6
https://www.npmjs.com/package/@easydarwin/easyplayer

npm i easy-player@2.2.5

npm install jquery@3.0.0 --save

原文地址:https://www.cnblogs.com/Jeely/p/10399673.html