In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
How to analyze the defects of nginx-rtmp-module, I believe that many inexperienced people do not know what to do about it. Therefore, this paper summarizes the causes and solutions of the problems. Through this article, I hope you can solve this problem.
VHOST (virtual host) means one address and multiple domains, and mainstream Web servers all have this function. It solves the problem that hosts running Web can provide services for requests from different domain names under the same IP address. Suppose there are two domain names An and B, and on DNS, An and B both point to the same A record (IPv4) or AAAA record (IPv6). The Web server resolves different domain name information to different configurations, thus providing different services for An and B. The approximate process for Nginx to match to the corresponding configuration based on the requested information (port, IP address and domain name) is as follows:
Nginx-rtmp-module has a serious problem: if there is no listen option in the rtmp configuration block, it will not run at all because there is no default listening on any port. And even if the listen option is configured, it cannot find the correct configuration based on the domain name. For example, the configuration is as follows:
Rtmp {
Server {
Listen 1935
...
}
Server {
Listen 1935
...
}
}
If I want to push to an application,nginx-rtmp-module in the second server configuration block, I can only push the stream to an application in the first server configuration block, because it does not have the same functionality as the server_name configuration item provided by Nginx itself. The reason is that nginx-rtmp-module does not implement the functions of "domain name matching" and "domain name matching" in the above figure. This problem also causes stat.xsl not to consider the function of adapting VHOST, so even if it can be pushed to an application in the second server configuration block, if the name of this application is the same as an application in the first server configuration block, when querying statistics, click the details of the second application, and the details of the first application will be opened. Nginx-http-flv-module partially solves this problem. There is no problem in single-process mode and in some cases in multi-process mode, as described in nginx-http-flv-module-note-6. This is because when a process receives a push request, it will auto push the stream to another process, which is achieved through unix domain socket, but unix domain socket, unlike the socket of the AF_INET/AF_INET6 protocol family, does not have a port number, so it does not know how to pass the port number from the process receiving the push to another process to match the correct configuration.
Welcome to my project based on nginx-rtmp-module: nginx-http-flv-module.
After reading the above, have you mastered the method of how to analyze the defects of nginx-rtmp-module? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.