Placing in Nginx and Nginx-RTMP
Put within the functions anticipated to compile Nginx and Nginx-RTMP from supply.

sudo apt-get set up construct-necessary libpcre3 libpcre3-dev libssl-dev
Make a functioning listing and swap to it.

mkdir ~/working
cd ~/working
Down load the Nginx and Nginx-RTMP useful resource.

wget http://nginx.org/down load/nginx-1.7.5.tar.gz
wget https://github.com/arut/nginx-rtmp-module/archive/grasp.zip
Put within the Unzip deal.

sudo apt-get set up unzip
Extract the Nginx and Nginx-RTMP useful resource.

tar -zxvf nginx-1.7.5.tar.gz
unzip grasp.zip
Swap to the Nginx itemizing.

cd nginx-1.7.5
Insert modules that Nginx might be compiled with. Nginx-RTMP is included.

./configure –with-http_ssl_module –include-module=../nginx-rtmp-module-master
Compile and set up Nginx with Nginx-RTMP.

make
sudo make arrange
Arrange the Nginx init scripts.

sudo wget https://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx -O /and so forth/init.d/nginx
sudo chmod +x /and many others/init.d/nginx
sudo update-rc.d nginx defaults
Begin off and finish Nginx to make configuration data.

sudo service nginx get began
sudo providers nginx stop
Establishing FFmpeg
Add the FFmpeg PPA.

sudo apt-get set up application-homes-prevalent
sudo include-apt-repository ppa:kirillshkrogalev/ffmpeg-up coming
Replace the bundle lists.

sudo apt-get replace
Put in FFmpeg.

sudo apt-get set up ffmpeg
Discover: The apt-insert-repository command might presumably not be mounted in some situations. To arrange it run sudo apt-get set up software-homes-frequent.

Configuring Nginx-RTMP and FFmpeg
Open the Nginx configuration file.

sudo nano /usr/space/nginx/conf/nginx.conf

employee_procedures vehicle
occasions
employee_connections 1024

# RTMP configuration
rtmp
server
listen 1935 # Listen on widespread RTMP port
chunk_dimensions 4000

software show
dwell on
# Activate HLS
hls on
hls_path /mnt/hls/
hls_fragment 3
hls_playlist_size 60
# disable consuming the stream from nginx as rtmp
deny interact in all

http {
sendfile off
tcp_nopush on

directio 512
default_form software/octet-stream

server
hear 8080

space /
# Disable cache
add_header ‘Cache-Management’ ‘no-cache’

# CORS setup
add_header ‘Entry-Regulate-Enable-Origin’ ‘*’ often
increase_header ‘Entry-Handle-Expose-Headers’ ‘Content material-Size’

# make it potential for CORS preflight requests
if ($request_strategy = ‘OPTIONS’)
insert_header ‘Entry-Handle-Allow-Origin’ ‘*’
add_header ‘Entry-Handle-Max-Age’ 1728000
add_header ‘Content material-Kind’ ‘textual content/fundamental charset=UTF-8’
insert_header ‘Content material-Size’
return 204

types
software/sprint+xml mpd
software/vnd.apple.mpegurl m3u8
video clip/mp2t ts

root /mnt/

}

supply

3 thoughts on “Ubuntu Rtmp Nginx Server set up component 1”

  1. VPS from WELL-WEB NET are great for website. High-speed processor, unlimited traffic, convenient control. Installing FFMPEG – FREE! For registration you can use anything name/female/tel – him not check anything.
    The main advantages are that they configure everything themselves for free and all they need to do is say what you want to deliver, and the other is that in the Netherlands and the USA they give out IP from random networks, which is very important for me in the case of proxy! I recommend to try and not to suffer with the setting on the video – it’s enough to explain what you need and you will be set up and told how to use it.
    Now the special bonus – you pay for 6 months – him give 3 month FREE! Just a little left to the end!

Leave a Reply

Your email address will not be published. Required fields are marked *