Install nginx-rtmp streaming Media server on Ubuntu 14

Source: Internet
Author: User

One: RTMP

RTMP Streaming protocol is a set of Adobe developed audio video real-time transmission protocol;

Two: Nginx-rtmp

Nginx-rtmp is an nginx-based rtmp service module, open source, free

Https://github.com/arut/nginx-rtmp-module

Three: Installation process in Ubuntu Server 14

1. Download the installation nginx and nginx-rtmp compiler dependent tools first

sudo Install build-essential libpcre3 Libpcre3-dev Libssl-dev

2. Create a working directory and switch to the working directory

mkdir ~/~/working

3. Download Nginx and Nginx-rtmp source code

wget http://nginx.org/download/nginx-1.7.5.tar.gzwget https://  Github.com/arut/nginx-rtmp-module/archive/master.zip

4. Install the Unzip tool and unzip the downloaded installation package

sudo Install Unzip

5. Extracting Nginx and NGINX-RTMP installation packages

tar -zxvf nginx-1.7. 5. Tar . GZ Unzip Master. Zip

6. Switch to the nginx-directory

CD nginx-1.7. 5

7. Add nginx-rtmp template to Nginx

./configure--with-http_ssl_module--add-module=.. /nginx-rtmp-module-master

8. Compiling the installation

 Make sudo  Make Install

9. Installing the Nginx init script

sudo wget https://raw.github.com/jasongiedymin/nginx-init-ubuntu/master/nginx-o/etc/init.d/ Nginxsudochmod +x/etc/init.d/nginx update-rc.d nginx Defaults

10. Start and stop Nginx service, generate configuration file

sudo Service Nginx Start sudo service nginx stop

11. Installing FFmpeg

sudo apt-add-repository ppa:jon-severinsson/ffmpegsudo apt-get updatesudo  Install ffmpeg

12. Configuring the NGINX-RTMP Server

Open/usr/local/nginx/conf/nginx.conf

Add the following configuration at the end

rtmp {    server {            1935;             4096 ;            Application Live {                    live on;                    Record off;                     -I rtmp://localhost/live/$name-threads 1-c:v libx264-profile:v baseline-b:v 350k-s 640x360-f flv-c: A aac-ac 1-strict-2-b:a 56k rtmp://localhost/live360p/$name;             }            application live360p {                    live on;                    Record off;     }}}

13. Save the above configuration file and restart the Nginx service

sudo service nginx restart

14. If you are using a firewall, allow port TCP 1935

16: Using the client, video real-time acquisition using RTMP protocol

1: rtmp://your.vultr.ip/live/2: Stream-key-your-set

In this video collection I'm using the IPhone5 collection program Https://github.com/jgh-/VideoCore

            [_session Startrtmpsessionwithurl:@ "rtmp://192.168.86.246/live/" andstreamkey:@ "  test"];

17. In the process of client acquisition above, you can use VLC player to open rtmp live stream

RTMP://Your.vultr.ip/live/stream-key-you-set

Open the flow above to test the real-time effect

18: About Nginx-rtmp more configuration

HTTPS://github.com/arut/nginx-rtmp-module/wiki/directives

Reference: https://www.vultr.com/docs/setup-nginx-rtmp-on-ubuntu-14-04

Install nginx-rtmp streaming Media server on Ubuntu 14

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.