svpino / alloy-voice-assistant

188 stars 95 forks source link

Video is black on Mac - solved #2

Open chrisn-au opened 4 weeks ago

chrisn-au commented 4 weeks ago

Machine Apple M2 Max OS Sonoma Version 14.5

Amazing work - I was very pleasantly surprised when I got it working. I did struggle a little with the fact that when I started the app the video was black. A bit of googling later found the problem to be

def __init__(self):
        self.stream = VideoCapture(index=1)
        _, self.frame = self.stream.read()
        self.running = False
        self.lock = Lock()

When I changed the index from 0 to 1 it just worked. Do you want a PR on the README or are you happy to do it.

My test today was to get it to help me make a cup of tea. the future is not far away - amazing

svpino commented 4 weeks ago

Hey Chris,

Let's add a note to the README file about this. We don't want to hard code the source to 1 because that will be different for every person.

In my case, I used 0 because that was the first webcam connected to my computer. I suspect this will be the case for most people.

chrisn-au commented 4 weeks ago

Absolutely agreed - awesome stuff

johnrtipton commented 3 weeks ago

Amazing project, mine was black at first because it was defaulting to my phone camera, which is actually pretty cool.

fsverse commented 3 weeks ago

Just wanted to add. I use Droidcam on my phone as a webcam. I also had OBS setup as a webcam. I needed to change the index to 1 also. For anyone reading this. When I opened Skype, Droidcam was the second webcam listed so I figured it would be index=1. Thanks so much for making this a public GIT. Super helpful !