Question / Help OBS and Multiple Network Adapters (ethernet and WIFI) ...

simspace

Member
On my MacBook Pro I have a wired ethernet connection and a WIFI connection.
Each connection/adapter has it's own IP address.

OBS relies on NGINX RTMP to ...
» Receive the wireless streams from iOS devices.
» Sends the resulting live stream to YouTube and Facebook Live.

Is there a way to configure the NGINX RTMP application settings for OBS to receive the iOS streams over WIFI and send the resulting live stream to the services via the ethernet adapter?

Below is my NGINX RTMP config.
» The application live { } section enable OBS to receive the wireless streams from iOS devices.
» The application vod { } section enable OBS to send the live stream to YouTube and Facebook.

You can see my questions in the application live { } and application vod { ) sections about the IP addresses.

Code:
rtmp {
  server {
    listen 1935;
    chunk_size 4096;

    ## THIS CONFIG IS USED BY OBS TO RECEIVE THE IOS STREAMS
    application live {
      live on;
      record off;
      publish_notify on;

      ## CAN I USE THE WIFI IP ADDRESS HERE
      ## TO RECEIVE IOS STREAMS?
    }

    ## THIS CONFIG IS USED BY OBS TO SEND THE LIVE STREAM TO YOUTUBE AND FACEBOOK
    application vod {
      live on;
      record off;
      ## CAN I USE THE ETHERNET IP ADDRESS HERE
      ## TO SEND THE LIVE RTMP STREAM TO THE SERVICES?

### START RTMP STREAMS ###
      ### YOUTUBE ###
      push rtmp://x.rtmp.youtube.com/live2/....stream key goes here....;

      ### FACEBOOK LIVE ###
      ### REQUIRES A NEW KEY FOR EVERY STREAM ###
      push rtmp://rtmp-api.facebook.com:80/rtmp/....stream key goes here....;
### END RTMP STREAMS ###

    }
  }
}
 
Last edited:

simspace

Member
Thanks for the response @wallrik. That really helps.

Did not know that about the port number and multiple adapters.


So, when setting up the iOS devices in OBS, use the WIFI IP address here?

SRtSwJX.png



And when setting up the live stream that's sent to the streaming services, use the ETHERNET IP address here?

hnC9Kkq.png
 
Last edited:

wallrik

Member
If that computer is both hosting nginx and OBS you don't have to use any of your interface addresses, you can just use localhost for both.

You're making it a lot more complex than it needs to ;)

The application directive determines the service. So you got live and vod.

To view the iPhone stream in OBS on that computer, just use rtmp://localhost/live/iphone6 and to stream your scene to the other application set the Custom Streaming Server to rtmp://localhost/vod/<streamkey>

It's only when you want to connect from a different computer or phone that you need to mind the interface address really. (Your phone still needs to use 10.0.0.176 to find your computer)

You could actually change the config to name them something like phone and stream, instead of live and vod, to make them easier to remember.

Write back if it's unclear :)
 

simspace

Member
@wallrik that totally makes sense. Thank you!

So then my only question is...
How do I tell OBS to send the live stream to YouTube and Facebook over the ethernet adapter?

What I am trying to accomplish is improve WIFI bandwidth.
I am using 5 iOS devices as IP cameras.
Right now all streams (iOS to OBS and OBS to YouTube, Facebook and Periscope) are over WIFI.

I would like to stop the live streams (i.e. OBS to YouTube) from being delivered to the online services over WIFI.
I'd like the live stream to be delivered via the ethernet adapter.

Would I use the ethernet adapter IP instead of localhost in the OBS "Stream" preference panel?

Thanks again!
Chris
 
Last edited:

wallrik

Member
You can still use localhost as your stream service in OBS. The way you have it set up it's not actually OBS sending it to YouTube and Facebook, right? It's the nginx server.

The nginx server will just try to reach the internet based on your routing table. If your computer normally uses your Ethernet interface to reach the internet then it will do that. :)
 

FreeKillZero

New Member
Out of curiosity, what is your network interface priority order set to? You should be able to find this in your macOS System Preferences -> Network settings. macOS will try to use the first active network interface on the list, then move on down other active connections.

You can change the order by clicking the little gear in the lower left, then "Set Service Order…"

For example, I have Ethernet at the top of the list, since my house network is wired for Gigabit. It's still accessible by other computers over wi-fi though (if I point specifically to the iMac's wi-fi IP).
 

Narcogen

Active Member
You can still use localhost as your stream service in OBS. The way you have it set up it's not actually OBS sending it to YouTube and Facebook, right? It's the nginx server.

The nginx server will just try to reach the internet based on your routing table. If your computer normally uses your Ethernet interface to reach the internet then it will do that. :)

You can also force the OS to do this by configuring wifi manually and removing the entry for default router. The OS can't use that interface to reach the internet if it doesn't know how to.
 

wallrik

Member
You can also force the OS to do this by configuring wifi manually and removing the entry for default router. The OS can't use that interface to reach the internet if it doesn't know how to.
Absolutely. Removing the gateway address from the WiFi card would do the same thing. But using a manual setting would also mean disabling DHCP which I personally felt was beyond the initial question.

But using a manual configuration would in turn have one big upside in the long run, and that's a more stable config as it would never be in risk of changing its IP without your knowledge.

Since the auto assigned IP was 10.0.0.176 I would assume the DHCP scope starts at 100 or something, so setting something lower than that should be safe - but checking the router settings is of course preferred. :)
 

simspace

Member
@Narcogen and @wallrik, great stuff. I will play around with manual configuration too.

Changing the network interface order was awesome.
Now my live stream goes out over ethernet.
And my iOS device streams are captured over WIFI.

Now I just need to figure out iOS device sync issues.
When I switch scenes, (each scene is an iOS device), they're not always in sync.
I won't hijack this thread. I created another thread about the sync issue.

Thank you!
-Chris
 
Top