完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在尝试在游戏运行时更改比特率。
这样做的正确方法是什么? 设置`dwNewAvgBitrate = newlowerrate`并传递给`NvIFRTransferRenderTargetToH264HWEncoder`没有做任何事情。 以上来自于谷歌翻译 以下为原文 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. |
|
相关推荐
4个回答
|
|
我也有兴趣进行动态比特率调整,而不必销毁/实例化一个全新的编码器。
这可能使用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? |
|
|
|
是的,NVENC可以支持更改动态比特率,分辨率,也支持,这也反映在GRID API调用中。
如果只是更改比特率,请确保您还要设置参数。 NV_IFROGL_HW_ENC_PARAMS参数 params.flags = NV_IFROGL_HW_ENC_PARAM_FLAG_DYN_BITRATE_CHANGE; params.newAvgBitrate =(你新的平均比特率) params.newVBVInitialDelay =(你的新VBV初始延迟) params.newVBVBufferSize =(你的新VBV缓冲区大小) 如果您只想更改分辨率。 params.flags = NV_IFROGL_HW_ENC_PARAM_FLAG_DYN_RESOLUTION_CHANGE; params.newWidth =(新的编码器宽度) params.newHeight =(新的编码器高度) 如果要更改分辨率和比特率,则必须同时设置标志)。 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); 然后更改两个参数。 以上来自于谷歌翻译 以下为原文 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. |
|
|
|
NV_IFROGL_HW_ENC_PARAMS是NvIFR结构。
我们主要使用NvFBC进行编码。 NvFBC和NvIFR是否可以互换以设置参数,或者我们需要设置NvFBC的等效params结构吗? 以上来自于谷歌翻译 以下为原文 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? |
|
|
|
通过默认设置.dwFlags = NVFBC_TOH264_NOFLAGS,编码器将等待屏幕上的更改以完成编码器api调用。
直到那时线程处于等待状态。 除了触发更改或终止调用进程之外,有没有办法退出此等待状态? 以上来自于谷歌翻译 以下为原文 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? |
|
|
|
只有小组成员才能发言,加入小组>>
使用Vsphere 6.5在Compute模式下使用2个M60卡遇到VM问题
3122 浏览 5 评论
是否有可能获得XenServer 7.1的GRID K2驱动程序?
3530 浏览 4 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-20 06:12 , Processed in 0.734483 second(s), Total 83, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号