Nginx rtmp Streaming Media Server Setup

Source: Internet
Author: User

Nginx under the rtmp module installation:

Installation in LNMP environment:

cd lnmp/srcyum -y install gitwget http://www.tortall.net/projects/yasm/releases/ yasm-1.2.0.tar.gztar xzf yasm-1.2.0.tar.gzcd yasm-1.2.0./configuremake &&  MAKE INSTALLCD&NBSP, .... git clone git://git.videolan.org/x264.gitcd x264./configure --enable-sharedmake & & MAKE INSTALLCD&NBSP, .... wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gztar xzf  lame-3.99.5.tar.gzcd lame-3.99.5./configure --enable-nasmmake && make  INSTALLCD&NBSP, .... Wget http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gztar xzf libogg-1.3.1.tar.gzcd  LIBOGG-1.3.1./CONFIGUREMAKE && MAKE INSTALLCD&NBSP, .... wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gztar xzf  libvorbis-1.3.3.tar.gzcd libvorbis-1.3.3ldconfig./configuremake && make installcd&nbsp, .... Git clone http://git.chromium.org/webm/libvpx.gitcd libvpx./configure --enable-sharedmake  && MAKE INSTALLCD&NBSP, .... wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gztar xzf faad2-2.7.tar.gzcd  FAAD2-2.7./CONFIGUREMAKE && MAKE INSTALLCD&NBSP, .... wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gztar xzf faac-1.28.tar.gzcd  faac-1.28sed -i  ' [email protected]^char \*[email protected]//char *[email  Protected] '  ./common/mp4v2/mpeg4ip.h./configuremake && make installcd  Wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gztar xzf xvidcore-1.3.2.tar.gzcd  XVIDCORE/BUILD/GENERIC./CONFIGUREMAKE && MAKE INSTALLCD&NBSP, .... /.. /.. /git clone git://source.ffmpeg.org/ffmpeg.gitcd ffmpeg./configure --prefix=/usr -- Enable-version3  --enable-libvpx --enable-libfaac --enable-libmp3lame  --enable-libvorbis -- enable-libx264 --enable-libxvid --enable-shared --enable-gpl --enable-postproc -- enable-nonfree  --enable-avfilter --enable-pthreadsmake && make  INSTALLLDCONFIGFFMPEGCD&NBSP, .... wget http://h264.code-shop.com/download/nginx_mod_h264_streaming-2.2.7.tar.gzgit clone git:// github.com/arut/nginx-rtmp-module.gittar xzf nginx_mod_h264_streaming-2.2.7.tar.gzsed -i  ' 158,[email protected]^@//@g '  nginx_mod_h264_streaming-2.2.7/src/ngx_http_streaming_module.ccd  nginx-1.4.4make clean./configure --prefix=/usr/local/nginx --user=www --group=www -- With-http_stub_status_module --with-http_ssl_module --with-http_flv_module --with-http_gzip_ Static_module --with-ld-opt=-ljemalloc --with-http_mp4_module --add-module=. /nginx_mod_h264_streamIng-2.2.7 --add-module=. /nginx-rtmp-modulemakeif [ -e  "Objs/nginx"  ];then         /bin/mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx$ (date +%m%d)          /bin/cp objs/nginx /usr/local/nginx/sbin/nginx         service nginx restartfi

Configure Nginx Video Live:

The general format of Rtmp Live is Rtmp://www.linuxeye.com/app/name, where the name of the app is for application's name

rtmp {           #保存所有rtmp配置的块      server {          #声明一个rtmp实例          listen 1935;        #给Nginx添加一个监听端口以接收rtmp连接          chunk_size 4096;       # The maximum block size for stream consolidation. The default value is 4096. The larger the value is set, the smaller the CPU load. This value cannot be less than 128        application mp4 {            #app的名字为mp4                  live on;                  #切换直播模式, a one-to-many broadcast                  play /home/wwwroot/www.linuxeye.com/mp4;   #播放指定mP4 file directory                 }         } }

This article is from the "ZPP" blog, make sure to keep this source http://1439337369.blog.51cto.com/10270624/1794431

Nginx rtmp Streaming Media Server Setup

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.