Sitemap

Optimizing the performance of Liv for streaming VR content.

8 min readSep 26, 2023

--

(while minimizing quality! 😁)

Liv, the veteran app to allow VR gamers to share their good times with the world in mixed reality and… simulated reality? (like, with Avatars) is a great piece of software. It can also be punishing to your system, depending on its power. As games increase in their quality and demands on your GPU and CPU, you may find it necessary to drop some of your settings along the way, to ensure smooth play experience *and* smooth capture and stream experience. That is what we are going to be going through today.

I am going to be primarily focusing on Oculus users here, as that’s what I was using when I came through this journey, I’ll point out the equivalent SteamVR settings as and when. Let’s get on with it.

The most important changes to make

Are VR resolution and frequency — how many pixels per frame your PC is producing for your VR experience, and how many of those frames per second.

To change these settings for Oculus link, open the Oculus app on your PC, and navigate to “Devices” → select your connected device (e.g. “Quest 2 and Touch”) → scroll down to “Graphics Preferences” and select it, you will be presented with this window:

Press enter or click to view image in full size
The graphics preferences for the Oculus PC app showing default, refresh rate and a reduced render resolution

By default it will be set to Automatic and 72Hz. If you have messed with that, to have a more responsive or better looking play experience (that is what you can get when you increase these buttons and sliders) then now is the time to drop it waaaaaay down.

Set 72Hz, Uncheck “Automatic” and then drag the slider down the the left. The further you go, the worse things will look in headset — but the less performance you are asking for from your system, and so the more power remains to have a good Liv experience.

This whole guide is going to be exploring this tradeoff — between performance and visuals.

SteamVR has a similar section in settings, though they allow more convenience and per-app settings ability shown below. Moving from Auto to custom and then setting the resolution just as with Oculus Link:

Press enter or click to view image in full size
Press enter or click to view image in full size
Steam VR settings, video section showing the ability to change render resolution from automatic

Liv tweaks

Liv interface for mixed reality capture showing a reduced target resolution

The Target Resolution is how many pixels will be used to mix your reality (Liv rendering the mix of you and the game) — less pixels here means less work for your system. The default is 1920x1080, try 1280x720.

Less important settings to tweak

The big impacts come from asking your PC to do less work for VR. Additional settings come from changes to OBS (or whatever you are using to stream) the game you are streaming, and any avatars involved. Let’s go through them.

Press enter or click to view image in full size
Press enter or click to view image in full size
OBS Settings: Video size settings on the left, video codec settings on the right.

Lower OBS Resolution

In OBS (more performant than Streamlabs) you can drop the streaming resolution you are sending to twitch, by lowering the Base Canvas and/or Output resolution from the default of 1920x1080 to 1280x720.

Use hardware video codecs

Using NVENC instead of software x264 if possible will shift encoding duties to unused capacity on your GPU, from your CPU.

Lower game settings

This will vary per game, here’s some recommendations for the wonderfully mixed reality friendly game, Synth Riders:

Press enter or click to view image in full size
Press enter or click to view image in full size
Press enter or click to view image in full size
Press enter or click to view image in full size
Suggested perfomance enhancing settings for the game Synth Riders

The key part here is the same with getting more FPS out of any game — drop the quality.

Climbing back towards quality

Now that you have taken things down to their lowest ebb, you should have a fabulously fluid and perfomant mixed reality stream! However it will look like a potato. Time to crank the important things back up, little by little to improve your play and stream quality — but how can you know how much is the right amount?

Yes, trial and error. This will be somewhat tedious, and it will vary by game, too. Some games will be stutter and glitch free with the same settings that other games will freak out a bit at. This is where measurement comes in — enter FPSVR.

FPSVR — why is my VR/stream crappy?

FPSVR overlay in action within VR, showing GPU and CPU Frametime, percentage utilization and dropped frames.

This neat little utility is for SteamVR, and since that’s where Liv happens, it’s applicable to all SteamVR compatible headsets, including Oculus (Meta 🙄). Essentially this tool will show you why (or at least where) your experience is crappy, in some detail.

Get HeavyGee’s stories in your inbox

Join Medium for free to get updates from this writer.

Crappiness in gameplay and/or stream as you bring back up the resolution and frequency will happen when you cross the magic frametime thresholds and start going into asynchronous spacewarps, motion smoothing and other funky things.

