-based Media Streaming Server

Features

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

Linux//MacOS/

1. Log into your server as .

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. Download 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--temp-path=/var/cache/nginx/_temp –http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp –http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp –http-scgi-temp-path=/var/cache/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 ):

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

Comments

comments

Bài viết liên quan