If you’ve tried to set up an RTMP relay you know that it can be a giant pain in the ass. But if you don’t want to compile from source, there’s another option. Here’s the easy way.

  1. Spin up an instance of Debian Stretch as a Virtual Machine somewhere.
  2. Edit /etc/apt/sources.list and comment out the existing repositories.
  3. Add Stretch-backports: “deb http://ftp.de.debian.org/debian stretch-backports main”
  4. sudo apt-get update
  5. sudo apt-get install nginx-full
  6. Edit /etc/apt/sources.list and put the existing repositories back

Now add your RTMP relay config. Here are examples for something that pushes an inbound stream to twitch, pulls a published stream and republishes it, or just re-publishes incoming RTMP streams.

rtmp {
server {
listen 1935;
chunk_size 4096;

application thisisarelay {
live on;
record off;
}

application pullfrompublisher {
live on;
record off;
pull rtmp://10.2.4.5:2935/ocpush/cnoc live=1;
}
application pushtotwitch {
live on;
record off;
push rtmp://live.twitch.tv/live/streamkey;
# duplicate the push line for multiple outputs / dual streaming to YT/Twitch etc}
}
}

Now sudo /etc/init.d/nginx reload and you’re done!


If you’re stuck on step 1 of getting a virtual machine up, here’s some instructions for that too, with more noob-friendly explanations.

  1. Create an aws account – http://aws.amazon.com
  2. Create an EC2 instance
  3. Select the Community AMIs and select Debian
  4. Scroll down until you find Stretch from June 2018
  5. Select that and go with it
  6. Don’t use a dynamic IP
  7. Edit the security group policy to allow port 80 and 1935 inbound.
  8. Let it create SSH keys
  9. Download the SSH key .pem file
  10. Download and install Putty if you haven’t already.
  11. Open PuttyGen and export .ppk and public key files from the .PEM
  12. Enter Auto-login username ‘admin’ under Connection->Data
  13. Load the .ppk file into PuTTY under Connection->SSH->Auth->Private key file for authentication
  14. Create an Elastic IP
  15. Associate Elastic IP with the instance
  16. Launch the instance
  17. SSH to the instance with putty
  18. Now start with step 2 of the top list. If you need this, you probably need to know to edit the file by typing ‘sudo nano /etc/apt/sources.list’
  19. Save the file by hitting Ctrl+O then quit by hitting Ctrl+X

About The Author

Writer, Editor, Photographer, Video Girl, Audio Engineer, Broadcast Producer. Esports Veteran. I play Gnar, AMA.

Related Posts