Skip to content

Instantly share code, notes, and snippets.

@yzgyyang
Last active July 16, 2020 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yzgyyang/0f054bd5a762f230056bbdd508ecf611 to your computer and use it in GitHub Desktop.
Save yzgyyang/0f054bd5a762f230056bbdd508ecf611 to your computer and use it in GitHub Desktop.
How to start a streaming service on Vultr?
# Restream is another choice
# This guide is based on:
# https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50/
sudo apt update
sudo apt upgrade -y
sudo apt install -y unzip build-essential libpcre3 libpcre3-dev libssl-dev zlib1g-dev
wget http://nginx.org/download/nginx-1.15.1.tar.gz
wget https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/dev.zip
tar -zxvf nginx-1.15.1.tar.gz
unzip dev.zip
# Compile Nginx
cd nginx-1.15.1
./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-dev
make
sudo make install
# Stop server: sudo /usr/local/nginx/sbin/nginx -s stop
# Start server: sudo /usr/local/nginx/sbin/nginx
# Config server: vim /usr/local/nginx/conf/nginx.conf
# Add following:
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
}
}
}
# Push to 3rd party:
push rtmp://<other streaming service rtmp url>/<stream key>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment