Hello, I have spent a considerable amount of time trying to download some requirements for GPU accelerated plugins for my Gstreamer pipeline. Effectively I need the nvenc and nvdec 264 however I cannot follow installation guidelines online which I will reference in further detail, nor did the plug-in(s) come with the CUDA Toolkit download. This has been a recurring issue and has caused a large delay in my project. Any guidance on how to complete this or how to fix existing issues would be helpful.
Specifications,
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Sun_Oct_23_22:16:07_PDT_2022
Cuda compilation tools, release 11.4, V11.4.315
Build cuda_11.4.r11.4/compiler.31964100_0
UBUNTU 20.4
HARDWARE NVIDIA JETSON AGX ORIN Developer Kit
Online References:
(1) GStreamer Nvenc for Ubuntu 20.04 | End Point Dev
fails at:
$ cd ../nvdec
$ make <- Fails here
CCLD libgstnvdec.la
/usr/bin/ld: cannot find -lnvcuvid
collect2: error: ld returned 1 exit status
make: *** [Makefile:833: libgstnvdec.la] Error 1
(2) Install NVDEC and NVENC as GStreamer plugins · GitHub
cd sys/nvenc
make <- Fails here
CC libgstnvenc_la-gstnvenc.lo
cc1: warning: /path/to/gst-plugins-bad/sys/nvenc: No such file or directory [-Wmissing-include-dirs]
gstnvenc.c: In function ‘gst_nvenc_create_cuda_context’:
gstnvenc.c:288:9: warning: ‘cuDeviceComputeCapability’ is deprecated [-Wdeprecated-declarations]
288 | && cuDeviceComputeCapability (&maj, &min, cdev) == CUDA_SUCCESS) {
| ^~
In file included from gstnvenc.h:27,
from gstnvenc.c:24:
./cuda.h:4163:36: note: declared here
4163 | CUDA_DEPRECATED CUresult CUDAAPI cuDeviceComputeCapability(int *major, int *minor, CUdevice dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
CC libgstnvenc_la-gstnvbaseenc.lo
cc1: warning: /path/to/gst-plugins-bad/sys/nvenc: No such file or directory [-Wmissing-include-dirs]
In file included from /usr/lib/aarch64-linux-gnu/glib-2.0/include/glibconfig.h:9,
from /usr/include/glib-2.0/glib/gtypes.h:32,
from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from /usr/include/gstreamer-1.0/gst/gst.h:27,
from gstnvenc.h:23,
from gstnvbaseenc.h:23,
from gstnvbaseenc.c:24:
gstnvbaseenc.c: In function ‘nv_preset_to_guid’:
gstnvbaseenc.c:86:79: error: ‘NV_ENC_PRESET_DEFAULT_GUID’ undeclared (first use in this function); did you mean ‘NV_ENC_PRESET_P7_GUID’?
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET,nv),GUID)
| ^~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:735:47: note: in definition of macro ‘G_PASTE_ARGS’
735 | define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
| ^~~~~~~~~~~
gstnvbaseenc.c:86:63: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET,nv),GUID)
| ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:736:47: note: in expansion of macro ‘G_PASTE_ARGS’
736 | define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
| ^~~~~~~~~~~~
gstnvbaseenc.c:86:71: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
gstnvbaseenc.c:87:7: note: in expansion of macro ‘CASE’
87 | CASE (DEFAULT, DEFAULT);
| ^~~~
gstnvbaseenc.c:86:79: note: each undeclared identifier is reported only once for each function it appears in
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:735:47: note: in definition of macro ‘G_PASTE_ARGS’
735 | define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
| ^~~~~~~~~~~
gstnvbaseenc.c:86:63: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:736:47: note: in expansion of macro ‘G_PASTE_ARGS’
736 | define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
| ^~~~~~~~~~~~
gstnvbaseenc.c:86:71: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
gstnvbaseenc.c:87:7: note: in expansion of macro ‘CASE’
87 | CASE (DEFAULT, DEFAULT);
| ^~~~
gstnvbaseenc.c:86:79: error: ‘NV_ENC_PRESET_HP_GUID’ undeclared (first use in this function); did you mean ‘NV_ENC_PRESET_P7_GUID’?
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:735:47: note: in definition of macro ‘G_PASTE_ARGS’
735 | define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
| ^~~~~~~~~~~
gstnvbaseenc.c:86:63: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:736:47: note: in expansion of macro ‘G_PASTE_ARGS’
736 | define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
| ^~~~~~~~~~~~
gstnvbaseenc.c:86:71: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
gstnvbaseenc.c:88:7: note: in expansion of macro ‘CASE’
88 | CASE (HP, HP);
| ^~~~
gstnvbaseenc.c:86:79: error: ‘NV_ENC_PRESET_HQ_GUID’ undeclared (first use in this function); did you mean ‘NV_ENC_PRESET_P7_GUID’?
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:735:47: note: in definition of macro ‘G_PASTE_ARGS’
735 | define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
| ^~~~~~~~~~~
gstnvbaseenc.c:86:63: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:736:47: note: in expansion of macro ‘G_PASTE_ARGS’
736 | define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
| ^~~~~~~~~~~~
gstnvbaseenc.c:86:71: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
gstnvbaseenc.c:89:7: note: in expansion of macro ‘CASE’
89 | CASE (HQ, HQ);
| ^~~~
gstnvbaseenc.c:86:79: error: ‘NV_ENC_PRESET_LOW_LATENCY_DEFAULT_GUID’ undeclared (first use in this function); did you mean ‘GST_NV_PRESET_LOW_LATENCY_DEFAULT’?
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:735:47: note: in definition of macro ‘G_PASTE_ARGS’
735 | define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
| ^~~~~~~~~~~
gstnvbaseenc.c:86:63: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:736:47: note: in expansion of macro ‘G_PASTE_ARGS’
736 | define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
| ^~~~~~~~~~~~
gstnvbaseenc.c:86:71: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
gstnvbaseenc.c:91:7: note: in expansion of macro ‘CASE’
91 | CASE (LOW_LATENCY_DEFAULT, LOW_LATENCY_DEFAULT);
| ^~~~
gstnvbaseenc.c:86:79: error: ‘NV_ENC_PRESET_LOW_LATENCY_HQ_GUID’ undeclared (first use in this function); did you mean ‘GST_NV_PRESET_LOW_LATENCY_HQ’?
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:735:47: note: in definition of macro ‘G_PASTE_ARGS’
735 | define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
| ^~~~~~~~~~~
gstnvbaseenc.c:86:63: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:736:47: note: in expansion of macro ‘G_PASTE_ARGS’
736 | define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
| ^~~~~~~~~~~~
gstnvbaseenc.c:86:71: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
gstnvbaseenc.c:92:7: note: in expansion of macro ‘CASE’
92 | CASE (LOW_LATENCY_HQ, LOW_LATENCY_HQ);
| ^~~~
gstnvbaseenc.c:86:79: error: ‘NV_ENC_PRESET_LOSSLESS_DEFAULT_GUID’ undeclared (first use in this function); did you mean ‘GST_NV_PRESET_LOSSLESS_DEFAULT’?
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:735:47: note: in definition of macro ‘G_PASTE_ARGS’
735 | define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
| ^~~~~~~~~~~
gstnvbaseenc.c:86:63: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:736:47: note: in expansion of macro ‘G_PASTE_ARGS’
736 | define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
| ^~~~~~~~~~~~
gstnvbaseenc.c:86:71: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
gstnvbaseenc.c:94:7: note: in expansion of macro ‘CASE’
94 | CASE (LOSSLESS_DEFAULT, LOSSLESS_DEFAULT);
| ^~~~
gstnvbaseenc.c:86:79: error: ‘NV_ENC_PRESET_LOSSLESS_HP_GUID’ undeclared (first use in this function); did you mean ‘GST_NV_PRESET_LOSSLESS_HP’?
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:735:47: note: in definition of macro ‘G_PASTE_ARGS’
735 | define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
| ^~~~~~~~~~~
gstnvbaseenc.c:86:63: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:736:47: note: in expansion of macro ‘G_PASTE_ARGS’
736 | define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
| ^~~~~~~~~~~~
gstnvbaseenc.c:86:71: note: in expansion of macro ‘G_PASTE’
86 | define CASE(gst,nv) case G_PASTE(GST_NV_PRESET,gst): return G_PASTE(G_PASTE(NV_ENC_PRESET_,nv),GUID)
| ^~~~~~~
gstnvbaseenc.c:95:7: note: in expansion of macro ‘CASE’
95 | CASE (LOSSLESS_HP, LOSSLESS_HP);
| ^~~~
gstnvbaseenc.c: In function ‘rc_mode_to_nv’:
gstnvbaseenc.c:131:72: error: ‘NV_ENC_PARAMS_RC_VBR_MINQP’ undeclared (first use in this function); did you mean ‘NV_ENC_PARAMS_RC_VBR’?
131 | define CASE(gst,nv) case G_PASTE(GST_NV_RC_MODE,gst): return G_PASTE(NV_ENC_PARAMS_RC,nv)
| ^~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:735:47: note: in definition of macro ‘G_PASTE_ARGS’
735 | define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
| ^~~~~~~~~~~
gstnvbaseenc.c:131:64: note: in expansion of macro ‘G_PASTE’
131 | define CASE(gst,nv) case G_PASTE(GST_NV_RC_MODE_,gst): return G_PASTE(NV_ENC_PARAMS_RC_,nv)
| ^~~~~~~
gstnvbaseenc.c:135:7: note: in expansion of macro ‘CASE’
135 | CASE (VBR_MINQP, VBR_MINQP);
| ^~~~
gstnvbaseenc.c: In function ‘gst_nv_base_enc_set_context’:
gstnvbaseenc.c:458:17: warning: unused variable ‘nvenc’ [-Wunused-variable]
458 | GstNvBaseEnc *nvenc = GST_NV_BASE_ENC (element);
| ^~~~~
gstnvbaseenc.c: In function ‘gst_nv_base_enc_sink_query’:
gstnvbaseenc.c:475:17: warning: unused variable ‘nvenc’ [-Wunused-variable]
475 | GstNvBaseEnc *nvenc = GST_NV_BASE_ENC (enc);
| ^~~~~
make: *** [Makefile:885: libgstnvenc_la-gstnvbaseenc.lo] Error 1
All other instructions I found refer to these, or use things like
nvidia-smi (which is not available on Jetson to my knowledge)
and instruct to download driver version related content.
Please note that if my post lacks detail due to in-experience on the platform I will correct it as soon as possible.