I have an ORIN AGX 64GB development module. I’ve literally just flashed it to factory defaults using the sdkmanager. I have a USB camera plugged into it. As a simple test I’m trying to view the USB camera’s live video. I’m attempting what I believe is the most ordinary, simplest command to use gstreamer to view the USB camera.
The following command fails though (output of the command included below the command):
svs@ubuntu:~$ gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! nvvidconv ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.000165025
Setting pipeline to NULL ...
Freeing pipeline ...
The following even simpler command fails in a similar fashion:
nvgstcapture-1.0 --camsrc=0 --cap-dev-node=0
Encoder null, cannot set bitrate!
Encoder Profile = High
Runtime USB Camera Commands:
Help : 'h'
Quit : 'q'
Set Capture Mode:
mo:<val>
(1): image
(2): video
Get Capture Mode:
gmo
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'
Set Preview Resolution:
pcr:<val> e.g., pcr:2
(0) : 176x144
(1) : 320x240
(2) : 640x480
(3) : 1280x720
(4) : 1920x1080
NOTE: Preview/Encode resolution will be same as Capture resolution for USB-Camera
Get Preview Resolution:
gpcr
Get Image Capture Resolution:
gicr
Get Video Capture Resolution:
gvcr
Set Capture Device Node:
cdn:<val> e.g., cdn:0
(0): /dev/video0
(1): /dev/video1
(2): /dev/video2
Get Capture Device Node:
gcdn
Runtime encoder configuration options:
Set Encoding Bit-rate(in bytes):
br:<val> e.g., br:4000000
Get Encoding Bit-rate(in bytes):
gbr
Set Encoding Profile(only for H.264):
ep:<val> 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'
** Message: 17:52:07.112: <main:4734> iterating capture loop ....
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstV4l2Src:v4l2src0: Internal data stream error.
debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
** Message: 17:52:07.162: <main:4744> Capture completed
** Message: 17:52:07.163: <main:4795> Camera application will now exit
Both commands seem to fail with "reason: not-negotiated(-4).
FYI, here is the output from the v4l2-ctl --list-formats-ext -d /dev/video0
command:
svs@ubuntu:~$ v4l2-ctl --list-formats-ext -d /dev/video0
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'MJPG' (Motion-JPEG, compressed)
Size: Discrete 2320x1744
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 4656x3496
Interval: Discrete 0.100s (10.000 fps)
Size: Discrete 4208x3120
Interval: Discrete 0.100s (10.000 fps)
Size: Discrete 4160x3120
Interval: Discrete 0.100s (10.000 fps)
Size: Discrete 4000x3000
Interval: Discrete 0.100s (10.000 fps)
Size: Discrete 3264x2448
Interval: Discrete 0.100s (10.000 fps)
Size: Discrete 2592x1944
Interval: Discrete 0.100s (10.000 fps)
Size: Discrete 2048x1536
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1600x1200
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1280x960
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1024x768
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 800x600
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 2320x1744
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
[1]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 2320x1744
Interval: Discrete 1.000s (1.000 fps)
Interval: Discrete 1.000s (1.000 fps)
Size: Discrete 4656x3496
Interval: Discrete 1.000s (1.000 fps)
Size: Discrete 3840x2160
Interval: Discrete 1.000s (1.000 fps)
Size: Discrete 3264x2448
Interval: Discrete 1.000s (1.000 fps)
Size: Discrete 2592x1944
Interval: Discrete 1.000s (1.000 fps)
Size: Discrete 2048x1536
Interval: Discrete 1.000s (1.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1600x1200
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1280x960
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 1024x768
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 800x600
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Size: Discrete 2320x1744
Interval: Discrete 1.000s (1.000 fps)
Interval: Discrete 1.000s (1.000 fps)
Shouldn’t those two commands to view the USB camera work??? What am I doing wrong? Can anybody offer some advice?