足球新闻
巴拉圭VS美国直播_巴拉圭VS美国直播免费观看_巴拉圭VS美国直播无插件观看

开源流媒体服务器(m7s)+ webrtc
优势:跨平台,低延时,低配置可跑多路视频流,低CPU,使用浏览器硬解,前端就够完成开发
流媒体:https://m7s.live/
播放器:http://jessibuca.monibuca.com/
github:https://github.com/langhuihui/monibuca
文档:http://docs.monibuca.com/
普通功能
1. 通过ffmpeg向m7s进行推流
ffmpeg -i **** rtsp://localhost/live/test
bat文件
:loop
D:StreamingMediaZLMReleaseffmpegbinffmpeg.exe -re -i D:StreamingMediaMP4dock1.mp4 -strict -2 -vcodec h264 -acodec aac -f rtsp -rtsp_transport tcp rtsp://192.168.0.113/live/test1
goto loop
2. 拉流转发
3. GB28181 api接口
3.1 获取在线设备
http://localhost:8081/api/gb28181/list
[{
"ID": "34020000001110000107",
"Name": "Network Video Recorder",
"Manufacturer": "HIKVISION",
"Model": "DS-7816N-R2",
"Owner": "",
"RegisterTime": "2022-05-05T09:49:37.2410515+08:00",
"UpdateTime": "2022-05-05T09:56:31.5065763+08:00",
"LastKeepaliveAt": "2022-05-05T09:56:31.5065763+08:00",
"Status": "ONLINE",
"Channels": [{
"DeviceID": "34020000001320000011",
"ParentID": "",
"Name": "Camera 01",
"Manufacturer": "Manufacturer",
"Model": "Camera",
"Owner": "Owner",
"CivilCode": "CivilCode",
"Address": "192.168.0.11",
"Parental": 0,
"SafetyWay": 0,
"RegisterWay": 1,
"Secrecy": 0,
"Status": "OFF",
"RecordPublisher": null,
"LivePublisher": null,
"LiveSubSP": "",
"Records": null,
"RecordStartTime": "",
"RecordEndTime": ""
}],
"Addr": "192.168.0.104:5060",
"SipIP": "192.168.0.113"
}, {
"ID": "34020000001320000020",
"Name": "IPC-HFW2433DM-LED",
"Manufacturer": "Dahua",
"Model": "IPC-HFW2433DM-LED",
"Owner": "",
"RegisterTime": "2022-05-05T09:49:34.9500624+08:00",
"UpdateTime": "2022-05-05T09:56:34.9891245+08:00",
"LastKeepaliveAt": "2022-05-05T09:56:34.9893935+08:00",
"Status": "ONLINE",
"Channels": [{
"DeviceID": "34020000001320000020",
"ParentID": "34020000001320000020",
"Name": "IPC",
"Manufacturer": "Dahua",
"Model": "IPC-HFW2433DM-LED",
"Owner": "0",
"CivilCode": "340200",
"Address": "axy",
"Parental": 0,
"SafetyWay": 0,
"RegisterWay": 1,
"Secrecy": 0,
"Status": "ON",
"RecordPublisher": null,
"LivePublisher": {
"URL": "",
"StreamPath": "34020000001320000020/34020000001320000020",
"Type": "GB28181 Live",
"StartTime": "2022-05-05T09:49:35.0313162+08:00",
"Subscribers": null,
"VideoTracks": {
"h264": {
"CodecID": 7,
"PacketCount": 11169,
"BPS": 540346,
"SPSInfo": {
"ProfileIdc": 77,
"LevelIdc": 40,
"MbWidth": 120,
"MbHeight": 68,
"CropLeft": 0,
"CropRight": 0,
"CropTop": 0,
"CropBottom": 4,
"Width": 1920,
"Height": 1080
},
"GOP": 50,
"UsingDonlField": false
}
},
"AudioTracks": {},
"DataTracks": {},
"AutoCloseAfter": -1,
"Transcoding": null,
"ExtraProp": null,
"AppName": "34020000001320000020",
"StreamName": "34020000001320000020"
},
"LiveSubSP": "",
"Records": null,
"RecordStartTime": "",
"RecordEndTime": ""
}],
"Addr": "192.168.0.20:5060",
"SipIP": "192.168.0.113"
}, {
"ID": "34020000001320000013",
"Name": "IP DOME",
"Manufacturer": "Hikvision",
"Model": "DS-2DE2204IW-D3/W/XM",
"Owner": "",
"RegisterTime": "2022-05-05T09:49:48.42196+08:00",
"UpdateTime": "2022-05-05T09:56:54.2722771+08:00",
"LastKeepaliveAt": "2022-05-05T09:56:54.2722771+08:00",
"Status": "ONLINE",
"Channels": [{
"DeviceID": "34020000001320000013",
"ParentID": "34020000002000000001",
"Name": "IPdome",
"Manufacturer": "Hikvision",
"Model": "IP Camera",
"Owner": "Owner",
"CivilCode": "3402000000",
"Address": "Address",
"Parental": 0,
"SafetyWay": 0,
"RegisterWay": 1,
"Secrecy": 0,
"Status": "ON",
"RecordPublisher": null,
"LivePublisher": {
"URL": "",
"StreamPath": "34020000001320000013/34020000001320000013",
"Type": "GB28181 Live",
"StartTime": "2022-05-05T09:49:53.4551083+08:00",
"Subscribers": null,
"VideoTracks": {
"h264": {
"CodecID": 7,
"PacketCount": 10726,
"BPS": 461026,
"SPSInfo": {
"ProfileIdc": 77,
"LevelIdc": 42,
"MbWidth": 120,
"MbHeight": 68,
"CropLeft": 0,
"CropRight": 0,
"CropTop": 0,
"CropBottom": 4,
"Width": 1920,
"Height": 1080
},
"GOP": 50,
"UsingDonlField": false
}
},
"AudioTracks": {
"pcma": {
"CodecID": 7,
"PacketCount": 10709,
"BPS": 8000,
"SoundRate": 8000,
"SoundSize": 16,
"Channels": 1
}
},
"DataTracks": {},
"AutoCloseAfter": -1,
"Transcoding": null,
"ExtraProp": null,
"AppName": "34020000001320000013",
"StreamName": "34020000001320000013"
},
"LiveSubSP": "",
"Records": null,
"RecordStartTime": "",
"RecordEndTime": ""
}],
"Addr": "192.168.0.13:5060",
"SipIP": "192.168.0.113"
}, {
"ID": "34020000001320000012",
"Name": "IP CAMERA",浦项制铁赛事预测
"Manufacturer": "Hikvision",
"Model": "DS-2CD3T27DWD-L",
"Owner": "",
"RegisterTime": "2022-05-05T09:49:36.9636585+08:00",
"UpdateTime": "2022-05-05T09:56:38.7406656+08:00",
"LastKeepaliveAt": "2022-05-05T09:56:38.741325+08:00",
"Status": "ONLINE",
"Channels": [{
"DeviceID": "34020000001320000012",
"ParentID": "34020000001320000012",
"Name": "Camera 01",
"Manufacturer": "Hikvision",
"Model": "IP Camera",
"Owner": "Owner",
"CivilCode": "CivilCode",
"Address": "Address",
"Parental": 0,
"SafetyWay": 0,
"RegisterWay": 1,
"Secrecy": 0,
"Status": "ON",
"RecordPublisher": null,
"LivePublisher": {
"URL": "",
"StreamPath": "34020000001320000012/34020000001320000012",
"Type": "GB28181 Live",
"StartTime": "2022-05-05T09:49:37.8322787+08:00",
"Subscribers": null,
"VideoTracks": {
"h264": {
"CodecID": 7,
"PacketCount": 11087,
"BPS": 377280,
"SPSInfo": {
"ProfileIdc": 77,
"LevelIdc": 42,
"MbWidth": 120,
"MbHeight": 68,
"CropLeft": 0,
"CropRight": 0,
"CropTop": 0,
"CropBottom": 4,
"Width": 1920,
"Height": 1080
},
"GOP": 50,
"UsingDonlField": false
}
},
"AudioTracks": {},
"DataTracks": {},
"AutoCloseAfter": -1,
"Transcoding": null,
"ExtraProp": null,
"AppName": "34020000001320000012",
"StreamName": "34020000001320000012"
},
"LiveSubSP": "",
"Records": null,
"RecordStartTime": "",
"RecordEndTime": ""
}],
"Addr": "192.168.0.12:5060",
"SipIP": "192.168.0.113"
}]
3.2 PTZ控制(参考国标协议组装ptz命令-方向、光圈、焦点、预置点)
http://192.168.0.113:8081/api/gb28181/control?id=34020000001320000013&channel=34020000001320000013&ptzcmd=A50F0108007D003A (向上速度5)
3. 录像回放(1650780387 2022-04-24 14:06:27 )
3.1 回放申请
http://localhost:8081/api/gb28181/invite?id=34020000001110000107&channel=34020000001320000011&startTime=1650780600&endTime=1650780720
3.2 在线回放 ws://localhost:8081/jessica/34020000001110000107/34020000001320000011/1650780600-1650780720 (使用MSE-demo.html)
4. webrtc在线播放视频流
http://localhost:8081/api/webrtc/play?streamPath=34020000001320000020/34020000001320000020
备注:webrtc比jessibuca播放器更低延时(200-300ms),推荐使用
5. 直播功能(手机端或者web端pull视频流,用webrtc播放)
客户机用Chrome访问服务端,提示TypeError: Cannot read property 'getUserMedia' of undefined ,解决方案
chrome://flags/#unsafely-treat-insecure-origin-as-secure
重启Chrome
6. webrtc断网重连、截图、录像
player-via-3x3.html






















