Coder Social home page Coder Social logo

chatop2020 / streamnode-gb28181 Goto Github PK

View Code? Open in Web Editor NEW
147.0 18.0 61.0 1.95 MB

本项目是基于ZLMediaKit的流媒体控制管理接口平台,支持RTSP,GB28181的设备拉流与推流控制,GB28181支持PTZ控制。

C# 99.96% HTML 0.04%
gb28181 mediaserver rtp zlmediakit rtspserver

streamnode-gb28181's People

Contributors

chatop avatar chatop2020 avatar funthing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

streamnode-gb28181's Issues

推流鉴权问题

OnPublishNew,req.MediaServerId 这个为什么是空的?哪里配置的问题吗?

StreamMediaServerKeeper报错:Data Exception

运行StreamMediaServerKeeper时报错
2020-11-16 19:02:47,471 [7] ERROR StreamNode - 报错了-> Object reference not set to an instance of an object. -> at StreamMediaServerKeeper.ProcessApis.CheckIsRunning(ResponseStruct& rs) in /work/StreamNode_1116/StreamNode-GB28181-master/StreamMediaServerKeeper/ProcessApis.cs:line 145
at StreamMediaServerKeeper.Common.KeepAlive() in /work/StreamNode_1116/StreamNode-GB28181-master/StreamMediaServerKeeper/Common.cs:line 456

获取设备目录失败

我用的海康摄像头,传输协议改成tcp,服务端就会显示获取设备目录失败,udp是没有问题的。

StreamMediaServerKeeper引用ini-parser问题

VS打开提示ini-parser依赖项有问题,不过程序可以正常运行,猜测这个ini-parser应该是.Net Framework的依赖项,.NetCore版本的应该是ini-parser-netstandard,切换成ini-parser-netstandard运行未发现问题,ini文件可以正常解析。

keeper 改变之后重新启动

如果keeper的配置config.conf改变之后,如果重新启动之后

对应的webapi----无法自动重来上来,验证很多次都是一样的情况

虽然不影响,只是问题放这里说明一下

GIT时错误

git clone https://github.com/chatop2020/StreamNode-GB28181.git
Cloning into 'StreamNode-GB28181'...
remote: Enumerating objects: 211, done.
remote: Counting objects: 100% (211/211), done.
remote: Compressing objects: 100% (140/140), done.
error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 110
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
[root@localhost ~]# git config http.sslVerify "false"
fatal: not in a git directory
[root@localhost ~]# git config --global http.sslVerify "false"
[root@localhost ~]# git config http.sslVerify "false"
fatal: not in a git directory

在windows下运行 StreamNodeWebApi报以下错误

