Last active
July 4, 2017 14:37
-
-
Save MatrixMuto/3c112fd3ef337d19d539fba451e9a457 to your computer and use it in GitHub Desktop.
setup nginx rtmp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rtmp { | |
server { | |
listen 1935; | |
chunk_size 4000; | |
# TV mode: one publisher, many subscribers | |
application mytv { | |
# enable live streaming | |
live on; | |
# publish only from localhost | |
allow publish 115.195.179.6; | |
deny publish all; | |
} | |
} | |
} | |
# HTTP can be used for accessing RTMP stats | |
http { | |
server { | |
listen 80; | |
# This URL provides RTMP statistics in XML | |
location /stat { | |
rtmp_stat all; | |
# Use this stylesheet to view XML as web page | |
# in browser | |
rtmp_stat_stylesheet stat.xsl; | |
} | |
location /stat.xsl { | |
# XML stylesheet to view RTMP stats. | |
# Copy stat.xsl wherever you want | |
# and put the full directory path here | |
root /path/to/stat.xsl/; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum -y install git-core gcc pcre-devel openssl-devel | |
git clone https://github.com/arut/nginx-rtmp-module.git | |
wget http://nginx.org/download/nginx-1.12.0.tar.gz | |
tar xvf nginx-1.12.0.tar.gz | |
cd nginx-1.12.0 | |
./configure --add-module=../nginx-rtmp-module | |
make && make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment