Hi
I am having troubles with Gstreamer and the h264/5 encoding/decoding capabilities on the Jetson AGX Xavier platform.
Using following command to test if everything works
GST_DEBUG=3 gst-launch-1.0 -v videotestsrc pattern=smpte ! video/x-raw,width=1280,height=720 ! nvvidconv ! “video/x-raw(memory:NVMM),format=NV12” ! nvv4l2h264enc ! h264parse config-interval=1 ! nvv4l2decoder ! nvvidconv ! “video/x-raw(memory:NVMM)” ! nvdrmvideosink
Gives me an error:
Setting pipeline to PAUSED ...
0:00:00.107190048 504 0xaaaac1286870 WARN v4l2 v4l2_calls.c:651:gst_v4l2_open:<nvv4l2decoder0> error: Could not open device '/dev/nvhost-nvdec' for reading and writing.
0:00:00.107248672 504 0xaaaac1286870 WARN v4l2 v4l2_calls.c:651:gst_v4l2_open:<nvv4l2decoder0> error: system error: Cannot allocate memory
ERROR: from element /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0: Could not open device '/dev/nvhost-nvdec' for reading and writing.
Additional debug info:
v4l2_calls.c(651): gst_v4l2_open (): /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0:
system error: Cannot allocate memory
ERROR: pipeline doesn't want to preroll.
0:00:00.107509440 504 0xaaaac1286870 WARN videodecoder gstvideodecoder.c:2910:gst_video_decoder_change_state:<nvv4l2decoder0> error: Failed to open decoder
ERROR: from element /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0: Could not initialize supporting library.
Additional debug info:
../gst-libs/gst/video/gstvideodecoder.c(2910): gst_video_decoder_change_state (): /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0:
Failed to open decoder
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...
I am using a custom filesystem with following setup:
- a generic Gstreamer, version 1.20.4
- a generic v4l2
- the tegra and tegra-egl folder from the sample rootfilesystem (R35.1)
- build my own gst-egl, gst-nvvidconv, nvdrmvideosink, nvvideosinks, libv4l2 and libv4lconvert, gst-nvvideo4linux2
Anything I am missing?
I use CUDA_VER 12.1
Thanks