Comments (11)
已经修改好了, 其实很简单,在ngx_rtmp_auto_push_reconnect这个接口里面稍微修改一下
from nginx-http-flv-module.
reload连接暂时不断开的设计初衷是在不断开现有连接的情况下可以热更新nginx,要改得改nginx本身的源代码,不打算支持
from nginx-http-flv-module.
恩, 我们只是讨论下这个问题, 这个问题其实蛮严重的, 按照nginx原生的设计原理, reload是重新开启进程,原有的进程之上的链接直至全部断开才会停用, 并且原有的进程不会再继续监听端口, 新的链接请求会被分配到新的进程,这样造成的后果,原来的推流一直在, 但是客户端再去拉流,其实是拉不到流的。
from nginx-http-flv-module.
我倒是有个思路, 类似于rtmp_auto_push,服务reload之后, 老进程里面保留的推流, 主动往新进程推送, 这样保证新链接进来之后, 能够从新的进程里拉到流, 同时也不破坏nginx原有的机制, 老进程的链接都正常消亡之后, 再推出,流自然断开之后, 就顺利被新进程接管了。
from nginx-http-flv-module.
老的进程怎么知道新进程的信息,这点很关键
from nginx-http-flv-module.
将定时器开启, 推流进程自动会检测是否有新进程, 然后再把流推过去就好了, 这样新老进程都有流, 当推流结束的时候, 老进程就会自然消亡。
from nginx-http-flv-module.
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.
@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.
@DoM1niC Hi, do you use this module in production?
from nginx-http-flv-module.
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.
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)
- [bug] rtmp url stuck after a while HOT 6
- to big message error log HOT 4
- max_streams
- [bug] ffmpeg exiting after 9 seconds HOT 12
- variable 'nbufs' set but not used [-Werror,-Wunused-but-set-variable] HOT 4
- Why don't we provide a default compiled software package? HOT 2
- [question] http://example.com[:port]/dir/streamname.m3u8 unable to play HOT 4
- [bug] live: already publishing HOT 5
- ffmpeg [rtmp]: Cannot open connection tcp://127.0.0.1:1935?tcp_nodelay=0
- WriteN, RTMP send error 32(**bytes) HOT 2
- [bug] nginx reload causes lots of errors: 111: Connection refused and auto_push: connect failed in error log HOT 5
- unknown directive "rtmp" HOT 2
- Dynamic proxy pass HOT 1
- The clock rate during play video by HTTP-FLV is slower compared to the normal clock rate. HOT 1
- I have disabled gop cache,but the time of requesting for http-flv first frame is too long. HOT 3
- fls切片只有声音没有画面,vlc和浏览器播放都是如此 HOT 1
- [bug] Directory Permissions error when moving to nginx 1.26
- two questions for me about control record HOT 1
- redirect with domain name?
- [bug] Abnormal CPU, Memory usage within Ubuntu 24.04(noble-20240605), Nginx 1.24.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-http-flv-module.