VTubeStudio icon indicating copy to clipboard operation
VTubeStudio copied to clipboard

cant access virtual camera

Open RodnoiD1m0n opened this issue 1 year ago • 1 comments

im trying to access Vtube Studio's virtual camera(for personal use) using cv2.VideoCapture(1) but i get:

[ERROR:[email protected]] global obsensor_uvc_stream_channel.cpp:156 cv::obsensor::getStreamChannelGroup Camera index out of range

i tried with different cameras(my own builtin(index 0) and obs's virtual(index 2)) they work just fine, but this one returns error. i read Vtube Studio's licence agreement in case it was forbidden by Vtube Studio or something and found nothing related to it. also i can access it from obs.

im on windows 10, python3.10.11, cv2 version 4.8.0(got via print(cv2.__version__))

RodnoiD1m0n avatar Jun 26 '23 17:06 RodnoiD1m0n

I think one possible reason could be due to color space/format used by Vtube Studio's virtual camera. from what I know cv2 can't capture NV12 format. I can't say for sure since i don't know what color space/format uses Vtube Studio in it's virtual camera

RodnoiD1m0n avatar Jul 10 '23 14:07 RodnoiD1m0n