If Venom told you about this site she's full of shit~

Extreme NVENC OBS profile

{{< tri-screencap name="Profile_Screencap" alt="List of all temps" >}}

What is the point?

The reason for this profile is to acieve the highest quality possible using NVENC on the 20xx/30xx Nvidia GPUs

Settings

Video Bitrate

I use 45,000 Kbps average and 80,000 Kbps max for 1140p60 recording but I will get some more percise numbers for multiple resolutions soon!

Keyframe interval

You can leave this at double frame rate but for the sake of increasing overal quality slighty I did 115 instead of 120.

This shouldn't actually change too much but this is meant to be a slight overkill profile.

Video Encoder

Here I am using h264_nvenc since it is a tried and known codec but these settings should also work for hevc_nvenc too if you want.

I'll try to get some more specific quality numbers for this too!

Video Encoder Settings

Now here is some special sauce! My settings are a modified version of Xaymar's OBS streaming settings

This post was made after he started to move his website to the new style, as of writing his Recording settings aren't avaliable

2pass

The use of 2pass is based of Xaymar's recomendations for Turing & Ampere cards but this will be further explored during my quality testing.

I know it is more useful in a Streaming situation since it helps keep the bitrate more consistent but according to the FFMPEG website it can lower the quality some what?

multipass

This option is NVENC specific and is similar to 2pass but helps the NVENC encoder decide how to distribute the bitrate across the from and how many bits it will require as well and let's the encoder decide what QP level to use for parts of the frame

This has two modes; first pass in quarter resolution and second pass in full resolution and both passes in full resolution

According to the Nvidia docs full resolution mode generates better stats for the second pass but the quater resolution mode gets larger motion vectors which can posibly help with objects that move across the screen faster(?). As with all things in this post I will look into it more when i do proper quality testing.

spatial-aq & temporal-aq

The spatial-aq option helps the NVENC encoder use it's bitrate more efficiently in places that need details instead of areas that dont actually have any detail

The Nvidia docs say the required bit redistribution results in PSNR drop in most of the cases. which makes sense but is good to keep in mind when looking for quality mterics, when testing later I will use SSIM and VMAF scores to gague quality!

The temporal-aq options checks through the frames within the rc-lookahead area to see what ones of those frames require bitrate more compared to the others

rc-lookahead

rc-lookahead improves the overal quality of the video by allowing the encoder to look over the buffered frames to estimate the complexity of the frames to more efficiently distrabute the bitrate and to also allocate B and P frames

profile

According to RGB Spectrum the High profile is the most efficient profile, I'm pretty sure this just decides default settings for the actual h264 format(?)

preset

This changes the preset settings for a bunch of the settings the encoder uses, p7 is the "slowest" and highest quality mode in the latest versions of FFMPEG and OBS.

Even though it is called the "slowest" it can still get over 100FPS on my 1440p footage when using FFMPEG directly

proton and linux gaming things [V1.0]

The permalink for this page is https://buymymojo.net/linux/proton-and-linux, keep that in your bookmarks if you want to check back on this post later!

DLSS on linux

So first of all I do use nvidia GPUs for a few reasons, DLSS and NVENC being a couple so here is a quick guide on how to use DLSS on linux:

Steam

To run steam Proton games with dlss you just need to add a couple of launch options:

For DX12 games:

PROTON_ENABLE_NVAPI=1 %command%

For DX11 games (Also use with DX12 if you're having issues):

PROTON_HIDE_NVIDIA_GPU=0 PROTON_ENABLE_NVAPI=1 %command%

Lutris

To run Lutris games with dlss it is a very simple toggle!

Right click the game > Config > Runner options tab > Enable DXVK-NVAPI / DLSS

It might be enabled by default already

HUGO logo

Lutris troubleshooting

I had an issue where Cyberpunk 2077 wouldnt let me enable dlss after this feature was added, if you have an issue where you ran the game without DLSS enabled and now it wont let you enable it at all then this might fix it for you;

  1. go to the game's files
    • in my case it was in ~/Games/cyberpunk2077/drive_c/GOG Games/Cyberpunk 2077/
  2. delte the d3d11.log and dxgi.log files.
    • For me the files where named Cyberpunk2077_d3d11.log and Cyberpunk2077_dxgi.log so the file might have the games name in it for you too.
  3. Enable DLSS and run again

FPS overlay

Having a good FPS overlay is always a useful tool.

The best overlay I've found is Mangohud.

Overlay example
Credit: The Mangohud github page

The easiest way to configure Mangohud how you'd like it is to use Goverlay

Goverlay example
Credit: The Goverlay github page

Proton optimisation

While a lot of games run with equal to or greater then windows performance now there are always some optimisations to make the experince more smooth. Hopefully in the future devs will provide presets for these on linux with the launch of the steam deck

Nvidia optimisations

I did say that I run an Nvidia card so this will be my starting point.

  • __GL_THREADED_OPTIMIZATION=1
    • For OpenGL games this can give a performance boost.
  • __GL_SHADER_DISK_CACHE=1
    • This will cache shaders as they are compiled so the gpu doesnt need to compile them again. Not all games need this but it can reduce stuttering more and more as you play.
  • __GL_SHADER_DISK_CACHE_PATH=/path/to/location
    • This sets the location for the shader cache. I typically just put a /cache folder inside my game's folder.

AMD optimisations

I dont have an AMD card to test any of these on so refer to the ProtonDB page for more info

  • Install Mesa drivers for AMD cards
    • Refer to the DB page
    • Using a mesa drive past version 19.3 will let steam use their newer ACO shader compiler
  • mesa_glthread=true
    • Like __GL_THREADED_OPTIMIZATION=1 but for AMD

Intel Optimisations

There arent any dedicated Intel GPUs in the wild for gaming yet, silly.

I will update this section when we get some actual information about them!

Universal optimisations

These are some optimisations that work on all GPU providers

  • Feral Gamemode
    • This is a tool made by Feral Interactive, They have ported games like Total War: ROME REMASTERED, Shadow of the Tomb Raider and Life is Strange: Before the Storm to linux!
    • The tweaks in this tool are typically already active in their own games but adding this to other Proton games can provide further performance imporovements in CPU limited situations
    • It can be installed via your package manager of built using their git repo
    • Add it to your steam game launch options like so: gamemoderun %command%
    • There is a toggle for this inside of Lutris too!
  • Custom Proton/Wine builds
    • GloriousEggroll Proton this version typically provides extra fixes onto the current experimental version of Proton
    • GloriousEggroll Wine these are basically the game builds but for use with Lutris or just to run normal Windows software

Credits:
GamingOnLinux; I found the DX11 and DX12 steam launch options here
ProtonDB; got some optimisation tips from their Performance page
follow me into the Fediverse