This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] NVEnc Settings
#1
I've been using NVEnc to convert my video files to H.265 format for archiving purposes. 

I try to understand various NVEnc setting available in Hybrid. Here are my questions:

  1. Weighted Prediction

I have found following info:

Quote:Weighted prediction is not supported if the encode session is configured with B frames.

Weighted prediction is not supported if DirectX 12 device is used.

https://docs.nvidia.com/video-technologi...index.html

I don't understand what means that "session is configured with B frames" if the context of Hybrid settings (my setting are attached)
I've noticed that I can select  /P-frame Settings/Weighted P-frames even is some setting for B-frames are also active. Does it mean that, when I use Weighted Prediction then B-frames are not enabled?

I also don't understand second statement about Direct X 12


  1. 2. I don't know if or when I should use B-frame ref mode: each/middle

Any help here would be welcomed.


Attached Files Thumbnail(s)
   
Reply
#2
The api can be accessed through different interfaces, since NVEncC does not use the DirectX interface can be ignored.
Regarding the weighted prediction of P-frames: I checked when B-frames are enabled, NVEncC will output:
weighted prediction with B frames unsupported.
So I'll adjust the gui to disable that option if b-frames are enabled. (I would recommend to use b-frames over weighted p-frames)

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
Thanks you for that explanation

Could you please also explain me that are recommendations regarding:  B-frame ref mode: each/middle

Which option: each or middle is recommended? I couldn't find good explanation on internet.
Reply
#4
Quote:--bref-mode <string>
Specify B frame reference mode.
  • auto (default)
  • disabled
  • each ... use each B frames as references
  • middle ... only (Number of B-frame)/2 th B-frame will be used for reference
source: https://github.com/rigaya/NVEnc/blob/mas...ode-string
(atm. Hybrid does not have 'auto' as an option)

From the api, one can see what 'auto' would do:
Quote:B-Frames As Reference

Using B frame as a reference improves subjective and objective encoded quality with no performance impact. Hence the users enabling multiple B frames are strongly recommended to enable this feature.

To use the feature, follow these steps:
  • Query availability of the feature using NvEncGetEncodeCaps API and checking for NV_ENC_CAPS_SUPPORT_BFRAME_REF_MODE in the return value.
  • During encoder initialization, set NV_ENC_CONFIG_H264/NV_ENC_CONFIG_HEVC/NV_ENC_CONFIG_AV1::useBFramesAsRef = NV_ENC_BFRAME_REF_MODE_MIDDLE:
    • For H.264 and HEVC, this will set the (N/2)th B frame as reference, where N = number of B frames. In case N is odd, then (N-1)/2th frame will be picked up as reference.
    • For AV1, this will set every other B frame as an Altref2 reference but for the last B frame in the Altref interval.
source: https://docs.nvidia.com/video-technologi...-reference

So for H.264 and HEVC NVIDA by default would use 'middle' and for AV1 they would use 'each'.
Personally, I use 'each' for both, but that's not really based on any tests, but on sheer lazyness. Smile

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)