Hi, I’m trying to open webcam using OpenCV after deploying the code in Ubuntu server. But am not able to open it and getting following error.
[ WARN:0] global /tmp/pip-req-build-rcdoave0/opencv/modules/videoio/src/cap_v4l.cpp (890) open VIDEOIO(V4L2:/dev/video1): can’t open camera by index
I tried to change parameters in cv2.VideoCapture(i) where i=[‘cv2.CAP_V4L2’,0,-1,1] but its not working.
Note: Its working fine with cv2.VideoCapture(0) in local laptop(windows 10) but its not working when deployed in server.
Please help me to resolve the issue.