C:\Users\lawre\source\repos\Git_Projects\StreamNode - GB28181\StreamNodeWebApi\bin\Debug\netcoreapp3.1>streamnodewebapi
Starting logging initialisation.
2020-10-09 13:59:22.697 [Debug]: Target framework: .Net Core 3.1
2020-10-09 13:59:22.701 [Debug]: EnvironmentVariables.MICRO_REGISTRY_ADDRESS:
2020-10-09 13:59:22.702 [Debug]: EnvironmentVariables.GB_NATS_CHANNEL_ADDRESS:
2020-10-09 13:59:22.702 [Debug]: EnvironmentVariables.DEVICE_MANAGEMENT_SERVICE_ADDRESS:
2020-10-09 13:59:22.702 [Debug]: EnvironmentVariables.SYSTEM_CONFIGURATION_SERVICE_ADDRESS:
2020-10-09 13:59:22.703 [Debug]: EnvironmentVariables.GB_SERVICE_LOCAL_IP:
2020-10-09 13:59:22.704 [Debug]: EnvironmentVariables.GB_SERVICE_LOCAL_ID:
2020-10-09 13:59:22.704 [Debug]: EnvironmentVariables.GBServerGrpcPort: 50051
2020-10-09 13:59:22.704 [Debug]: Notes: if EnvironmentVariables have no value, it gets from xml config.
2020-10-09 13:59:22.864 [Debug]: Load assets from xml with local ip&port is 192.168.0.100:5060
2020-10-09 13:59:22.868 [Debug]: 1 GB28181.App.SIPAccount assets loaded from XML record set.
2020-10-09 13:59:22.869 [Debug]: Starting file watch on C:\Users\lawre\source\repos\Git_Projects\StreamNode - GB28181\StreamNodeWebApi\bin\Debug\netcoreapp3.1\Config\gb28181.xml.
2020-10-09 13:59:22.886 [Debug]: SIPRegistrarCore is running at Udp:192.168.0.100:5060
2020-10-09 13:59:22.888 [Debug]: SIPMessageCore is runing at udp:192.168.0.100:5060
[2020-10-9 13:59:22] 启动日志转存服务...(循环间隔:600000ms)
2020-10-09 13:59:22.909 [Debug]: SIPUDPChannel socket on 0.0.0.0:5060 listening started.
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://[::]:5800
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\lawre\source\repos\Git_Projects\StreamNode - GB28181\StreamNodeWebApi\bin\Debug\netcoreapp3.1
报错了:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(3),
UpdateTime DATETIME(3),
Activated BIT(1),
PRIMARY KEY (Id' at line 19
at FreeSql.Internal.CommonProvider.CodeFirstProvider.SyncStructure(TypeAndName[] objects)
at FreeSql.Internal.CommonProvider.CodeFirstProvider.SyncStructureTEntity
at FreeSql.Internal.CommonProvider.Select0Provider2..ctor(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, Object dywhere) at FreeSql.Internal.CommonProvider.Select1Provider1..ctor(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, Object dywhere)
at FreeSql.MySql.Curd.MySqlSelect1..ctor(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, Object dywhere) at FreeSql.MySql.MySqlProvider1.SelectT1
at StreamNodeWebApi.AutoTasker.CameraAutoKeeper.keeperCamera() in C:\Users\lawre\source\repos\Git_Projects\StreamNode - GB28181\StreamNodeWebApi\AutoTasker\CameraAutoKeeper.cs:line 455
报错了:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(3),
UpdateTime DATETIME(3),
Activated BIT(1),
PRIMARY KEY (Id' at line 19
at FreeSql.Internal.CommonProvider.CodeFirstProvider.SyncStructure(TypeAndName[] objects)
at FreeSql.Internal.CommonProvider.CodeFirstProvider.SyncStructureTEntity
at FreeSql.Internal.CommonProvider.Select0Provider2..ctor(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, Object dywhere) at FreeSql.Internal.CommonProvider.Select1Provider1..ctor(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, Object dywhere)
at FreeSql.MySql.Curd.MySqlSelect1..ctor(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, Object dywhere) at FreeSql.MySql.MySqlProvider1.SelectT1
at StreamNodeWebApi.AutoTasker.CameraAutoKeeper.keeperCamera() in C:\Users\lawre\source\repos\Git_Projects\StreamNode - GB28181\StreamNodeWebApi\AutoTasker\CameraAutoKeeper.cs:line 455

用的是MySQL 5.5.49,已创建streamnode数据库

可能有点莫名其妙的需求

需求:将MediaServer直接作为项目的一部分,发布时直接赋值到输出目录

实现步骤:

1、将MediaServer文件夹放到StreamMediaServerKeeper项目文件夹中,然后修改StreamMediaServerKeeper.csproj,新增代码:

    <ItemGroup>
      <None Include="MediaServer\**" 
        CopyToOutputDirectory="PreserveNewest"
         />
    </ItemGroup>

作用:生成或发布时,如果MediaServer文件夹中的内容有修改,则复制到输出目录。

2、修改StreamMediaServerKeeper项目中的Config.conf,将MediaServerBinPath更改为包含~符号的相对目录,~代表StreamMediaServerKeeper可执行程序的目录。

3、修改StreamMediaServerKeeper\Common.cs,将MediaServerBinPath 赋值语句修改为MediaServerBinPath = tmpArr[1].Trim().TrimEnd(';').Replace("~", AppDomain.CurrentDomain.BaseDirectory); 即如果检测到配置文件目录中包含~符号,则视为可执行程序所在目录。

这样后续发布到新的服务器可以直接将StreamMediaServerKeeper生成的文件夹复制过去,不需要重新配置MediaServer目录。

能否做成docker部署?

如题,咱们这个能否可以做成docker部署?编译好后还要单独安装zlmediakit吗?还是咱们这个里面就已经内置了,不需要单独再另外部署安装?

readme是否可以增加编译运行的说明

没有接触过C# .net,折腾了一下午,还是没有跑起来。。。

是否可以把 编译 运行命令说明一下,帮助第一次接触项目的人,可以先跑起来,再去深究代码逻辑

感谢开源

StreamMediaServerKeeper适配Windows问题

菜鸟有一个小小的疑问,StreamMediaServerKeeper这个项目是没有适配Windows吗?启动MediaServer的相关代码我看适配的是Linux和OSX。
另外就是直接使用process.StartInfo.FileName = "MediaServer路径"这样的形势启动MediaServer和process调用命令去启动MediaServer的相比较会有什么问题吗?感觉前者更容易实现跨平台。调用命令的话还要针对Linux和Windows编写不同的命令。是因为nohup的原因吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.