In our previous post, we discussed how lag – and especially irregular lag – causes motion sickness when playing in VR and how the lag – and thus the sickness – is especially large when streaming to a headset. But where does the lag actually come from?

Some Numbers

We are working with a relatively well optimized setup with the following components:

Windows 10

AMD Ryzen 2700x

Nvidia RTX 2080ti

Dedicated 5Ghz Wifi AC Hostspot connected to the streaming PC by 10Gbit Ethernet

Fully updated Oculus Quest within 3 meters of the hotspot

H265 Encoding

With these specs, we get an average latency of around 60ms. But while we first suspected that latency to happen during encoding or transmission, we got a surprise when we actually ran the numbers.

Rendering 7 ms Encoding 3 ms Transmission 10 ms Decoding 40 ms

Wait, hold up, stop stop stop.

Any time there is a post on Reddit or any other forum about reducing lag when streaming to the quest, the tenor is on encoding or transmission. And sure enough, by using high performance RTX cards we can shave a few milliseconds off the total lag. And equally, a good 5Ghz connection is critical but also easy to implement. It either works really really well or it doesn’t work at all. Good Wifi for streaming is pretty binary.

But the vast majority of streaming lag happens on the Quest itself – when it tries to decode the contents that were sent over. This, in many ways, makes sense. Even though encoding is a more computationally intense process than decoding, our streaming PC has significantly more power than the Quest. Comparing standalone GPUs and x86_64 CPUs to integrated AMD APUs is like comparing Apples to Oranges, but we are easily looking at a factor of 100 here. So it really shouldn’t come as a surprise that a video stream that is a relatively light lift on the PC is a heavy lift on the Quest.

So how do I reduce lag?

Well, there are a few things you can do. We’ll cover them in increasing order.

Make sure your GPU has some headway when running the game. If you struggle to run the game at 60 FPS locally, you’re going to have a bad time. Aim for 100 FPS without streaming to allow for enough buffer when taking encoding into account. Reduce graphics options if necessary. Make sure your Wifi is solid. Your experience will be basically unplayable if it isn’t so this one is hard to miss. We are going to cover proper 5Ghz setup in a later post, but for now just make sure that your PC is connected by Ethernet and that your Quest is connected to a 5Ghz network. If the game is “playable”, you got this one right. If you get 3 frames a second, this is probably the problem. Reduce the Bitrate. Bitrate is how much data the encoded uses to encode the video information. The higher it is, the better the game looks. But also, the more computationally expensive it will get to encode and decode the video stream. Since the decoding on your Quest is the lag bottleneck, and lower bitrates need less processing power to decode, this is the one lever that has a huge impact.

Low Bitrates, got it! – Well, no.

Low bitrates are great for streaming to a weak device, BUT they also look increasingly horrible. A game at 5Mbit may run smoothly but the artefacting and highly compressed video will drive you up the wall. You’ll need to find a tradeoff between lag and fidelity. This tradeoff is unique to each person and you’ll have to figure out what works for you. The following table contains some very rough guidelines that worked for us.

Basically a Video – Highly Cinematic Games 60 Mbit Moderate Movements – Skyrim, Fallout 4, Etc 35 Mbit Fast Movement – Subnautica, Amoreon, Etc 15-20 Mbit