I am trying to use USB camera and it shows following information.
I expected “Video Input : 0” but it reported “Video Input: 2” and don’t know how to handle it.
How can I handle this device?
My Code is,
cap = cv2.VideoCapture(source=0)
And the result is it just trying to open “video 0 - input 0 (HDMI)” not input 2(Camera)
My Camera test result is,
-
at connect I can see ‘video 0’
/dev/video0 -
v4-ctl --get-inputs
It shows
Video Input : 2 (Camera : Ok)
- v4l2-ctl --list-input
ioctl: VIDIOC_ENUMINPUT
Input : 0
Name : HDMI
Type : 0x00000000
Audioset : 0x00000000
Tuner : 0x00000000
Standard : 0x0000000000000000 ()
Status : 0x00000000 (ok)
Capabilities: 0x00000000 (not defined)
Input : 1
Name : SDI
Type : 0x00000000
Audioset : 0x00000000
Tuner : 0x00000000
Standard : 0x0000000000000000 ()
Status : 0x00000000 (ok)
Capabilities: 0x00000000 (not defined)
Input : 2
Name : Camera
Type : 0x00000002
Audioset : 0x00000000
Tuner : 0x00000000
Standard : 0x0000000000000000 ()
Status : 0x00000000 (ok)
Capabilities: 0x00000000 (not defined)
Input : 3
Name : Pattern
Type : 0x00000000
Audioset : 0x00000000
Tuner : 0x00000000
Standard : 0x0000000000000000 ()
Status : 0x00000000 (ok)
Capabilities: 0x00000000 (not defined)