Influence of settings for NVENC lossless recording

Katzenwerfer

New Member
I sometimes record my games losslessly using NVENC to re-encode later without losing a lot of quality
I've read that some settings (look-ahead, PVT and B-frames) can improve quality if you are using CBR, CQP and VBR, but I'm not really sure if they actually make a difference when doing lossless recording.

> TL;DR
Does look-ahead, psycho visual tuning and higher b-frames affect lossless recording quality in some way?
Is it ok if I disable the 3 of them to save some resources?

[didn't attach log since I doubt it is required to answer my question, but if required I'll just attach it]
 

Lawrence_SoCal

Active Member
Here are my related notes I've copied from very knowledgeable folks, saved over last year ... in case this helps

https://obsproject.com/forum/threads/best-settings.140188/#post-514693 @FerretBomb comment #2
1) NEVER RECORD TO MP4 DIRECTLY, FOR ANY REASON. It is not a recording-safe format; if anything goes wrong during the recording, even for a split second, the ENTIRE recording will be corrupted and absolutely not recoverable by any means. Record to MKV, and remux to MP4 after the recording is complete from OBS' File menu, Remux Recordings.

2) Record using CQP or CRF, not CBR. CBR is only used for streaming, where the back-end infrastructure requires it. CQP/CRF are quality-target based encodes, and will use as much or as little bitrate as is needed to maintain a constant image quality. No wasting bitrate on simple/slow scenes, no choking on fast-moving or complex scenes. 22 is a good starting point. 16 will result in much larger files, but near-perfect video. 12 should only be used if you plan to edit and re-encode later, and will be VERY large. Anything lower than 12 shouldn't be used unless you know exactly why you need it, and what problems it can cause.

3) Use the Quality preset, not Max Quality. Likewise, turn off Psychovisual Tuning. Both of these options use CUDA cores, and tend to cause significant problems like encoding overload when it should otherwise not be happening.

Related to # 2 above ["FerretBomb, post: 529433, member: 4349"] Don't record with CBR or VBR, use CQP instead.

CQP is a quality-based encoding target that uses as much or as little bitrate as is needed to maintain a given image quality level.

22 is the normal 'good' point, 16 for 'visually lossless', and 12 is generally the lowest you'll want to go even if you plan to edit the video later (to cut down on re-encoding artifacts). The lower the number, the closer to 'lossless' video it gets. But below 16 the filesizes get ridiculously large very fast. [/QUOTE]

Jun 9 2021
Look-ahead allows the encoder to dynamically select the number of B-Frames, between 0 and the number of B-Frames you specify. B-frames are great because they increase image quality, but they consume a lot of your available bitrate (you should use CQP for recording so bitrate is not an issue), so they reduce quality on high motion content. Look-ahead enables the best of both worlds. This feature is CUDA accelerated; toggle this off if your GPU utilization is high to ensure a smooth recording.

Psycho Visual Tuning enables the Rate Distortion Optimization in the encoder, which greatly optimizes the way you use bitrate (not sure exactly how this works with CQP, possibly same quality at lower bitrate), improving image quality on movement. This feature is also CUDA accelerated.

If you're using something that uses the GPU, such as games, don't enable those. It depends on your source.
 

Katzenwerfer

New Member
I understood that those functions are mainly meant to increase quality on situations where bitrate is limited (aka recording on cbr, cqp, vbr) so I guess they probably don't affect lossless in a large way then
tbh I don't really have issue about the file size, and although it's obvious that recording in lossless can be stupid I just do it for full placebo effect :D
Thanks for the response
 

rockbottom

Active Member
Here are some links for StreamFX that should be of interest to you.


 
Top