Streaming With a Varying Network Connection (From a car)

Hello everyone,

We have been running a livestream from our racecar from various track around the country, some with better cell service than others. The basic archtecture consists of a miniPC onboard the car running OBS on Ubuntu (with a bunch of onboard cameras feeding it). OBS then streams to a VPS I have running NGINX with the RTMP module. The connection from the car is using a PEPWAVE BR1 modem with a Verizon SIM card. It is using a proper mobile MIMO antenna.

I then pull that stream from the NGINX VPS into my laptop in the paddock, add some other things like race stats, and then send that to Youtube.

So in other words..... CAR w/ OBS ----> REMOTE VPS w/ NGINX RTMP ----> LAPTOP in Paddock ---> YouTube/other services.

The problem is that some of these tracks have good connections in some areas of the track, and not-so-good connections in other parts. I am trying to improve the overall stream quality to more closely match the average usable bit rate, so it can catch-up with any buffered data from the car when the connection is better in portions of the track.

Adding more latency to the stream is perfectly fine in this case (and obviously would have to happen). I'm just trying to figure out how to create this larger buffer, and where to put it. Do I need to perhaps run a local NGINX RTMP server on the racecar, and then push to the remote VPS?

Hopefully this all makes sense, and please let me know if I can clarify anything. Thanks!
 

Christor999

New Member
Hello everyone,

We have been running a livestream from our racecar from various track around the country, some with better cell service than others. The basic archtecture consists of a miniPC onboard the car running OBS on Ubuntu (with a bunch of onboard cameras feeding it). OBS then streams to a VPS I have running NGINX with the RTMP module. The connection from the car is using a PEPWAVE BR1 modem with a Verizon SIM card. It is using a proper mobile MIMO antenna.

I then pull that stream from the NGINX VPS into my laptop in the paddock, add some other things like race stats, and then send that to Youtube.

So in other words..... CAR w/ OBS ----> REMOTE VPS w/ NGINX RTMP ----> LAPTOP in Paddock ---> YouTube/other services.

The problem is that some of these tracks have good connections in some areas of the track, and not-so-good connections in other parts. I am trying to improve the overall stream quality to more closely match the average usable bit rate, so it can catch-up with any buffered data from the car when the connection is better in portions of the track.

Adding more latency to the stream is perfectly fine in this case (and obviously would have to happen). I'm just trying to figure out how to create this larger buffer, and where to put it. Do I need to perhaps run a local NGINX RTMP server on the racecar, and then push to the remote VPS?

Hopefully this all makes sense, and please let me know if I can clarify anything. Thanks!
 

AaronD

Active Member
I think you want to have a local, private network, that runs entirely on your own gear, to get from the car to the paddock. Then the paddock has a (hopefully!) more reliable internet connection. Or at the very least, the connection that uses someone else's gear, doesn't move.

I think you're right to composite, encode, and stream in the car, and then bounce that stream through the paddock unchanged. That reduces the data rate from the car, and thus the requirement for your own private network to handle.

What that private network looks like, I don't know. The easiest would be a good WiFi router in the paddock, and have the car computer connect to that with a good adapter. There are several reasons why that might not work, but it's cheap enough to give it a shot anyway.

Once you have a solid (enough) connection from the car *directly* to the paddock, using entirely your own gear to do it and not someone else's cell network or whatever, then there's the completely separate problem of getting the stream from the paddock to the internet. A few options might be:
  • The router's intended internet connection. Problem solved.
  • Run a wire from the router's internet port to the laptop, and have the laptop share its cell connection to that wire.
  • Run a wire from one of the router's local network ports to the laptop, and have the laptop run a restreamer.
    • OBS in the car, connects to that local restreamer in the paddock.
    • The restreamer, then, copies what it gets to wherever you want it to go, using the laptop's other connection(s).
 

qhobbes

Active Member
I don't know if the Linux version of OBS supports it or not, but if does, try enabling Dynamic Bitrate by going to Settings > Advanced > Network (those are the Windows steps). This should help prevent any dropped frames from the car to the remote VPS.
 

AaronD

Active Member
I don't know if the Linux version of OBS supports it or not, but if does, try enabling Dynamic Bitrate by going to Settings > Advanced > Network (those are the Windows steps). This should help prevent any dropped frames from the car to the remote VPS.
That would be the next step, after getting the best connection possible out of the car in the first place. See my post above for that.

Anyway, here's the equivalent on my Linux box (Ubuntu Studio):
1725299686184.png
 
Top