Nginx + RTMP live streaming server

 September
2021-03-11 / 1 comments / 978 reading / Checking for inclusion
This article is based on the pagoda panel

Uninstall nginx

The configuration of nginx RTMP and nginx is different, and the installation of nginx RTMP is not supported in the pagoda panel

Pre download nginx

 cd /www/server git clone  https://github.com/arut/nginx-rtmp-module.git #Git Error installing git: Yum - y install Git

Modify configuration (pay attention to format)

 vim /www/server/panel/install/nginx.sh

Add module: --add-module=/www/server/nginx-rtmp-module

Install nginx (a long time, can cooperate with screen)

 sh /www/server/panel/install/nginx.sh install 1.18

Create a website and remember the site directory

Modify nginx configuration

Setup configuration modification about 13 lines added

 rtmp { server { listen 6666; # Monitor the port, randomly change, after replacement remember square corresponding port chunk_ size 4000; application hls { live on; hls on; hls_ path /www/wwwroot/xx.com/live; # This is the live folder path hls_ fragment 5s; } } }

Overload, restart nginx

Push flow

Streaming address: rtmp://IP:port/hls

Play address: http://IP/live/ Streaming key.m3u8

The streaming key is set in the streaming client, such as obs

Firewall release port


This paper refers to: https://blog.csdn.net/qq_35774849/article/details/106334115

two

comment

Bloggers have closed comments on all pages
//