Davidy22 / SkunkBooth

Text based command line webcam photobooth app
https://Davidy22.github.io/SkunkBooth/
Other
50 stars 12 forks source link

[BUG] Can't open camera by index #85

Open brilam opened 2 years ago

brilam commented 2 years ago

Describe the bug I've tried following the instructions for installing. Here is what I did:

image

After doing this, I run SkunkBooth and I get this:

image

It seems like the issue is stemming from OpenCV. I've tried adjusting the camera index, but that doesn't seem to do the trick. I am using an external USB webcam.

I've also tried installing the dependencies using pip and running SkunkBooth. The same thing occurs.

Steps To Reproduce Steps to reproduce the behavior:

  1. Follow the instructions listed in Contributing.

Expected behavior SkunkBooth should be running.

Screenshots See above.

Desktop (please complete the following information):

Additional context N/A

Davidy22 commented 2 years ago

At the core, I believe this is a duplicate of #84, to do with how we just grab the camera at id 0 and don't do detection yet. Once that gets dealt with this should be cleared up as well

brilam commented 2 years ago

I have my suspicions that this is the case as well. I will look into it and if I can resolve it, I will send in a PR. Thanks.

brilam commented 2 years ago

At the core, I believe this is a duplicate of #84, to do with how we just grab the camera at id 0 and don't do detection yet. Once that gets dealt with this should be cleared up as well

Update: I discovered something interesting here. In my screenshot above, I used WSL for running this, and got the error above. However, running this in cmd seems to be working fine. Looking into this deeper, I've discovered something about WSL. Looking at Can I access the GPU in WSL 2? Are there plans to increase hardware support?, it seems that WSL doesn't have USB device support.

Davidy22 commented 2 years ago

Hrm, well we're probably not going to be able to jury rig USB support via WSL from python, this is probably a wait for upstream issue. For now we can put a warning somewhere in docs that this is an issue I guess.

Trisanu-007 commented 2 years ago

actually yeah WSL is the one place we didn't test. But wasn't it displayed during the livestream using WSL?

Davidy22 commented 2 years ago

The issue is specifically the interaction between WSL and USB devices, integrated cameras are fine.