Hi.
After much trial and error i was able to find the correct arguments to pass to the gstreamer pipeline using nvarguscamerasrc.
Using gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)3264, height=(int)2464, framerate=(fraction)21/1' ! nvv4l2h264enc enable-lossless=true profile=4 ! h264parse ! mp4mux ! filesink location=filename.mp4 -e
i get a consistent 21FPS at the full resolution on the preview window.
Now i want to integrate the camera into a larger project and want to use ROS with gscam (a simple package that publishes gstreamer pipelines as ROS messages) and since “gscam” expects the pipeline in pure RGB format, i have to change my command to:
nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=3264, height=2464, framerate=21/1 ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert
.
This results in terrible performance, 1-3 FPS to be specific. I had the same problem in python before and i just resorted to using the bare gstreamer pipeline, but now i am just clueless.
Is there something fundamentally wrong with my argument chain or does anyone have suggestions for performance improvements ?
Thanks in advance.
Try nvvideoconvert instead of videoconvert.
My GSCAM_CONFIG
now looks like this:
nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=3264, height=2464, framerate=21/1 ! nvvidconv ! video/x-raw, format=(string)BGRx ! nvvideoconvert
Unfortunately i am getting GStreamer: cannot link outelement(“nvvconv0“) -> sink
And thus Failed to initialize gscam stream!
Please try below.
nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=3264, height=2464, framerate=21/1 ! nvvidconv ! video/x-raw(memory:NVMM), format=(string)BGRx ! nvvideoconvert
Unfortunately, that results in the same error.
Do you have further ideas?
EDIT: I found out that using “(memory:NVMM)” or (not XOR lol) “nvvideoconvert” will produce an error.
Hi,
This looks expected since ROS needs BGR data in CPU buffer. This needs additional buffer copy and conversion on CPU, so performance will be capped by CPU capability of Jetson Nano.
There is similar discussion in the topic:
[Gstreamer] nvvidconv, BGR as INPUT
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.