我正在使用gstreamer 1.18 (使用gst-build构建)。我正在尝试使用nvh265enc插件的无损预设。使用以下管道,我可以成功地使用除无损预置(无损(6)和无损-hp(7))之外的所有预置:
gst-launch-1.0 videotestsrc ! nvh265enc preset=6 ! h265parse ! nvh265dec ! glimagesink每当我将preset设置为6或7时,我都会得到以下错误。
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=0或rc-mode=1是可行的。
发布于 2021-03-27 07:07:56
首先,无损和无损惠普之间没有区别。
其次,Gstreamer不是Nvidia原生支持的应用程序。另一方面,FFmpeg则是。例如,作为参考模式的B帧及其两个子模式(中间和每个)在GS中也不被支持。请参阅:https://forum.videohelp.com/threads/387613-Nvidia-h-265-hevc-lossless#post2509093
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的无损。
https://stackoverflow.com/questions/66797257
复制相似问题