# Setting up multistreaming

**URL:** <https://forums.sourceruns.org/t/setting-up-multistreaming/2452>\
**Category:** Off-Topic\
**Created:** [September 10, 2014, 4:35pm UTC](https://forums.sourceruns.org/t/setting-up-multistreaming/2452 "2014-09-10T16:35:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YaLTeR](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/yalter/32/553_2.png) [@YaLTeR](https://forums.sourceruns.org/u/YaLTeR)\
**Post date:** [September 10, 2014, 4:35pm UTC](https://forums.sourceruns.org/t/setting-up-multistreaming/2452/1 "2014-09-10T16:35:07Z")

</div>

So I’ve come by this awesome method of streaming to multiple streaming services at the same time. I did it with Twitch and Hitbox and it worked perfectly well, so that’s how you set everything up.

1. Download NGINX from here: [http://nginx-win.ecsds.eu/](http://nginx-win.ecsds.eu/). If you’re unsure what to grab, [here’s a clue](http://i.imgur.com/10dXq1x.png).
2. Extract it into some folder. Let’s call that folder **nginx** from now on.
3. Go into **nginx** \conf, and create a file _nginx.conf_ there.
4. Write this into the file:

[code]worker\_processes 2;

events {  
worker\_connections 8192;  
}

rtmp {  
server {  
listen 1935;  
chunk\_size 4096;

```
            application live {
                    live on;
                    record off;

                    allow publish 127.0.0.1;
                    deny publish all;

                    # Push statements.

            }
    }

```

}[/code]

The first few lines before _rtmp {_ I took from the default _nginx-win.conf_. Everything on the line after the **#** symbols is ignored, so you can write comments this way.

1. Now you need to get an rtmp server addresses of the streaming services you want to use, along with your stream keys. [Here](http://bashtech.net/twitch/ingest.php) is the Twitch server list, Hitboxes server address is on your dashboard near your stream key.

2. Insert them after the _# Push statements._ line in the following format:

`push rtmp://live.hitbox.tv/push/yalter?key=some_characters; # Hitbox.
push rtmp://live-fra.twitch.tv/app/live_somenumbers_somecharacters; # Twitch.`  
Here I took the Frankfurt Twitch server, you may choose another one.

1. Save the file, go to the **nginx** folder, open the command line (for instance by shift-rightclicking the empty space in the folder and choosing _Open command window here_), type _nginx_ and hit Enter. If everything is OK (no errors, blank output), you can close the command line window (NGINX is still running when you close it!) and next time launch _nginx.exe_ by simply double-clicking it.  
To stop NGINX, you’ll have to open the command line in the **nginx** folder, type _nginx -s quit_ and hit enter.

2. You can now set up your OBS to broadcast to your local server that you just set up. Create a new profile (or edit an old one), go into _Broadcast Settings_ and select _Custom_ in the _Streaming Service_ field. Enter **rtmp://127.0.0.1/live** as the _FMS URL_ and anything you want as the stream key.

3. You’re now good to go, start streaming as usual and it will broadcast to multiple services at once! People will also be able to connect directly to your streaming server if you have a “white” IP address and port 1935 open. If you want to prevent that you can add \*deny play all; \*after the _deny publish all;_ statement.

Keep in mind that for streaming to two services you’ll need twice as much upload speed. If someone connects to you directly you’ll need the same amount of upload speed just for that person.

---

<div class="post-metadata">

**Author:** ![Burgmond](https://b-cdn.sourceruns.org/letter_avatar_proxy/v4/letter/b/a9adbd/32.png) [@Burgmond](https://forums.sourceruns.org/u/Burgmond)\
**Post date:** [September 10, 2014, 5:28pm UTC](https://forums.sourceruns.org/t/setting-up-multistreaming/2452/2 "2014-09-10T17:28:50Z")

</div>

YaLTeR, your a genius.

PS: On step 1, you should have said to follow the white rabbit.

---

<div class="post-metadata">

**Author:** ![RyanTheFoxx](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/ryanthefoxx/32/722_2.png) [@RyanTheFoxx](https://forums.sourceruns.org/u/RyanTheFoxx)\
**Post date:** [September 10, 2014, 7:05pm UTC](https://forums.sourceruns.org/t/setting-up-multistreaming/2452/3 "2014-09-10T19:05:51Z")

</div>

WOW. YaLTeR, this is amazing, great job!

---

<div class="post-metadata">

**Author:** ![Cameron\_D](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/cameron_d/32/251_2.png) [@Cameron\_D](https://forums.sourceruns.org/u/Cameron_D)\
**Post date:** [September 13, 2014, 2:18am UTC](https://forums.sourceruns.org/t/setting-up-multistreaming/2452/4 "2014-09-13T02:18:35Z")

</div>

I didn’t even realise nginx supported rtmp. I swear it gets better every time I look at it… You can even use it to transcode via ffmpeg, that’s awesome.
