NVIDIA
Dynamic bitrate, change bitrate while game is running
I am trying to change the bitrate while game is running. What is the right way to do that? Setting `dwNewAvgBitrate = newlowerrate` and passing to `NvIFRTransferRenderTargetToH264HWEncoder` is not doing anything.
I am trying to change the bitrate while game is running. What is the right way to do that? Setting `dwNewAvgBitrate = newlowerrate` and passing to `NvIFRTransferRenderTargetToH264HWEncoder` is not doing anything.

#1
Posted 11/11/2015 12:34 PM   
I am also interested in doing a dynamic bitrate adjustment without having to destroy/instantiate a whole new encoder. Is this possible using the GRID SDK?
I am also interested in doing a dynamic bitrate adjustment without having to destroy/instantiate a whole new encoder. Is this possible using the GRID SDK?

#2
Posted 06/13/2016 06:56 PM   
Yes the NVENC can support changing dynamic bitrate, resolution, is supported, and that is also reflected in the GRID API call as well. If just changing the bitrate, make sure that you are also setting parameters. NV_IFROGL_HW_ENC_PARAMS params params.flags = NV_IFROGL_HW_ENC_PARAM_FLAG_DYN_BITRATE_CHANGE; params.newAvgBitrate = (your new Avg bitrate) params.newVBVInitialDelay = (your new VBV Initial Delay) params.newVBVBufferSize = (your new VBV Buffer Size) If you just want to change the resolution. params.flags = NV_IFROGL_HW_ENC_PARAM_FLAG_DYN_RESOLUTION_CHANGE; params.newWidth = (new encoder width) params.newHeight = (new encoder height) If you want to change both resolution and bitrate, the flags must be both set). params.flags = (NV_IFROGL_HW_ENC_PARAM_FLAGS)(NV_IFROGL_HW_ENC_PARAM_FLAG_DYN_RESOLUTION_CHANGE | NV_IFROGL_HW_ENC_PARAM_FLAG_DYN_BITRATE_CHANGE); Then change both parameters.
Yes the NVENC can support changing dynamic bitrate, resolution, is supported, and that is also reflected in the GRID API call as well.

If just changing the bitrate, make sure that you are also setting parameters.

NV_IFROGL_HW_ENC_PARAMS params
params.flags = NV_IFROGL_HW_ENC_PARAM_FLAG_DYN_BITRATE_CHANGE;
params.newAvgBitrate = (your new Avg bitrate)
params.newVBVInitialDelay = (your new VBV Initial Delay)
params.newVBVBufferSize = (your new VBV Buffer Size)

If you just want to change the resolution.
params.flags = NV_IFROGL_HW_ENC_PARAM_FLAG_DYN_RESOLUTION_CHANGE;
params.newWidth = (new encoder width)
params.newHeight = (new encoder height)

If you want to change both resolution and bitrate, the flags must be both set).
params.flags = (NV_IFROGL_HW_ENC_PARAM_FLAGS)(NV_IFROGL_HW_ENC_PARAM_FLAG_DYN_RESOLUTION_CHANGE | NV_IFROGL_HW_ENC_PARAM_FLAG_DYN_BITRATE_CHANGE);

Then change both parameters.

#3
Posted 06/14/2016 10:29 PM   
NV_IFROGL_HW_ENC_PARAMS is an NvIFR struct. We’re primarily using NvFBC for our encoding. Are NvFBC and NvIFR interchangeable for setting up parameters or is there an equivalent params struct for NvFBC that we need to set?
NV_IFROGL_HW_ENC_PARAMS is an NvIFR struct. We’re primarily using NvFBC for our encoding. Are NvFBC and NvIFR interchangeable for setting up parameters or is there an equivalent params struct for NvFBC that we need to set?

#4
Posted 06/15/2016 12:48 AM   
by setting .dwFlags = NVFBC_TOH264_NOFLAGS by default the encoder will wait for a change on the screen to finish the encoder api call. until then the thread is in a wait state. is there a way to exit this wait state other than triggering a change or terminating the calling process?
by setting .dwFlags = NVFBC_TOH264_NOFLAGS by default the encoder will wait for a change on the screen to finish the encoder api call. until then the thread is in a wait state.

is there a way to exit this wait state other than triggering a change or terminating the calling process?

#5
Posted 06/15/2016 11:05 AM   
Scroll To Top

Add Reply