Nvgstcapture Not showing preview

Hi All.

It’s my first time posting on the forum so please let me know if I miss something…
I am trying to run the nvgstcapture-1.0 command on the Jetson nano, last night it was working fine and showed a preview and everything, but when i was trying to run the command again today it didn’t show any preview whatsoever. I did try the following:

  • Restarting/ shutting down and started it up again.
    -Unplugging and plugging back in the IMX219-160 camera.
    -Rotating the strip just in case I inserted wrong.

None of this works and I get the following when I run the command:

nvgstcapture-1.0
Encoder null, cannot set bitrate!
Encoder Profile = High
Supported resolutions in case of ARGUS Camera
(2) : 640x480
(3) : 1280x720
(4) : 1920x1080
(5) : 2104x1560
(6) : 2592x1944
(7) : 2616x1472
(8) : 3840x2160
(9) : 3896x2192
(10): 4208x3120
(11): 5632x3168
(12): 5632x4224

Runtime ARGUS Camera Commands:

Help : ‘h’
Quit : ‘q’
Set Capture Mode:
mo:
(1): image
(2): video
Get Capture Mode:
gmo
Set sensor orientation:
so:
(0): none
(1): Rotate counter-clockwise 90 degrees
(2): Rotate 180 degrees
(3): Rotate clockwise 90 degrees
Get sensor orientation:
gso
Set sensor mode:
smo: e.g., smo:1
Get sensor mode:
gsmo
Set Whitebalance Mode:
wb:
(0): off
(1): auto
(2): incandescent
(3): fluorescent
(4): warm-fluorescent
(5): daylight
(6): cloudy-daylight
(7): twilight
(8): shade
(9): manual
Get Whitebalance Mode:
gwb
Set Saturation (0 to 2):
st: e.g., st:1.25
Get Saturation:
gst
Set Exposure Compensation (-2 to 2):
ec: e.g., ec:-2
Get Exposure Compensation:
gec
Set Auto Whitebalance Lock:
awbl: e.g., awbl:0
Get Auto Whitebalance Lock:
awbl
Set Auto Exposure Lock:
ael: e.g., ael:0
Get Auto Exposure Lock:
gael
Set TNR Mode:
tnrm: e.g., tnrm:1
(0): OFF
(1): FAST
(2): HIGH QUALITY
Get TNR Mode:
gtnrm
Set TNR Strength (-1 to 1):
tnrs: e.g., tnrs:0.5
Get TNR Strength:
gtnrs
Set EE Mode:
eem: e.g., eem:1
(0): OFF
(1): FAST
(2): HIGH QUALITY
Get EE Mode:
geem
Set EE Strength (-1 to 1):
ees: e.g., ees:0.5
Get EE Strength:
gees
Set Auto Exposure Anti-Banding (0 to 3):
aeab: e.g., aeab:2
(0): OFF
(1): MODE AUTO
(2): MODE 50HZ
(3): MODE 60HZ
Get Auto Exposure Anti-Banding:
gaeab
Set Gain Range:
gr: e.g., gr:1 16
Get Gain Range:
ggr
Set Exposure Time Range:
etr: e.g., etr:34000 35000
Get Exposure Time Range:
getr
Set ISP Digital Gain Range:
dgr: e.g., dgr:2 152
Get ISP Digital Gain Range:
gdgr
Capture: enter ‘j’ OR
followed by a timer (e.g., jx5000, capture after 5 seconds) OR
followed by multishot count (e.g., j:6, capture 6 images)
timer/multihot values are optional, capture defaults to single shot with timer=0s
Start Recording : enter ‘1’
Stop Recording : enter ‘0’
Video snapshot : enter ‘2’ (While recording video)
Get Preview Resolution:
gpcr
Get Image Capture Resolution:
gicr
Get Video Capture Resolution:
gvcr

Runtime encoder configuration options:

Set Encoding Bit-rate(in bytes):
br: e.g., br:4000000
Get Encoding Bit-rate(in bytes):
gbr
Set Encoding Profile(only for H.264):
ep: e.g., ep:1
(0): Baseline
(1): Main
(2): High
Get Encoding Profile(only for H.264):
gep
Force IDR Frame on video Encoder(only for H.264):
Enter ‘f’

bitrate = 4000000
Encoder Profile = High
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0
Opening in BLOCKING MODE
Opening in BLOCKING MODE
** Message: 12:31:13.881: main:4670 iterating capture loop …
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
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;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; 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 = 5
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
^Anvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD… Exiting…
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
debug info:
Argus Error Status

(nvgstcapture-1.0:10186): GStreamer-CRITICAL **: 12:31:17.877: gst_mini_object_set_qdata: assertion ‘object != NULL’ failed
GST_ARGUS: Cleaning up
(Argus) Error EndOfFile: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 266)
(Argus) Error EndOfFile: Receive worker failure, notifying 1 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 340)
(Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)
(Argus) Error EndOfFile: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 368)
(Argus) Error EndOfFile: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error EndOfFile: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)
** Message: 12:31:20.844: main:4680 Capture completed
** Message: 12:31:20.845: main:4729 Camera application will now exit
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)

I am new to Jetson so if more information is required please let me know as well.

Thanks
Marcell

Have check with dmesg | grep -i imx219 and have below command to confirm the camera working well

v4l2-ctl --stream-mmap --set-ctrl bypass_mode=0

Hi Shane

Thanks for the response. I tried to run the command (dmesg | grep -i imx219), but nothing seems to happen. I did ran the following and it did pick up the camera :
v4l2-ctl --list-devices
vi-output, imx219 6-0010 (platform:54080000.vi:0):
/dev/video0

I did also test the cable to make sure it’s fine and it is working.
Anything else I can try?

Check with below doc to verify the HW and sensor driver.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/camera_sensor_prog.html#wwpID0E0LF0HA

Hi Shane

Thanks for the reply.
I did run the test to see if the tests pass and I found that there is one failing test:

fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals

I was also able to run the dmesg | grep -i imx219 command now and it returned the following:

[ 1.445139] vi 54080000.vi: subdev imx219 6-0010 bound

I did also try to format the sd card and also tried updating the Ubuntu system, but that didn’t work as well.

I tried something else as well I tried running the Cheese application to see if it might detect my camera, but it also says my device is not found.

Any other ideas?
Thanks in advance.

What’s v4l2-ctl --list-devices shows

Hi
It shows:
vi-output, imx219 6-0010 (platform:54080000.vi:0):
/dev/video0

Regards
Marcell

Looks like the driver been loaded successfully.
Did you check if any kernel message after run the v4l2-ctl to capture data from sensor?

Try enable the csi log by

sudo su
echo file csi2_fops.c +p > /sys/kernel/debug/dynamic_debug/control

How would I be able to check if there was any kernel messages?
I did run sudo su
Then I also ran the echo part.
image

When I also try to run v4l2-ctl --stream-mmap --set-ctrl bypass_mode=0
Nothing seems to happen:
image

I also did rerun the dmsg command again and saw more information, thought it could be useful?
image

don’t grep imx219 to filter the csi error message.

Just want to make sure that this is this what you mean? When I run dmesg without the filter I seem to get the following:

image

Looks like this module can’t capture successfully. It’s could be HW problem. Do you have any other module for testing?

Hi Shane

I was able to get my hands on a Usb camera and if I were to run nvgstcapture --camerasrc=0 it shows the preview and I can capture images etc.
So I also tried to run it with the imx219 camera by running nvgstcapture --camerasrc=0 and after running that I then get:


It seems like the preview popped up, but then it closes instantly.

I would suggest to consult with the vendor for your imx219.

Okay I will do so and then give some feedback on here as soon as I find recieve some information. Thanks

Hi All

Just wanted to give some feedback. After talking with the camera supplier it was shown that the camera wasn’t working and I have to send it back to Amazon for a refund.
For the camera you can run the test command to see if it passes. In my case I tested it using:
gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1’ ! nvoverlaysink -e" and then I get the following:

image.png

And after sending this to the camera supplier they said “According to our engineer’s judgement, there may something wrong with the product.”

Hope this will help someone as well in the future.

Thanks for your assistance