首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用nvh265enc gstreamer插件的无损预设

无法使用nvh265enc gstreamer插件的无损预设
EN

Stack Overflow用户
提问于 2021-03-25 18:11:44
回答 1查看 84关注 0票数 0

我正在使用gstreamer 1.18 (使用gst-build构建)。我正在尝试使用nvh265enc插件的无损预设。使用以下管道,我可以成功地使用除无损预置(无损(6)和无损-hp(7))之外的所有预置:

代码语言:javascript
复制
gst-launch-1.0 videotestsrc ! nvh265enc preset=6 ! h265parse ! nvh265dec ! glimagesink

每当我将preset设置为6或7时,我都会得到以下错误。

代码语言:javascript
复制
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Got context from element 'nvh265dec0': gst.cuda.context=context, gst.cuda.context=(GstCudaContext)"\(GstCudaContext\)\ cudacontext0", cuda-device-id=(int)0;
ERROR: from element /GstPipeline:pipeline0/GstNvH265Enc:nvh265enc0: Could not configure supporting library.
Additional debug info:
../subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c(1712): gst_nv_base_enc_set_format (): /GstPipeline:pipeline0/GstNvH265Enc:nvh265enc0:
Failed to init encoder: 8
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstNvH265Enc:nvh265enc0: Could not configure supporting library.
Additional debug info:
../subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c(1712): gst_nv_base_enc_set_format (): /GstPipeline:pipeline0/GstNvH265Enc:nvh265enc0:
Failed to init encoder: 8
ERROR: pipeline doesn't want to preroll.
Freeing pipeline ...

更令人费解的是,无损预设适用于Nvidia Video Codec SDK 9的样本。

我是否错过了任何额外的配置?

编辑:最后,我发现在nvh265enc中添加qp-const=0rc-mode=1是可行的。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-27 07:07:56

首先,无损和无损惠普之间没有区别。

请参阅https://superuser.com/questions/1528215/what-is-the-difference-between-nvenc-hevc-lossless-and-losslesshp-presets

其次,Gstreamer不是Nvidia原生支持的应用程序。另一方面,FFmpeg则是。例如,作为参考模式的B帧及其两个子模式(中间和每个)在GS中也不被支持。请参阅:https://forum.videohelp.com/threads/387613-Nvidia-h-265-hevc-lossless#post2509093

代码语言:javascript
复制
ffmpeg -vsync 0 -r 60 -hwaccel cuda  -hwaccel_output_format cuda -i "in.mp4" -c:v hevc_nvenc -preset lossless "out.mp4"

P.S. Gstreamer支持rc-mode=1或qp-const=0的无损。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66797257

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档