Hi,
Hi this refers to
Jetson Xavier NX (Dev Kit Version)
jetpack V4.5
cheese V.3.28.0 (cheese -v)
opencv 4.1.1 (cv.–version)
gstreamer 1.14.5 (output from gst-inspect)
after a fresh install on my Xavier NX using jetpack 4.5 “cheese (V 3.28.0)” and opencv do not recognize my USB Cam.
Cheese gives an Error:
$ cheese
Opening in BLOCKING MODE
Segmentation fault (core dumped)
My usbcam is shown as a device (lsusb)
Opencv 4.1. in python/python3 also gives an error:
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp
(1757) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Device ‘/dev/video0’ is busy
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (886) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
I had no Problems with Jetpack Version 4.1 What could be done to get the usb camera working with cheese or opencv??? - please help.
the camera switches on
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
… then nothing more happens but camera light stays on
=> nirwana?
So since nothing happens I kill the process …
^Chandling interrupt.
Interrupt: Stopping pipeline …
Execution ended after 0:03:35.916485796
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …
So I tried with YUYV & video0, but I receive only a warning:
WARNING: erroneous pipeline: could not link v4l2src0 to nvvconv0, neither element can handle caps video/x-raw, format=(string)YUYV, width=(int)640, height=(int)480, framerate=(fraction)30/1
I am stuck here. The new plugin nvv4l2camerasrc , which is mentioned on your given linkleads again to an error which Ido not even understand:
“bash: syntax error near unexpected token `('” - I checked the copied call several times.
So I do not know how to continue. should I revert to Jetpack 4.4.1 to get a simple Webcam working again ??
Hi back, thanks for reply, here it is late night …, i shall continue tomorrow
your suggestion leads to an error. the cam switches on for a second than (streaming )stops,
no preview:
…marius@xavier-nx:~$
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=150 ! video/x-
raw,format=YUY2,width=640,height=480,framerate=30/1 ! nvvidconv ! ‘video/x-
raw(memory:NVMM),format=NV12’ ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=a.mp4
Setting pipeline to PAUSED …
Opening in BLOCKING MODE
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Redistribute latency…
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 66, Level = 0
Got EOS from element “pipeline0”.
Execution ended after 0:00:09.037596385
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …
…marius@xavier-nx:~$
BTW the cam is 1280x720, 22 fps, 768x480, 30 fps. Worked well with “cheese” from previous jetpack (4.4.1).
I think I need some help to construct a correct pipeline.
Hi,
Not sure why cheese app does not work. We would suggest use gstreamer or jetson_multimedia_api on Jetson platforms. The two frameworks are tested/verified in each L4T release. Should be with better stability.
while True:
_, frame = cam.read()
cv2.imshow(‘myCam’,frame)
cv2.moveWindow(‘myCam’,0,0)
if cv2.waitKey(1)==ord(‘q’):
break
cam.release()
cv2.destroyAllWindows()
took me some time to understand pipes
so thank you for your help, shall I close this issue?
Not sure if my issue is really the same but since the JetPack 4.5 upgrade I do not even have the /dev/video0 created although the device is detected (logitech USB webcam).
dmesg output
[ 1299.985912] usb 1-2.4: new high-speed USB device number 6 using tegra-xusb
[ 1300.260144] usb 1-2.4: New USB device found, idVendor=046d, idProduct=081d
[ 1300.260157] usb 1-2.4: New USB device strings: Mfr=0, Product=0, SerialNumber=1
[ 1300.260165] usb 1-2.4: SerialNumber: 49E1F0A0
[ 1300.520179] usb 1-2.4: set resolution quirk: cval->res = 384