-based Media Streaming


RTMP/HLS/MPEG-DASH live streaming

RTMP on demand FLV/MP4, playing from local filesystem or HTTP

Stream relay support for distributed streaming: push & pull models

Recording streams in multiple FLVs

H264/AAC support

Online transcoding with FFmpeg

HTTP callbacks (publish/play/record/update etc)

Running external programs on certain events (exec)

HTTP control module for recording audio/video and dropping clients

Advanced buffering techniques to keep memory allocations at a minimum level for faster streaming and low memory footprint

Proved to work with Wirecast, FMS, Wowza, JWPlayer, FlowPlayer, StrobeMediaPlayback, ffmpeg, avconv, rtmpdump, flvstreamer and many more

Statistics in XML/XSL in machine- & human- readable form


1. Log into your server as root.

2. the required dependencies:

-y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel git

3. Make a directory to work in:

mkdir source; cd source

4. the source tarball & checkout latest nginx-rtmp-module

wget http://nginx.org/download/nginx-1.8.0.tar.gz; tar -xzf nginx-1.8.0.tar.gz

git clone https://github.com/arut/nginx-rtmp-module.git

5. Compile the server, with the module included

cd nginx-1.8.0

./configure –user=nginx –group=nginx –add-module=../nginx-rtmp-module/ –prefix=/etc/nginx –sbin-path=/usr/sbin/nginx –conf-path=/etc/nginx/nginx.conf –error-log-path=/var/log/nginx/error.log –http-log-path=/var/log/nginx/access.log –pid-path=/var/run/nginx.pid –lock-path=/var/run/nginx.lock –http-client-body-temp-path=/var//nginx/client_temp –http-proxy-temp-path=/var//nginx/proxy_temp –http-fastcgi-temp-path=/var//nginx/fastcgi_temp –http-uwsgi-temp-path=/var//nginx/uwsgi_temp –http-scgi-temp-path=/var//nginx/scgi_temp –with-http_ssl_module –with-http_realip_module –with-http_addition_module –with-http_sub_module –with-http_dav_module –with-http_flv_module –with-http_mp4_module –with-http_gunzip_module –with-http_gzip_static_module –with-http_random_index_module –with-http_secure_link_module –with-http_stub_status_module –with-mail –with-mail_ssl_module –with-file-aio –with-ipv6

make; make install

6. Add the nginx ‘user’

useradd -r nginx

7. Add init.d script

Download the init.d script (ripped from the official nginx RPM):

wget -O /etc/init.d/nginx http://pastebin.com/raw.php?i=XhNPr6Y7

Mark it executable:

chmod +x /etc/init.d/nginx

Set nginx to start when the system does:

chkconfig –add nginx

chkconfig –level 345 nginx on

8. That’s it! Continue to “Basic configuration” in the nginx-rtmp-server tutorial.

Print Friendly, PDF & Email



Bài viết liên quan