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 attributes of the <TD> tag are used to ...
WML (Wireless Markup Language). It is a markup la...
This article mainly introduces the implementation...
I won't say much nonsense, let's just loo...
Many web pages have small triangles in their navi...
The security issues encountered in website front-...
Table of contents 1. Structure string 2. Return t...
Login + sessionStorage Effect display After a suc...
question: My blog encoding is utf-8. Sometimes whe...
1. Introduction to compression and packaging Comm...
Table of contents 1. typeof 2. instanceof 3. Cons...
Table of contents 1. Basic event handling 2. Send...
Table of contents Prototype chain diagram Essenti...
This article shares the specific code of JavaScri...
When it comes to remote desktop connection to Lin...