Git Product home page Git Product logo

Comments (11)

han4235 avatar han4235 commented on August 25, 2024 1

已经修改好了, 其实很简单,在ngx_rtmp_auto_push_reconnect这个接口里面稍微修改一下

from nginx-http-flv-module.

winshining avatar winshining commented on August 25, 2024

reload连接暂时不断开的设计初衷是在不断开现有连接的情况下可以热更新nginx,要改得改nginx本身的源代码,不打算支持

from nginx-http-flv-module.

han4235 avatar han4235 commented on August 25, 2024

恩, 我们只是讨论下这个问题, 这个问题其实蛮严重的, 按照nginx原生的设计原理, reload是重新开启进程,原有的进程之上的链接直至全部断开才会停用, 并且原有的进程不会再继续监听端口, 新的链接请求会被分配到新的进程,这样造成的后果,原来的推流一直在, 但是客户端再去拉流,其实是拉不到流的。

from nginx-http-flv-module.

han4235 avatar han4235 commented on August 25, 2024

我倒是有个思路, 类似于rtmp_auto_push,服务reload之后, 老进程里面保留的推流, 主动往新进程推送, 这样保证新链接进来之后, 能够从新的进程里拉到流, 同时也不破坏nginx原有的机制, 老进程的链接都正常消亡之后, 再推出,流自然断开之后, 就顺利被新进程接管了。

from nginx-http-flv-module.

winshining avatar winshining commented on August 25, 2024

老的进程怎么知道新进程的信息,这点很关键

from nginx-http-flv-module.

han4235 avatar han4235 commented on August 25, 2024

将定时器开启, 推流进程自动会检测是否有新进程, 然后再把流推过去就好了, 这样新老进程都有流, 当推流结束的时候, 老进程就会自然消亡。

from nginx-http-flv-module.

DoM1niC avatar DoM1niC commented on August 25, 2024

winshining its time to say THX 2 for this nice NGINX RTMP Fork!!!

I can't read thai or so... I hope it's the same problem like me, after NGINX Reload the FLV Stream isn't available anymore, I need to reconnect the Stream like in OBS to recreate the URL. Could you tell me how to fix it... The Problem is I build a own Webinterface their create automatic a conf file 4 the RTMP, after this I need to reload NGINX.

from nginx-http-flv-module.

winshining avatar winshining commented on August 25, 2024

@DoM1niC Yes, the issue is about what you think. But I'm afraid that we can hardly fix the problem. When Nginx reloads, the old processes will check if there are some connections between the server and the clients, so they won't exit until finishing to serve the last connection. However, during that time, the old processes will not accept new connections and the new spawned processes are ready to do the job, so if you close the FLV stream while you are still pushing stream, the old processes will not exit and will not accept new FLV connections. At this time, you initialize a connection to the server, the new process accept the connection, but the pushing stream is on the old one still, that is the reason why you can not play the FLV stream. This is the mechanism of Nginx, one solution is to add dynamic config file parsing feature, then we can reload the config file without reloading Nginx. Nginx-Plus has the feature we want, but it is not open source:(
BTW, the language you see above is not Thai but Chinese:)

from nginx-http-flv-module.

HeyJupiter avatar HeyJupiter commented on August 25, 2024

@DoM1niC Hi, do you use this module in production?

from nginx-http-flv-module.

DoM1niC avatar DoM1niC commented on August 25, 2024

This here :) @HeyJupiter

btw. @winshining Reloading is no more necessary I switched to a own on_publish PHP Script 2 handle all coming Updates with ne Streams aka Users, the best thing Broadcast / Stream App are bridge to resolve other Stream Names in production. Multistreaming is working too easy header redirecting for other RTMP Services.

Notice notify musst POST and the stream key name is send by default like $name =$_POST["name"]; or for App -> $app=$_POST["app"];

Read on_publish Directives to unterstand more what I wrote :D

from nginx-http-flv-module.

chundonglinlin avatar chundonglinlin commented on August 25, 2024

The old shutting_down worker can still listen on a port to provide services by using per
_worker config.

from nginx-http-flv-module.

Related Issues (20)

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.