1. RTMP RTMP streaming protocol is a real-time audio and video transmission protocol developed by Adobe; 2. Nginx-rtmp nginx-rtmp is an RTMP service module based on nginx, open source, free https://github.com/arut/nginx-rtmp-module 3: Installation process in Ubuntu server 14 1. First download and install nginx and nginx-rtmp compilation dependency tools sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev 2. Create a working directory and switch to it mkdir ~/working cd ~/working 3. Download nginx and nginx-rtmp source code wget http://nginx.org/download/nginx-1.7.5.tar.gz 4. Install the unzip tool and decompress the downloaded installation package sudo apt-get install unzip 5. Unzip the 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. Compile and install make sudo make install 9. Install nginx init script sudo wget https://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx -O /etc/init.d/nginx sudo chmod +x /etc/init.d/nginx sudo update-rc.d nginx defaults 10. Start and stop the nginx service and generate the configuration file sudo service nginx start sudo service nginx stop 11. Install FFmpeg sudo apt-add-repository ppa:jon-severinsson/ffmpeg sudo apt-get update sudo apt-get install ffmpeg 12. Configure nginx-rtmp server Open /usr/local/nginx/conf/nginx.conf Add the following configuration at the end rtmp { server { listen 1935; chunk_size 4096; application live live on; record off; exec ffmpeg -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 14. If you use a firewall, please allow port tcp 1935 16: Use the client to collect video in real time using the rtmp protocol Field 1: rtmp://your.vultr.ip/live/ Field 2: stream-key-your-set For video capture, I use the iPhone5 capture program https://github.com/jgh-/VideoCore [_session startRtmpSessionWithURL:@"rtmp://192.168.86.246/live/" andStreamKey:@"test"]; 17. During the client acquisition process above, you can use the VLC player to open the RTMP real-time stream rtmp://your.vultr.ip/live/stream-key-you-set Open the above stream to test the real-time effect 18: More configuration about nginx-rtmp https://github.com/arut/nginx-rtmp-module/wiki/Directives Summarize The above is the tutorial on how to install Nginx-RTMP streaming media server on Ubuntu 14. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: How to modify the mysql table partitioning program
>>: WeChat applet learning notes: page configuration and routing
The blogger said : I have been writing a series o...
Today I want to summarize several very useful HTML...
1. Software Introduction VirtualBox VirtualBox is...
This article shares the second article of using j...
1. Business Background Using a mask layer to shie...
Set Anchor Point <a name="top"><...
1. Inner Join Query Overview Inner join is a very...
Table of contents Preface 1. bat executes js 2. T...
This article shares the specific code of jQuery t...
Table of contents Brief description: 1. Four char...
Preface Most of our MySQL online environments use...
principle The principle of anti-shake is: you can...
The nginx logs are collected by filebeat and pass...
Table of contents Introduction and Demo API: Cont...
Table of contents Master-Master Synchronization S...