Part1前言
分享一个工具,可以实现接入gb28181的摄像机,并将其转成web H5可以预览的画面。
另外只需要一台云服务器即可实现将相机转成公网访问,无需相机需要公网IP地址。
Part2安装环境
1、2017VC_redist.x86.exe (C++环境)
2、dotnetfx45_full_x86_x64.exe(C#环境)
3、GbServer.exe (分享的工具)
Part3配置文件说明
配置文件见程序目录License.Config目录
<?xml version="1.0" encoding="utf-8" ?>
<Config>
<HttpPort>5062</HttpPort>
<MediaPort>9002</MediaPort>
<LocalPort>15060</LocalPort>
<LocalIP>192.168.3.39</LocalIP>
<ServeId>34020000002000000001</ServeId>
<Realm>34020000</Realm>
</Config>
HttpPort:http接口,提供对接入摄像机的查询
MediaPort:流媒体的端口
LocalPort:sip的端口
LocalIP:服务的IP地址
ServeId:服务的国标ID
Realm:服务的域
Part4启动服务
双击运行GbServer.exe即可
Part5api接口
1获取在线相机
http://192.168.3.39:5062/getcam
![e415511b38c383c324163aee5654a1ef.png](https://img-blog.csdnimg.cn/img_convert/e415511b38c383c324163aee5654a1ef.png)
2获取相机Url地址
http://192.168.3.39:5062/getliveurl
![f83bbdcdffe887eca51bd5a050f6444f.png](https://img-blog.csdnimg.cn/img_convert/f83bbdcdffe887eca51bd5a050f6444f.png)
3设置国标取流方式
http://192.168.3.39:5062/setcamtcp
![f4cbaf30ea2b52c3f466c936e0887c61.png](https://img-blog.csdnimg.cn/img_convert/f4cbaf30ea2b52c3f466c936e0887c61.png)
DeviceId为设备的编码
TcpVideo 为0表示UDP取流 为1表示tcp取流
Part6相机配置
![2f532f7bcaadc002d9bbb70e4cdcfd23.png](https://img-blog.csdnimg.cn/img_convert/2f532f7bcaadc002d9bbb70e4cdcfd23.png)
Part7相机管理
另外我们还引入了轻量级的sqlite管理接入的相机,可以用工具打开camera.db文件即可查看。
![6c058e29e51450d8fcf7e8cd2ea33765.png](https://img-blog.csdnimg.cn/img_convert/6c058e29e51450d8fcf7e8cd2ea33765.png)
Part8程序地址
链接:https://pan.baidu.com/s/1X1fLDeyqLzzoix0AjOsRlg?pwd=rq20 提取码:rq20 --来自百度网盘超级会员V6的分享
Part9技术支持
请关注公众号g0415shenw 加入知识星球。