A guide to achieving high quality Recordings

Every since publishing the guide on how to achieve the best possible NVIDIA NVENC quality with FFmpeg 4.3.x and below, people repeatedly ask me what the best possible recording settings are. So today, as a Christmas present, let me answer this question to the best of my knowledge and help all of you achieve a quality you’ve never seen before. Read the full guide here.

Accidental NVENC Discoveries

While testing new updates to the VES testing suite, I discovered some weird behavior in NVENC. Here’s a list of them, maybe NVIDIA can shed some light on it:

G-Sync affects NVENC Encoding Speed

For unknown reasons G-Sync affects the rate of encoding provided by NVENC, no matter how you submit frames to it. So in case you’re hitting “Encoding Overloaded” in OBS Studio for no actual reason, try disabling G-Sync globally.

Constant Quality is a lie?

The “Constant Quality” encoding method often used for archival and also often mistaken for an alternative to x264 CRF has a default bitrate limit. For H.264/AVC the maximum bitrate it will pick is 135mbit/s, while for H.265/HEVC it will pick is 25mbit/s. You can affect these limits by explicitly setting the maxBitRate (“-maxrate” in FFmpeg) and vbvBufferSize (“-bufsize” in FFmpeg) to a higher value.

  • H.264/AVC
    • 6.2: -maxrate 800000k -bufsize 800000k
    • 6.1: -maxrate 480000k -bufsize 480000k
    • 6.0/5.2: -maxrate 240000k -bufsize 240000k
    • 5.0: -maxrate 135000k -bufsize 135000k (Driver Default)
  • H.265/HEVC
    • 6.2:
      • High: -tier high -maxrate 800000k -bufsize 800000k
      • Main: -tier main -maxrate 240000k -bufsize 240000k
    • 6.1:
      • High: -tier high -maxrate 480000k -bufsize 480000k
      • Main: -tier main -maxrate 120000k -bufsize 120000k
    • 6.0/5.2:
      • High: -tier high -maxrate 240000k -bufsize 240000k
      • Main: -tier main -maxrate 60000k -bufsize 60000k
    • 5.1:
      • High: -tier high -maxrate 160000k -bufsize 160000k
      • Main: -tier main -maxrate 40000k -bufsize 40000k
    • 5.0:
      • High: -tier high -maxrate 100000k -bufsize 100000k
      • Main: -tier main -maxrate 25000k -bufsize 25000k (Driver Default)

Please note that doing this means that you will need a more modern decoder to view or edit the footage. I still recommend to go with the highest possible maximum bitrate in order to get the best out of your footage.

H.265/HEVC struggles representing Foliage

Even with the above maximum bitrate fix applied, the HEVC NVENC encoder has a weird affinity to just murder foliage for no actual reason. It seems that there is a noise pattern detection method that freaks out once the foliage gets too large, and fails to adapt to the fact that the foliage now has even more detail than before.

Ocean Blue: A dark mode friendly OBS Theme

Long story short, I got tired from having to look at white checkboxes on gray background in OBS Studio, and decided to make my own theme. I picked deep blue shades for this, as it’s a color I’m familiar with, and one of the colors that still has reasonable contrast when layered on top of another. This is what it looks like.

It’s available for Patreon and Github supporters now, and will eventually be publicly available once it’s done. The current version is 75% complete lacking only some elements, such as menus, tooltips, font picker and other similar elements. In my opinion this is much easier on the eyes than the default “Dark” theme, and I’ll most likely be using this from now on.

Fastest Uint8Array to Hex String conversion in JavaScript

As a Programmer I have to deal with a number of programming languages to write code, and one language that repeatedly appears is JavaScript. JavaScript is one of the weirder languages – similar to PHP in weirdness – which makes it an interesting experience to say the least. Most of the time you’re at the whim of a grey box compiler, due to the massive variance of Browsers and Devices that the users use.

So in order to best approach reality, I have to figure out which APIs are available at any point in time, and also run performance benchmarks in current major browsers available to me. And that’s what todays post is about, finding which of the various methods is fast enough for high performance use.

Continue reading