Building rtmp live streaming service 1: Use nginx to build rtmp server (installation of nginx-rtmp module and rtmp live streaming configuration)

WBOY
Release: 2016-07-28 08:29:18
Original
1594 people have browsed it

1. Brief plan

First of all, through careful study of the development plan (real-time monitoring, streaming media, data source of live streaming plan-->Protocol conversion-->Server-->Simple front-end playback Introduction: http://blog.csdn.net/eguid_1/article/details/51725970)

Second, use nginx as the rtmp live streaming server

Since there is already an nginx server, (the nginx web Configuration: http://blog.csdn.net/eguid_1/article/details/51727060) Two test websites are running on this server, which is very suitable for nginx-rtmp server construction, so nginx was finally used to build rtmp live streaming service.

3. nginx configuration

1. Installation of nginx-rtmp module

(Note: Since there are many things in this area, I will directly link to the website I referenced when installing it, which is still very good )

1.1, nginx environment construction can use the lamp package for integrated environment installation (easier and faster installation)

You can see here: https://blog.linuxeye.com/31.html

1.2, nginx-rtmp module installation and on-demand configuration

can be seen here: https://blog.linuxeye.com/383.html

2, nginx configuration

in the previous web Just add an rtmp server based on the configuration,

(Note: the rtmp service is an independent service, do not confuse it with the http service. It listens to port 1935 by default and allows all users to play)

The configuration is as follows :

#rtmp service
rtmp
{
 #LIVE
  server
  {
     listen 1935;
     chunk_size 4000;

     application live
     {
        live on;
       
        allow play all;
     }
   }
}

Copy after login

Added: I configured it like this:

 搭建rtmp直播流服务之1:使用nginx搭建rtmp服务器(nginx-rtmp模块的安装以及rtmp直播流配置)

The above has introduced the building of rtmp live streaming service 1: using nginx to build rtmp server (installation of nginx-rtmp module and rtmp live streaming configuration), including the content, I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!