logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
fwieland  
#1 Posted : Saturday, November 21, 2020 7:31:53 PM(UTC)
fwieland

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2020(UTC)
Posts: 36
Switzerland
Location: Zuerich

Thanks: 7 times
Was thanked: 1 time(s) in 1 post(s)
Hello
I am new to vMix and I'm building a system that should stream through 2 seperate LAN ports on the same system.
Our provider allows for a main stream and a backup stream to be sent. We usualy do this through 2 computers running OBS, one is connected to the local wired LAN, the second is connected to a 4G/5G Hub. They are streaming to 2 different streaming addresses. I am aware that I can setup 2 stream destinations in vMix, but how can I direct stream No 1 to LAN port 1 and Stream No 2 to LAN port 2? From how i understand, this would be the only way a stream would not be interrupted, if one of the connection fails, because the streaming server would then do the switch to the backup. If the switch is done on the local LAN port, then I would have a packet loss, whih would interrupt the stream. Please correct me if I am wrong with my assumption.
DWAM  
#2 Posted : Saturday, November 21, 2020 10:16:10 PM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
AFAIK there is no way within vMix to set something like this. However vMix relies on your host routing table where you can set which route/gateway to use per destination.

Alternatively you can use NDI to another encoder (like OBS) or Fullscreen HDMI OUT to a hardware encoder.
fwieland  
#3 Posted : Sunday, November 22, 2020 3:02:09 AM(UTC)
fwieland

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2020(UTC)
Posts: 36
Switzerland
Location: Zuerich

Thanks: 7 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: DWAM Go to Quoted Post
AFAIK there is no way within vMix to set something like this. However vMix relies on your host routing table where you can set which route/gateway to use per destination.

Alternatively you can use NDI to another encoder (like OBS) or Fullscreen HDMI OUT to a hardware encoder.


Interesting approach. But making an entry into the host routing table for every streaming job would not be managable. We change the streaming address foe every broadcast, so we would need to do 2 entries for every event. especially if there is a technician on site that is not so familiar with this concept. Is there any other, simpler way to do this?
Pepsi(~)  
#4 Posted : Sunday, November 22, 2020 4:37:59 AM(UTC)
Pepsi(~)

Rank: Advanced Member

Groups: Registered
Joined: 9/9/2020(UTC)
Posts: 94
Netherlands
Location: Noord-Brabant

Thanks: 3 times
Was thanked: 13 time(s) in 12 post(s)
It can be done. At least I’ve done it with one system that runs vmix.
But I will not say that it is easy..
you need to have knowledge of routing tables on computers and persistent routes.
Also the destination service need to be in a fixed IP space.
fwieland  
#5 Posted : Sunday, November 22, 2020 4:42:30 AM(UTC)
fwieland

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2020(UTC)
Posts: 36
Switzerland
Location: Zuerich

Thanks: 7 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Pepsi(~) Go to Quoted Post
It can be done. At least I’ve done it with one system that runs vmix.
But I will not say that it is easy..
you need to have knowledge of routing tables on computers and persistent routes.
Also the destination service need to be in a fixed IP space.


Normaly the streaming adress would be a domain name, not an ip adress. Also, I would assume that the domain would be the same for both main and backup stream. But it would not be a reasonable way of solving this issue, since I can't be sure that the technician on site is going to be able to handle routing tables just because I can. So I don't think it's a reasonable solution.
DWAM  
#6 Posted : Sunday, November 22, 2020 5:34:26 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
Quote:
a domain name, not an ip adress.

???
Funny statement... If you want to deal with routing and networking, I think you should go back to the basics of how the internet works...

Quote:
Is there any other, simpler way to do this?

I'm sorry but no, this is very simple if you understand what we're talking about.

The way you're thinking this backup/failover situation is not the way to go. It's not vMix's job or a computer's job to manage routing !
If you want an easiest solution just use the equipment that is designed to do it : a multi wan router !
fwieland  
#7 Posted : Sunday, November 22, 2020 6:55:07 AM(UTC)
fwieland

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2020(UTC)
Posts: 36
Switzerland
Location: Zuerich

Thanks: 7 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: DWAM Go to Quoted Post
Quote:
a domain name, not an ip adress.

