Skip to content

Instantly share code, notes, and snippets.

@duckinator
Last active December 1, 2015 04:56
Show Gist options
  • Save duckinator/15db8dc699bf7279ebba to your computer and use it in GitHub Desktop.
Save duckinator/15db8dc699bf7279ebba to your computer and use it in GitHub Desktop.
# :(((((((((((( @ nginx.org being HTTP-only.
sudo apt-get install -y build-essential libpcre3 libpcre3-dev libssl-dev unzip &&
wget http://nginx.org/download/nginx-1.9.5.tar.gz &&
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip &&
tar zvxf nginx-1.9.5.tar.gz &&
unzip master.zip &&
cd nginx-1.9.5 &&
./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master &&
make &&
sudo make install &&
echo "
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
}
}
}
" >> /usr/local/nginx/conf/nginx.conf

Server

Recommended server: $5/mo Digital Ocean server running Ubuntu 14.04 x64.

TODO:

  • Test with latest version of Ubuntu.
  • Make initial setup nless annoying.
  • Make setup script less horrifyingly hacky.
  • Make nginx set up as a proper daemon, since we (unfortunately) have to compile it from source for this.

Run ./nginx-rtmp.sh && sudo /usr/local/nginx/sbin/nginx. You're done.

Broadcasting

Use Open Broadcaster Software. Settings dialog -> Broadcast Settings, set the following:

  • Mode: Live Stream
  • Streaming Service: Custom
  • FMS URL: rtmp:///live
  • Play Path/Stream Key:

can be whatever you want -- this is simply a unique identifier for the stream. You'll want to make note of the path you use, so you can use it in the client.

Viewing

In VLC, Media -> Open Network Stream (Ctrl+N), enter "rtmp:///live/", click Play.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment