Nvvidconv does not move data out of NVMM memory

I’m trying to build a gstreamer pipeline using the cameras on the special interface that the Jetson AGX Xavier comes with. For a start, I’m trying to just capture video data to a file so that I can confirm that it is getting data from the cameras, but that is failing because I can’t get it to move the data out of the NVMM memory.

Allegedly, the nvvidconv tool should be able to take video data in the NVMM memory and move it out to normal memory (which I need for the later steps in my pipeline). According to this post, nvvidconv should be able to perform this conversion. However, whenever I try this, I get the error message:

ERROR.  nvvidconv gstnvvconv.c:2171:gst_nvvconv_fixate_caps:<nvvconv0> Failed to fixate output format

I’ve tried a bunch of different formats that this guide says it should support, and none of them are able to make it work. If I keep the output of the nvvidconv step in the NVMM memory, then the nvvidconv step is able to set itself up perfectly fine, but the next steps can no longer handle their incoming data (because they don’t know how to handle NVMM memory). Thus, I’m convinced that it is the moving of the data out of the NVMM memory which is causing the nvvidconv step to act up, not the specific formats I’m requesting (I’ve tried several formats as both input and output, and none of them have worked for me). I also can’t just stay out of NVMM memory the entire time, since nvarguscamerasrc can only output its data to NVMM memory.

For reference, the command which I am trying to run is:

gst-launch-1.0 -v nvarguscamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM), width=(int)1928, height=(int)1208, format=(string)NV12' ! nvvidconv ! 'video/x-raw, format=(string)NV12' ! videoconvert ! x264enc ! mpegtsmux ! filesink location=vid.mp4

(an example of something I tried that didn’t work, but I need to make something like this work).

Are there any tools that are able to move the data around as I require? Any help would be greatly appreciated.

Hi,
We don’t observe the issue on r32.5.1/Xavier. Please try the command:

$ gst-launch-1.0 -v nvarguscamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM), width=(int)1928, height=(int)1208, format=(string)NV12' ! nvvidconv ! 'video/x-raw, format=(string)NV12' ! fakesink

If it works, please try the command and check camera preview:

$ esport DISPLAY=:0(or 1)
$ gst-launch-1.0 -v nvarguscamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM), width=(int)1928, height=(int)1208, format=(string)NV12' ! nvvidconv ! 'video/x-raw, format=(string)NV12' ! videoconvert ! xvimagesink

If the sensor mode is not 1920x1208p30 but other framerate, please set the correct framerate to caps.

1 Like

Hi DaneLLL.

Thank you for your suggestion. Unfortunately, I get the same error message using your suggested command involving fakesink.

The sensor that I’m using (AR0231) supports that mode, and the given caps was provided by the vendor, so it’s not an issue with the sensor mode.

You may better explain how many CSI cameras, what sensors and what modes are reported for each camera.
BTW, does it work better with sensor-id=0 ?

1 Like

@Honey_Patouceul I have two cameras on the CSI port, with AR0231 sensors. I don’t know how to check what modes they report.

I tried setting the sensor-id to 0 instead of 1 and I got the same output as before.

For first sensor /dev/video0, try:

v4l2-ctl -d0 --list-formats-ext

Note that v4l2-ctl command is provided by apt package v4l-utils.

1 Like

Hmm, v4l2 is unable to find the video sensors. The vendor I bought these cameras from told me that their drivers would work with their cameras on these Jetsons, but it now seems to me that I probably shouldn’t have blindly trusted their word.

Probably you would need a SDK including kernel or modules for drivers (these may be tied to a given kernel version and therefore to some L4T/JetPack version) and device tree specifying how this hw is connected to jetson.
You may ask your camera vendor for these details.

Hi,
Please run

$ gst-launch-1.0 nvarguscamerasrc ! fakesink

and share available sensor modes for reference:

GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.