Skip to content

jakkuh/multistream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Multistream

*Skip to the bottom for OBS Setup

Used to allow the LinusTechTips team to stream to both YouTube and Twitch at the same time :D

Important Notes:

  1. It's not really designed for randoms to be able to setup, but if you somewhat know your way around Linux you should be able to, no issue.
  2. Stats page: http://10.20.0.70:8080/stats
  3. Recording directory (on transcode server): /mnt/recording
  4. If the ingest FPS is different than the output (which defaults to 30 fps), it can cause dropped frames on the streaming rig

Tutorial

Designed for ubunutu 18.04

This assumes you are working in the /home/linus directory. If otherwise you will need to change the config in step 9 to reflect that, otherwise the stats page will not work. This also assumes you are using a non-root user named "linus". Please use a non-root user. :P

pre-setup: Set your network card's IP - we are using 10.20.0.70 as the static IP for the streaming server. Note, there are a LOT of places that the IP will need to be changed inside nginx.conf to get this working with a different IP address.

  1. Install dependencies

    1. sudo apt install build-essential libpcre3 libpcre3-dev libssl-dev zlib1g-dev ffmpeg -y
  2. Make and enter "build" directory

    1. mkdir build && cd build
  3. Download newest NGINX "stable" release (right click, copy, then wget from here: http://nginx.org/en/download.html)

    1. wget http://nginx.org/download/nginx-1.14.0.tar.gz
  4. clone the NGINX RTMP module from github

    1. git clone git://github.com/arut/nginx-rtmp-module.git
  5. Extract the NGINX tarball, and then enter the directory

    1. tar xzf nginx-1.14.0.tar.gz && cd nginx-1.14.0
  6. Build NGINX w/ the RTMP module

    1. sudo ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module
    2. sudo make
    3. sudo make install
  7. Start NGINX

    1. sudo /usr/local/nginx/sbin/nginx
  8. Set NGINX to start on boot

    1. sudo bash -c "curl https://raw.githubusercontent.com/tivyhosting/multistream/master/nginx > /etc/init.d/nginx"
    2. sudo chmod +x /etc/init.d/nginx
    3. sudo update-rc.d -f nginx defaults
    4. sudo systemctl enable nginx
  9. Configure NGINX w/ RTMP config (you will need to edit streamkeys/settings probably)

    1. sudo rm -rf /usr/local/nginx/conf/nginx.conf
    2. sudo bash -c "curl https://raw.githubusercontent.com/tivyhosting/multistream/master/nginx.conf > /usr/local/nginx/conf/nginx.conf"
  10. Set your desired stream keys in the nginx.conf config file (the defaults are empty)

    1. Replace "TWITCH_STREAM_KEY" with your twitch stream key, and "YOUTUBE_STREAM_KEY" with your youtube stream key.
      1. sudo nano /usr/local/nginx/conf/nginx.conf
  11. Also set your desired storage location for the live recording off the input stream (please note this directory MUST be set to 777 permissions as NGINX uses a no-perm user to run it's workers)

    1. Replace "/home/linus/recordings" with your desired recording location
      1. sudo nano /usr/local/nginx/conf/nginx.conf
  12. Restart NGINX

    1. sudo service nginx restart
  13. You should now be able to stream to the NGINX server. We have 3 distinct ingest servers for the 3 different intended streaming setups.

    1. Streaming to both YouTube and Twitch: rtmp://10.20.0.70:1935/transcode-yt-twitch
    2. Streaming to just YouTube: rtmp://10.20.0.70:1935/transcode-yt
    3. (Streaming to both YouTube and Floatplane: rtmp://10.20.0.70:1935/transcode-yt-fp (NOT YET WORKING))

OBS Setup

About

Multistreaming to YouTube, Twitch, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages