Hi Craig,
Thanks for replying back, I tried on two systems two different issues
Ricoh Theta Z1 (51GB)
Laptop - Ubuntu 18.04 with build-in camera
-
Followed instructions to install all the required lib
-
when I run ./gst_viewer it works
-
when i run ./gst_loopback
./gst_loopback
start, hit any key to stop
Error: Device ‘/dev/video1’ is not an output device.
stop
-
ls -ls /dev/vid*
0 crw-rw----+ 1 root video 81, 0 Jun 7 11:42 /dev/video0
0 crw-rw----+ 1 root video 81, 1 Jun 7 11:42 /dev/video1
Note : This does not identify Ricoh
Step 1: verify usb device ID
Bus 002 Device 020: ID 05ca:2715 Ricoh Co., Ltd
Step 2: verify kernel module
Module Size Used by
v4l2loopback 45056 0
Step 3: verify device
ls /dev/vide*
/dev/video0 /dev/video1 /dev/video2
added video2
v4l2-ctl --list-formats-ext --device /dev/video2
ioctl: VIDIOC_ENUM_FMT
now when I run VLC it only shows the first frame and does not show the video
import cv2
cap = cv2.VideoCapture(2)
Check if the webcam is opened correctly
if not cap.isOpened():
raise IOError(“Cannot open webcam”)
while True:
ret, frame = cap.read()
frame = cv2.resize(frame, None, fx=0.5, fy=0.5, interpolation=cv2.INTER_AREA)
cv2.imshow(‘Input’, frame)
c = cv2.waitKey(1)
if c == 27:
break
cap.release()
cv2.destroyAllWindows()
When I use open cv simple code ( just to capture at index2 ) I get below error
python3 simple.py
[ WARN:0] global /tmp/pip-req-build-1syr35c1/opencv/modules/videoio/src/cap_v4l.cpp (1004) tryIoctl VIDEOIO(V4L2:/dev/video2): select() timeout.
Traceback (most recent call last):
File “simple.py”, line 11, in
frame = cv2.resize(frame, None, fx=0.5, fy=0.5, interpolation=cv2.INTER_AREA)
cv2.error: OpenCV(4.5.1) /tmp/pip-req-build-1syr35c1/opencv/modules/imgproc/src/resize.cpp:4051: error: (-215:Assertion failed) !ssize.empty() in function ‘resize’
Second System
System 2 jet set nano
Ubuntu 18.04 LTS
Getting below error
./gst_loopback
start, hit any key to stop
Error: Cannot identify device ‘/dev/vidoe0’.
stop
Step 1: verify usb device ID
Bus 002 Device 004: ID 05ca:2715 Ricoh Co., Ltd
Step 2: verify kernel module
Module Size Used by
v4l2loopback 42767 0
Step 3: verify device
king@king-desktop:~/dev/ricoh/libuvc-theta-sample/gst$ v4l2-ctl --list-formats-ext --device /dev/video0
ioctl: VIDIOC_ENUM_FMT
./gst_loopback
start, hit any key to stop
Error: Cannot identify device ‘/dev/vidoe0’.
stop
Please let me know if you need any more information. I needed to achieve
- Live feed this into my angular application using flask or anything else
- Take this live feed and run models.
Bharat