???
Funny statement... If you want to deal with routing and networking, I think you should go back to the basics of how the internet works...

Quote:
Is there any other, simpler way to do this?

I'm sorry but no, this is very simple if you understand what we're talking about.

The way you're thinking this backup/failover situation is not the way to go. It's not vMix's job or a computer's job to manage routing !
If you want an easiest solution just use the equipment that is designed to do it : a multi wan router !


No need to be agressive about it. I guess you missunderstood: I get a adress as in rtmp://.... ort srt://.... depending on the prototcol I use and not an IP adress. And even if I resolve the domain name and use the IP adress, it would probably be the same IP for both the main and the backup stream (just assuming). I'm not sure about this, but I would need to use an actual IP adress in the routing table, not a domain name, or am i wrong? I never tried it myself. I am absolutely aware how failover/load balancing works through a router. We have a set up like that, but when using a failover router setup, if the main connection drops, the stream will interrupt, because both the main and the backup stream are running through the same network connection. If I set up a network, where the main stream goes through the local LAN connection and the backup stream is connected through the 5G modem, it will not interrrupt, because the streaming server will do the switch. Until now, we used 2 computers running OBS or a hardware encoder to do this. If the main stream gets interrupted, the streaming server will switch seamlessly to the backup stream, without interruption. That is why i would like to do it this way. If this is done with a failover setup, then there will be an interruption. At least that's how i experienced it. If somebody knows a failover setup, that will not interrupt my stream, then please let me know. I couldn't find one that works reliably without interrupting the stream.
DWAM  
#8 Posted : Sunday, November 22, 2020 8:05:51 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
Quote:
just assuming

don't assume if you want to be taken seriously

try to play with "nslookup" or "dig" commands and when you find a domain or host name which does not resolve to an ip address on the internet we can carry on talking.

Quote:
If somebody knows a failover setup, that will not interrupt my stream, then please let me know


a good combination of cache and timeout on failover will do the job
fwieland  
#9 Posted : Sunday, November 22, 2020 8:20:20 AM(UTC)
fwieland

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2020(UTC)
Posts: 36
Switzerland
Location: Zuerich

Thanks: 7 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: DWAM Go to Quoted Post
Quote:
just assuming

don't assume if you want to be taken seriously

try to play with "nslookup" or "dig" commands and when you find a domain or host name which does not resolve to an ip address on the internet we can carry on talking.

Quote:
If somebody knows a failover setup, that will not interrupt my stream, then please let me know


a good combination of cache and timeout on failover will do the job


Thank's for helping out. I appreciate any help given. I checked the streaming adress I used yesterday. They actually use different IP's for main and backup stream.
Can you give me a actual, specific example of a router setup with a "good combination of cache and timeout on failover". That would help.
Stagesound  
#10 Posted : Monday, November 23, 2020 5:34:16 AM(UTC)
Stagesound

Rank: Newbie

Groups: Registered
Joined: 11/23/2020(UTC)
Posts: 2
United Kingdom
Location: Ballymena

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: fwieland Go to Quoted Post
Originally Posted by: Pepsi(~) Go to Quoted Post
It can be done. At least I’ve done it with one system that runs vmix.
But I will not say that it is easy..
you need to have knowledge of routing tables on computers and persistent routes.
Also the destination service need to be in a fixed IP space.


Normally the streaming address would be a domain name, not an ip adress. Also, I would assume that the domain would be the same for both main and backup stream. But it would not be a reasonable way of solving this issue, since I can't be sure that the technician on site is going to be able to handle routing tables just because I can. So I don't think it's a reasonable solution.


You're quite right - the streaming address is normally a domain name, and it would be very bad practice to replace this with an IP address in general, since the streaming provider probably uses multiple servers around the world and frequently changes the IP address - there is no guarantee that any particular address will always be available. Unfortunately easily managed URL based routing is generally only available in high-end firewalls, so you're not going to be able to do this on your PC running vMix. If you want to risk using IP addresses, you can do this by having the two independent routers for main and backup connections connected to the same switch as the vMix PC (just remember to turn off DHCP on one of them!)

Unfortunately this will not work for Facebook - the main and backup streams both go to rtmps://live-api-s.facebook.com:443/rtmp/ - the "backup" here is not achieved by having two routes on one computer - it's achieved by having two separate machines both sending out the same stream (i.e. you're providing a backup in case your streaming machine fails - not in case your internet connection fails).