What does all this mean? Lots of resources online to understand all this, I’ll link a couple below, but here’s the tl;dr

Reduce performance to stay below the frame time limit .

When you do this, you will allow enough overhead for mixing and streaming.

How you do this, is by making the major tweaks to resolution and frequency above, upwards and downwards, and then confirm how long the frametime is — using FPSVR. FPSVR has an interactive overlay mode that you see above, and an offline or review mode, “fpsVR History Viewer” to review charts from your recent test play streams. It produces charts like these:

Press enter or click to view image in full size
Press enter or click to view image in full size
fpsVR History Viewer graphs, on the left, GPU and CPU utilization, on the right, GPU and CPU frametimes, along with the all important two purple dotted frametime limit lines, the first line for frametime for the chosen FPS, the second line for exactly *half* the chosen FPS (for motion smoothing, spacewarp). The PC spec was AMD 5800x3D and Nvidia 4070ti, with a resolution of 2756x2756 @ 90Hz.

As you can see in the right hand graph above, when my system plays and streams synth riders at 90Hz/FPS, 99.9% of my frametimes are 3–5 milliseconds below this frametime limit of 11 milliseconds. This is good! This means that even with streaming and mixing of reality, I am still getting a first class play experience, which will translate to a first class stream experience too.

You can also see that my GPU is a bit quicker than my CPU in this game (6.4ms vs 7.9ms), but both are comfortably below the limit.

I’m below the frametime threshold, what do I increase first?

This decision comes down to your preference, whether it’s more important to have:

  • a very crisp and beautiful stream (increase the VR video resolution), or
  • a great playing experience (increase the frequency/FPS).

If I increase my resolution, this will put more pixels on the screen and more pressure on my GPU, primarily.

You can increase resolution by sliding that slider (shown at the beginning of this article) in Oculus and Steam, to the right!

Press enter or click to view image in full size
Mo’ pixels, Mo’ purty — from your GPU

If I increase my frequency, this will reduce the frame time threshold, which will affect the time available for both the GPU and the CPU to draw each frame, however in VR especially you want more frames because that equates to a smoother and more realistic or more accurate playing experience, depending on the game you’re playing.

You can change frequency by choosing it in Oculus, as shown in the same image. For SteamVR native and WMR, it will depend on your headset’s own mechanism of frequency change.

More Hertz, hurts more! for your CPU

When in VR, you want as many frames as you can afford.

Other ways I could increase my visual quality, would be to look for things that are more GPU oriented than CPU, so things like anti-aliasing, texture quality/filtering, shader quality and bloom/lighting quality, as I have more GPU headroom than CPU headroom. If these were switched, I would look for more CPU oriented settings like render distance or particle count.

fpsVR has far more capabilities than just frame timing — indeed you can also do this natively in steamvr developer settings, fpsVR is just too cool and useful not to buy it 🤷‍♂️. Here is a nice little video about it’s use in optimizing frame timings:

OK, that’s it! You will reach the sweet spot following this method — and now you know why!

Go forth and be dreamy in your stream(y).

More reading about frametime — what about this warps and such?

As noted, this is literally how long your PC gets to make one frame, that’s one of those “Frames Per Seconds” that are so important. The more frames per second you seek, the less time is available to make the frame.

So 72Hz means the system has 13.89ms to deliver each frame, etc:


+================+================+
| Frequency (Hz) | Frametime (ms) |
+================+================+
| 72 | 13.89 |
+----------------+----------------+
| 90 | 11.11 |
+----------------+----------------+
| 120 | 8.33 |
+----------------+----------------+
Press enter or click to view image in full size
taken from https://unity.com/how-to/best-practices-for-profiling-game-performance

A more in depth read on fps vs frametime is available from The Computer Graphics and Virtual Reality Study Lab @ University of Tartu, and as above, Unity — if you want to watch a strangely unbearded Tech Jesus have a conversation about it, check out:

Spacewarps and motion smoothing

Mentioned a bit in some of these links, basically if your machine cannot give you a good solid frametime at the frequency you want, you can turn on ASW (Oculus has it on by default, it’s an effort to turn it off) or turn on “Motion Smoothing” on SteamVR for non-Oculus headsets.

It creates artefacts, because it’s “guessing” what it should show you, and so it’s definitely second best and to be avoided if you can. And for rhythm games, it’s the kiss of death — you’ll miss, essentially.

Any stuff I got wrong, please correct me :D

--