Problem using gstreamer for my picamera v2 (imx219)

I have been using a imx219 to record a video using gstreamer, suddenly one day, it started showing an unknown error and I cannot use the camera with gstreamer anymore. I haven’t been able to find if it was an update or something thatt caused the issue, please help.

The following is the gstreamer pipeline I have neen using:
gst-launch-1.0 -e nvarguscamerasrc timeout=$IMAGING_TIME !
‘video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1, format=NV12’ !
nvvidconv flip-method=3 ! ‘video/x-raw, format=I420’ !
videorate ! ‘video/x-raw, framerate=30/1’ !
queue max-size-buffers=1000 max-size-bytes=0 max-size-time=0 !
x264enc bitrate=5000 speed-preset=faster tune=zerolatency !
queue max-size-buffers=1000 max-size-bytes=0 max-size-time=0 !
h264parse ! mp4mux !
filesink location=“${picamera_output_file}” sync=true

The following is the otuput I get:

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Redistribute latency…
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 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: 3280 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;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 2
Output Stream W = 1920 H = 1080
seconds to Run = 20
Frame Rate = 29.999999
GST_ARGUS: Setup Complete, Starting captures for 20 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:702 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
Additional debug info:
Argus Error Status
EOS on shutdown enabled – waiting for EOS after Error
Waiting for EOS…
GST_ARGUS: Cleaning up
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)

and here is the output for dmesg | grep imx219:
[ 12.686306] imx219 9-0010: tegracam sensor driver:imx219_v2.0.6
[ 12.701026] imx219 9-0010: imx219_board_setup: error during i2c read probe (-121)
[ 12.720655] imx219 9-0010: board setup failed
[ 12.725371] imx219: probe of 9-0010 failed with error -121
[ 12.738204] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
[ 12.756559] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx219 10-0010 bound

my system is a jetson-orin-nano-devkit 4gb

Hello @Snooperttt,

That seems very interesting.

Have you gone back to running a super simple pipe just to test?

For instance, what happens if you run:

gst-launch-1.0 nvarguscamerasrc ! fakesink

Do you still get the same error ?

regards,
Andrew

hello Snooperttt,

is it hardware damage?
according to the logs, nvbuf_utils: dmabuf_fd -1 mapped entry NOT found it usually caused by sensor side did not output streaming.

Hello.

Also notice that you have the messqge [ 12.701026] imx219 9-0010: imx219_board_setup: error during i2c read probe (-121)

This message is produced because the driver can’t read the camera model ID register, there are many causes, For example the camera clock is off, the camera power is off, or there is something wrong in the I2C connection.

The driver seems working correctly, but there is a I2C communication problem.

Since there is no I2C communication the camera is not configured and it is not going to stream video (nvbuf_utils: dmabuf_fd -1 mapped entry NOT found)

Regards,

Manuel Leiva
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com

Hello @ManuelLeiva,

That is a great observation.

However, we believe that might be because @Snooperttt is probably connecting only one camera, and it is being connected into the CSI port that corresponds to i2c bus 10. Given that the output of the driver resembles that on that bus, the camera is being bounded correctly:

[ 12.738204] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
[ 12.756559] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx219 10-0010 bound

While on bus 9, the i2c communication fails as you mentioned.

[ 12.686306] imx219 9-0010: tegracam sensor driver:imx219_v2.0.6
[ 12.701026] imx219 9-0010: imx219_board_setup: error during i2c read probe (-121)
[ 12.720655] imx219 9-0010: board setup failed
[ 12.725371] imx219: probe of 9-0010 failed with error -121

regards,
Andrew

Hello @proventusnova,
thank you for the prompt response and sorry for not replying sooner.
I tried the simple pipeline you mentioned, it seems to not work either, here is the output:

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:770 Failed to create CaptureSession
Got EOS from element “pipeline0”.
Execution ended after 0:00:00.009365045
Setting pipeline to NULL …
Freeing pipeline …

Regards,
Snooperttt

Hello @JerryChang,
thank you for your response, visually everything seems undamaged, also I find it strange that some pins were suddenly damaged without manipulating the setup much, perhaps should I try to measure the signal voltages of each pin to see if there are any anomalies?

Regards,
Snooperttt

Hello @Snooperttt,

Thanks for reaching back.

That is very weird.

Are you able to capture using v4l2-ctl ?

regards,
Andrew

hello Snooperttt,

let’s check Applications Using V4L2 IOCTL Directly.
please execute… $ v4l2-ctl -d /dev/video0 --list-formats-ext to examine sensor supported formats.
you may running with v4l2 pipeline to fetch frames for testing basic functionality.
for instance,
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

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