优点:功能比较多,C#开发的,容易修改,内嵌入了zlmk流媒体服务品,启动简单
缺点:sip对摄像头兼容还有问题,大华接入非常不稳定,注册等待时间久,对海康是正常,占用内存相对 m7s大很多
部署,代码git下载回来后,用visual stuio 进行编译打包为两个目录
AKStreamKeeper
AKStreamWeb
上传到ubuntu
安装好zlmediaKit 安装方法见官方
安装ffmpeg
AKStreamKeeper.json配置
{
"IpV4Address": "3.39.58.47本地外网IP",
"IpV6Address": "fe80::5054:ff:feca:ac1e",
"Candidate":"3.39.58.47本地外网IP",
"WebApiPort": 6880,
"MediaServerPath": "/root/ZLMediaKit/ZLMediaKit/release/linux/Debug/MediaServer",
"AkStreamWebRegisterUrl": "http://(AKStreamWeb所在服务器IP)59.5.26.18:5800/MediaServer/WebHook/MediaServerKeepAlive",
"CutMergeFilePath": "/usr/video/CutMergeFile",
"CustomRecordPathList": [
"/usr/video/Downloads"
],
"UseSsl": false,
"MinRtpPort": 10001,
"MaxRtpPort": 20000,
"MinSendRtpPort": 20002,
"MaxSendRtpPort": 20200,
"RandomPort": true,
"FFmpegPath": "/usr/bin/ffmpeg",
"AccessKey": "047I4WS1-U51UBO6W-1J4BT21P-MF17IT99-92J8WIHU-944Q4KIW",
"RtpPortCdTime": 3600,
"HttpClientTimeoutSec": 5,
"DisableShell": false,
"CheckLinuxDiskMount": false,
"ZLMediakitSSLFilePath": "./sslfiles/",
"ListenIp": "0.0.0.0",
"EnableRtspAuth": false
}
AKStreamWeb 我部署在另外一台服务器了,配置
AKStreamWeb.json
{
"MediaServerFirstToRestart": true,
"DbType": "MySql",
"OrmConnStr": "Data Source=59.5.26.18;Port=101;User ID=yju;Password=yu23Z; Initial Catalog=ASKDB;Charset=utf8; SslMode=none;Min pool size=1",
"WebApiPort": 5800,
"AccessKey": "047I4WS1-U51UBO6W-1J4BT21P-MF17IT99-92J8WIHU-944Q4KIW",
"HttpClientTimeoutSec": 5,
"WaitEventTimeOutMSec": 10000,
"WaitSipRequestTimeOutMSec": 5000,
"DeletedRecordsExpiredDays": 30,
"EnableGB28181Server": true,
"EnableGB28181Client": true,
"ZlmFlvPrefix": "live",
"ListenIp": "0.0.0.0",
"ForwardUnmanagedRtmpRtspRtcStream": true,
"LocalizationKingBaseDb": false,
"ForwardUrlIn": "http://",
"ForwardUrlOut": "http://",
"ForwardUrlOnRecord": "http://",
"PushStreamIpGetUrl": ""
}
SipClientConfig.json
{
"LocalIpAddress": "59.5.26.18",
"LocalPort": 5061,
"SipServerIpAddress": "59.5.26.18",
"SipServerPort": 5060,
"SipServerDeviceId": "34020000002000000001",
"Realm": "3402000000",
"SipUsername": "admin",
"SipPassword": "123#@!qwe",
"KeepAliveInterval": 30,
"KeepAliveLostNumber": 3,
"SipDeviceId": "34020000001310000001",
"Expiry": 3600,
"EncodingType": "UTF8",
"AkstreamWebHttpUrl": "http://59.5.26.18:5800/SipClient"
}
SipServerConfig.json
{
"SipIpAddress": "3.39.58.47(AKStreamKeeper服务器IP)",
"SipIpV6Address": "fe80::5054:ff:feca:ac1e",
"ServerSipDeviceId": "34020000002000000001",
"SipPort": 5060,
"Realm": "3402000000",
"GbVersion": "GB-2016",
"Authentication": false,
"SipUsername": "admin",
"SipPassword": "123#@!qwe",
"MsgProtocol": "TCP",
"KeepAliveInterval": 30,
"KeepAliveLostNumber": 3,
"IpV6Enable": false,
"EncodingType": "UTF8",
"IsPassive": true,
"ListenIp": "0.0.0.0",
"NoAuthenticationRequireds": [
{
"IpV4Address": "3.39.58.47",
"IpV6Address": "fe80::5054:ff:feca:ac1e",
"DeviceId": "33020000021180000001"
}
]
}
配置好了
三、安装前端界面 AKStreamNVR
https://gitee.com/sscboshi/AKStreamNVR#https://gitee.com/link?target=http%3A%2F%2Fakstream.govfun.com%3A10059%2F
注意看github上面的 wiki安装说明
运 行
摄像头配置