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
Basic Concepts Absolute positioning: An element b...
1.1 General marking A general tag consists of an ...
Hello everyone, today I will share with you the W...
I have installed various images under virtual mac...
This article uses examples to illustrate the impa...
Table of contents Congruent and Incongruent congr...
Table of contents 1. Pull the image 2. Create a l...
Table of contents 1. charAt grammar parameter ind...
"The great river flows eastward, the waves w...
for loop The for loop loops through the elements ...
There are two types of scheduled tasks in Linux s...
Preface: Today I want to remotely connect to MySQ...
Copy code The code is as follows: html, address, ...
Introduction EXISTS is used to check whether a su...
Today, when I was on the road, a colleague sent m...