Streaming RG10

Hello,

I am trying to stream from an IMX296 sensor. I am able to capture raw frames using
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1440,height=1080,pixelformat=RG10 --set-ctrl=sensor_mode=0 --stream-mmap --stream-count=1 --set-ctrl bypass_mode=0 --stream-to=test.raw

After looking around, it seems like gstreamer does not support the RG10 pixel format? I see a patch to support RAW10 on Jetson TX1 and TX2 here: Compile GStreamer on Jetson TX1 and TX2 | RidgeRun

Does this patch work for the AGX? I’ve tried the patch, but I still have an issue streaming:

nluong@nluong-desktop:~/Documents$ gst-launch-1.0 -v v4l2src device=/dev/video0 ! ‘video/x-bayer, width=(int)1440, height=(int)1080, format=(string)rggb, framerate=(fraction)30/1’ ! fakesink silent=false
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)2b7f5679e9f0cee0776e7c9d96ffc3b4682b26f7b8931798b4254fc99bdbde9b, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1;) 0x5599b04900
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)
Execution ended after 0:00:00.000271756
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …
nluong@nluong-desktop:~/Documents$

Are there any good solutions for live streaming from an image sensor that only supports 10bits?

Thanks,
Nicholas

You can run the nvgstcapture-1.0 or nvarguscamerasrc for Bayer sensor. I think v4l2src may have problem for Bayer sensor.

Hi,

I tried nvarguscamerasrc and I don’t get a live stream. It look like it might be capturing (current draw on my sensor board goes up) but, not displaying the output. See below t says: starting captures for 0 seconds. Am I missing something in the command?
Note I get similar messages when running nvgstcapture-1.0.

nluong@nluong-desktop:~$ gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1440 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 251.188705; Exposure Range min 15000, max 16650000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 1440 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:07.072176778
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
^C
nluong@nluong-desktop:~$

Additionally I noticed after running this command for the first time, nothing works after that. I think the command is not properly terminating? If I try to capture with v4l2-ctl in this state, it says the device is busy. Is ctl+c the right way to end a gst-launch-1.0?

Thanks,
Nicholas

Looks like nvarguscamerasrc can’t capture successfully it could be the sensor driver set the different gain/exposure/framerate…, could you modify those control function as dummy function to confirm it.

Hi,

I modified the sensor driver to have dummy gain/exposure/framerate functions and it looks like I have the same result:

nluong@nluong-desktop:~/Documents$ gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1440 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 251.188705; Exposure Range min 15000, max 16650000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 1440 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:07.264666761
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
^C
nluong@nluong-desktop:~/Documents$

Also, any idea why it says the device is busy after running and ending this command?

Thanks,
Nicholas

It could be the device was locked due to capture failed. You can run sudo service nvargus-daemon restart to release it for the device busy problem.

Are you able to run below command for few minutes?

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1440,height=1080,pixelformat=RG10 --set-ctrl=sensor_mode=0 --stream-mmap --set-ctrl bypass_mode=0

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