You could potentially provide a solution by having a second computer running OBS (or if you want, the single input license for vMix), which is on a separate logical network, using a separate router and internet connection. The easy but expensive way of connecting them is using SDI (you now need to buy a capture card for the second computer). The cheap (free!) method is to put two addresses on the computers and use NDI to transfer the programme output between the two computers. (so for example, the main PC is 192.168.1.2 and has gateway 192.168.1.1. It also has a secondary address 192.168.2.100. The other PC has 192.168.2.2 as it's address and gateway 192.168.2.1, and has a secondary address 192.168.1.100. For computer 2, the source of NDI is 192.168.2.100).

If you really wanted to do it in one machine, you could run OBS on a Virtual PC, which has a different gateway from the host machine, but I wouldn't recommend that for a whole host of reasons! :)

For YouTube the URLs are rtmp://a.rtmp.youtube.com/live2 and rtmp://b.rtmp.youtube.com/live2?backup=1 and since the a and b URLs resolve to different addresses, you could do it all in one machine using static routes, but for the reasons given above, I wouldn't try it.

If you want to give it a try though, let's say you have your two internet routers, one on 192.168.1.0 and the other on 192.168.2.0, both using the .1 as their gateway address.
If your computer primary address is manually set to 192.168.1.2 with gateway 192.168.1.1, and the secondary to 192.168.2.2 (there should NOT be a gateway address for the second LAN in WIndows, even if you have two network cards).

Then at an elevated command prompt you do -
ROUTE ADD 173.194.190.137 MASK 255.255.255.255 192.168.2.1 -P
where 173.194.190.137 is the address of the backup streaming server. The -P means "persistent" and keeps the route in place across restarts. If you're just experimenting, leave it off!
thanks 1 user thanked Stagesound for this useful post.
fwieland on 11/23/2020(UTC)
mavik  
#11 Posted : Monday, November 23, 2020 5:56:32 AM(UTC)
mavik

Rank: Advanced Member

Groups: Registered
Joined: 4/23/2017(UTC)
Posts: 1,214
Man
Location: Germany

Thanks: 3 times
Was thanked: 168 time(s) in 150 post(s)
Just a thought. If primary and backup entry points are on the same IP it's senseless to do different routes.
Another thought is bonding to strengthen your connection.
Think about what you want to secure for. And where the best point is to do it.
thanks 1 user thanked mavik for this useful post.
fwieland on 11/23/2020(UTC)
fwieland  
#12 Posted : Monday, November 23, 2020 6:17:21 AM(UTC)
fwieland

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2020(UTC)
Posts: 36
Switzerland
Location: Zuerich

Thanks: 7 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Stagesound Go to Quoted Post
Originally Posted by: fwieland Go to Quoted Post
Originally Posted by: Pepsi(~) Go to Quoted Post

You could potentially provide a solution by having a second computer running OBS!


That still seems to be the most reasonable solution. We didi it this way before using vMix and it worked fine.
Thank you for your input. Much appreciated!
fwieland  
#13 Posted : Monday, November 23, 2020 6:22:17 AM(UTC)
fwieland

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2020(UTC)
Posts: 36
Switzerland
Location: Zuerich

Thanks: 7 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: mavik Go to Quoted Post
Just a thought. If primary and backup entry points are on the same IP it's senseless to do different routes.
Another thought is bonding to strengthen your connection.
Think about what you want to secure for. And where the best point is to do it.


The goal is to have an uninterrupted stream by letting the streaming server do the failover switch. If I could get a dual WAN connection to do a seamless failover, I would rather do it that way. We have dual WAN switches based on pfsense, but I was not yet able to get them to switch seamlessly, without the stream getting interrupted on the viewer side. If somebody knows how to set that up, it would be greatly appreciated.
mavik  
#14 Posted : Wednesday, November 25, 2020 4:27:13 AM(UTC)
mavik

Rank: Advanced Member

Groups: Registered
Joined: 4/23/2017(UTC)
Posts: 1,214
Man
Location: Germany

Thanks: 3 times
Was thanked: 168 time(s) in 150 post(s)
If I understand correct you want to do
Stream1 - Nic1 - WAN1 - Primary
Stream2 - Nic2 - WAN2 - Backup

For this scenario you would need to create routes. Either in windows or in the router. This depends a bit on how you wire everything.

start with a command prompt and view the windows routes first
cmd route print
You will see the different routes that your computer has. If there are two routes for 0.0.0.0 for example then the lowest metric takes precedence
Usually for one stream you have to do nothing as it would use the default.
For the second you have to resolve the backup server IP and add a new route to the NIC2 gateway. Then traffic to x.x.x.x (backup server ip) takes NIC2 gateway and thus a different route.
Done, hope that the streaming server seamlessly switches. Once switched it might be problematic to switch a second time but you will find out while testing.


If you need help I can assist with a teamviewer session. We should be similar timezones.
thanks 1 user thanked mavik for this useful post.
fwieland on 11/27/2020(UTC)
fwieland  
#15 Posted : Wednesday, November 25, 2020 5:59:18 AM(UTC)
fwieland

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2020(UTC)
Posts: 36
Switzerland
Location: Zuerich

Thanks: 7 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: mavik Go to Quoted Post
If I understand correct you want to do
Stream1 - Nic1 - WAN1 - Primary
Stream2 - Nic2 - WAN2 - Backup

For this scenario you would need to create routes. Either in windows or in the router. This depends a bit on how you wire everything.

start with a command prompt and view the windows routes first
cmd route print
You will see the different routes that your computer has. If there are two routes for 0.0.0.0 for example then the lowest metric takes precedence
Usually for one stream you have to do nothing as it would use the default.
For the second you have to resolve the backup server IP and add a new route to the NIC2 gateway. Then traffic to x.x.x.x (backup server ip) takes NIC2 gateway and thus a different route.
Done, hope that the streaming server seamlessly switches. Once switched it might be problematic to switch a second time but you will find out while testing.


If you need help I can assist with a teamviewer session. We should be similar timezones.


Thank you for responding and your offer to help. I do know how to edit routimg tables, but routes are not a reasonoable way to do it, because our provider uses hotnames, which I know can be resolved, but we would have to edit the routing table for every stream, because the adress changes with every new stream. We can't rely on the on site technician to be able to change routing tables. I guess that leaves 2 options: Either run the backup stream through a 2nd computer with OBS or set up a failover WAN that doesn't interrupt the stream, which I don't know how to do. Every setup I tried interrupted the stream on the viewer side until now. User DWAM mentioned something about "a good combination of cache and timeout on failover" in another post, but unfortunately was not willing to elaborate further on that.
mavik  
#16 Posted : Friday, November 27, 2020 7:43:48 PM(UTC)
mavik

Rank: Advanced Member

Groups: Registered
Joined: 4/23/2017(UTC)
Posts: 1,214
Man
Location: Germany

Thanks: 3 times
Was thanked: 168 time(s) in 150 post(s)
Just to get things right. The complete internet is based on IP's. DNS ist purely made for humans to better remember and read. No matter what webside you open it's using IP addresses and not names.

OK, anyway. In your case it seems too complicated to get all this running for non IT guys. And it is problematic with dynamic IP address targets, absolutely true.

The only way in this case I see is to harden your internet connection with a bonding device. From Peplink over Teradek, Mushroom .... You coud even do it in software. Speedify as an example.
thanks 1 user thanked mavik for this useful post.
fwieland on 11/27/2020(UTC)
fwieland  
#17 Posted : Friday, November 27, 2020 8:11:47 PM(UTC)
fwieland

Rank: Advanced Member

Groups: Registered
Joined: 11/21/2020(UTC)
Posts: 36
Switzerland
Location: Zuerich

Thanks: 7 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: mavik Go to Quoted Post
Just to get things right. The complete internet is based on IP's. DNS ist purely made for humans to better remember and read. No matter what webside you open it's using IP addresses and not names.

OK, anyway. In your case it seems too complicated to get all this running for non IT guys. And it is problematic with dynamic IP address targets, absolutely true.

The only way in this case I see is to harden your internet connection with a bonding device. From Peplink over Teradek, Mushroom .... You coud even do it in software. Speedify as an example.


Thank's a lot for the suggestion. Speedify looks like a good alternative. I never thought of solving it via software.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.