How to use VideoCapture Camera with elgato camera hub

86 Views Asked by At

I am trying to use the VideoCapture function from the opencv library. Due to the lack of webcam of my laptop, I've download CameraHub to access my phone's camera as the main webcam for the system.

However, when executing, this is what the program returns: VideoCapture program

I've tried changing the index in the VideoCapture function, reconnecting Elegato EpocCam on my phone and CameraHub on my computer but nothing prevailed.

This is my code:


import cv2
  
vid = cv2.VideoCapture(0) 
  
while(True):       
    ret, frame = vid.read() 
    cv2.imshow('frame', frame) 
    if cv2.waitKey(1) & 0xFF == ord('q'): 
        break
  
vid.release() 
cv2.destroyAllWindows() 

0

There are 0 best solutions below