Building a Live Streaming System Using BT Panel —— Nginx + RTMP + HLS

sh06y Posted on 2021-02-03 6,868 Views Last updated on 5 days ago


AI Excerpt

Start the Baota panel, easily compile and install Nginx that supports Rtmp and Hls modules, and start an efficient live broadcast system. Detailed steps will help you go from command line to smooth streaming, witness the charm of technology step by step, and explore the new world of live broadcasting immediately!

Environment: Ubuntu 20.04.1, Baota Linux Panel, nginx 1.19.6

Build steps

Please install the pagoda panel yourself

1. Compile nginx

To use rtmp, you need to use nginx's rtmp module, so you need to recompile nginx

1. Login panel-software store-nginx-compile and install-add custom module

 

2. Enter nginx_rtmp_module for module name and description, and fill in --add-module=/www/server/nginx/src/nginx-rtmp-module for parameters.

Pre-script input:

 

3. Submit, select the module, submit, and wait for the compilation to complete

4. Enter nginx -V in the command line to check whether the installation is successful

2. Configure rtmp

Software Store-nginx-Settings-Configuration Modification
Add rtmp configuration in it

1935193540963

save

3. Configure hls

Baota Panel-Website-Add Site

Please fill in the information here according to the actual situation

After the new creation is completed, enter the site settings-configuration file

Add hls configuration

; }

save

test

rtmp test

Start OBS, set the streaming target, fill in the server address, and write a random streaming key.

Start streaming

Open vlc-Network Stream, enter the set rtmp address, click play to see the picture

HLS test

vlc-network streaming, enter [kbd][http/https]://[server address]/live/[streaming key].m3u8[/kbd], click play to see the screen

 

Reference articles:

https://www.bt.cn/bbs/thread-51618-1-1.html