I’m looking to stream usb cam on multiple v4l2loopback devices so that i can do AI on individual streams. I’m streaming with ffmpeg from the source to loopback devices. I use CV2 to capture from loopback devices.
cap = cv2.VideoCapture(“/dev/video0”) seems to go fine but cap.read() fails with :
cv2.error: OpenCV(4.1.1) /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap.cpp:235: error: (-2:Unspecified error) in function ‘grab’
Can somebody help with this, why am i not able to read from v4l2 loopback device with cv2 ?