4

Environment :- Raspi v2 camera, Jetson nano board, Ubuntu 18.04 I started with nvarguscamerasrc and it's working :-

gst-launch-1.0 nvarguscamerasrc sensor_mode=0 ! 'video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12'! nvegltransform ! nveglglessink -e

and then I tried running these inputs :-

 gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-h264, width=3280, height=2464' ! filesink

and also :-

 gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw, width=640, height=480' ! filesink

and got output as :-

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
  • On Jetson boards CSI cameras are managed with `argus` libraries. AFAIK you cannot use `V4L2` to access them. Why not use `nvarguscamerasrc`? – Alper Kucukkomurler Jan 18 '21 at 11:42
  • nvarguscamerasrc only gives NV12 output while I need RGB – Kishan Singh Jan 19 '21 at 03:39
  • You can use `nvvidconv` to convert it to `BGRx` than `videoconvert` to `RGB`. This way you will use significantly less CPU. The pipeline will look someting like this : `gst-launch-1.0 nvarguscamerasrc sensor_mode=0 ! 'video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12'! nvvıdconv ! 'video/x-raw, format=(string)BGRx' ! videoconvert ! 'video/x-raw, format=(string)RGB ! ....` – Alper Kucukkomurler Jan 19 '21 at 08:08
  • I want direct rgb from camera if possible – Kishan Singh Jan 26 '21 at 07:09
  • Unfortunately `nvarguscamerasrc` only outputs `NV12`. (At least at the Jetson TX2 I can access right now, your device may be different) You can check it with `gst-inspect-1.0 nvarguscamerasrc`. This will output the properties of the `nvarguscamerasrc` element. The src pad properties is the list available output formats of the plugin. The Jetson TX2 I have now only lists NV12 here. – Alper Kucukkomurler Jan 27 '21 at 11:15
  • Can someone explain why the error about PREROLL is happening or how to get it to not try to pause the pipeline? I'm having same issue but on a RPi using one of the built-in camera drivers connected to CSI-2 interface. – dbainbridge Feb 09 '21 at 18:10

0 Answers0