Install nginx

My VM is Red Hat 4.4.7-4. Ensure that the VM can access the network

1, download nginx link nginx.org/ I am download nginx-1.6.2 version

2, Download RTMP module github.com/arut/nginx-…

Nginx-rtmp-module-master = nginx-1.6.2 nginx-1.6.2.tar.gz = nginx-rtmp-module-master = nginx-1.6.2 nginx-1.6.2.tar.gz

Yum -y install pcre pcre-devel yum -y install openssl openssl-devel

/configure –prefix=/usr/local/nginx –add-module=.. /nginx-rtmp-module-master –with-http_ssl_module

6. Run make && make install

The /usr/local/nginx directory is displayed after the installation is complete

Configuration RTMP

1, start configuring vim/usr/local/nginx/conf/nginx. Conf, add the following information:

RTMP {server {listen 1935; Chunk_size. 4000; Application myLive {live on; Record all; Record_path/opt/video/vod; Record_max_size 200 m; HLS on; Hls_path/opt/video/HLS; Hls_fragment 1 s; Hls_playlist_length 5; Allow play all; } Application live{live on; }}Copy the code

Path The path can be customized.

2, perform service restart/usr/local/nginx/sbin/nginx -s reload here to pay attention to the space of each file, must pay attention to or may be an error,

3. If the startup is successful, the flow can be pushed happily. I used DJI Action equipment to connect Mimo for simulation

4, enter RTMP address, I am here is the RTMP: / / 1.1.1.1:1935 / mylive/test1

5, click start broadcast live, live also need to look at, and also as long as the input RTMP: / / 1.1.1.1:1935 / mylive/test1, recommend a RTMP watching address:meetpasser.com/webplayer/The recorded file is also saved to the previously configured path, for example, /opt/video/vod

conclusion

Scatter flowers, the end.Copy the code