Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Nginx-RTMP streaming Server in Ubuntu14

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install Nginx-RTMP streaming server in Ubuntu14, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

One: RTMP

RTMP streaming media protocol is a set of audio and video real-time transmission protocol developed by Adobe.

Two: Nginx-rtmp

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

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

Three: installation process in ubuntu server 14

1. Download and install nginx and nginx-rtmp compilation dependency tools first

Sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev

two。 Create a working directory and switch to the working directory

Mkdir ~ / workingcd ~ / working

3. Download nginx and nginx-rtmp source code

Wget http://nginx.org/download/nginx-1.7.5.tar.gz

Wget https://github.com/arut/nginx-rtmp-module/archive/master.zip

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

Sudo apt-get install unzip

5. Extract the nginx and nginx-rtmp installation packages

Tar-zxvf nginx-1.7.5.tar.gzunzip master.zip

6. Change to the nginx- directory

Cd nginx-1.7.5

7. Add a nginx-rtmp template to compile to nginx

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

8. Compilation and installation

Makesudo make install

9. Install nginx init script

Sudo wget https://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx-O / etc/init.d/nginxsudo chmod + x / etc/init.d/nginxsudo update-rc.d nginx defaults

10. Start and stop the nginx service and generate configuration files

Sudo service nginx startsudo service nginx stop

11. Install FFmpeg

Sudo apt-add-repository ppa:jon-severinsson/ffmpegsudo apt-get updatesudo apt-get install ffmpeg

twelve。 Configure the 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-CVV libx264-profile:v baseline-bVG v 350K-s 640x360-f flv-CRAV an aac-ac 1-strict-2-bvvl 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 use a firewall, please allow port tcp 1935

16: using client and rtmp protocol for real-time video capture

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

I use iPhone5's capture program https://github.com/jgh-/VideoCore here for video capture.

[_ session startRtmpSessionWithURL:@ "rtmp://192.168.86.246/live/" andStreamKey:@ "test"]

17. During the client capture 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

The above is all the contents of the article "how to install Nginx-RTMP streaming Server in Ubuntu14". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report