calebolson123 / BabySleepCoach

DIY Baby Sleep Tracking
https://calebolson.com
Other
201 stars 35 forks source link

Connection to camera not taking into account port and path #1

Closed nelsondelmonte closed 1 year ago

nelsondelmonte commented 1 year ago

I could be mistaken but shouldn't line 552 in main.py be:

c = cv2.VideoCapture(connect_str2)

(changed from: c = cv2.VideoCapture(connect_str))

I'm not much of a coder but I can fumble my way through and making that change allowed the code to run for me, it would error out prior to the change.

calebolson123 commented 1 year ago

Hm, yeah try both out & see how it behaves. The connection_str likely will be dependent on your camera. I just went with what worked on my reolink cam. What kind of camera are you using (exact brand & model ideally)?

nelsondelmonte commented 1 year ago

I'm using a WyzeCam3 with a custom firmware to enable RTSP (wz_mini_hacks).

The RTSP URL is formed as follows:

rtsp://user:pass@192.168.x.x:8554/unicast

calebolson123 commented 1 year ago

@nelsondelmonte I think you got this working? Will close this if so

nelsondelmonte commented 1 year ago

Yep, all good