freemocap / skellycam

The camera back-end for the `freemocap` project - or - An easy and efficient way to connect to one or more cameras and record synchronized videos💀📸
GNU Affero General Public License v3.0
19 stars 5 forks source link

[BUG] - One of the camera processes will sometimes fail to start #8

Closed jonmatthis closed 1 year ago

jonmatthis commented 1 year ago

I tracked it down to the actual cv2.VideoCapture part - something will fail with one of the cameras and the process will hang (or maybe die)?

jonmatthis commented 1 year ago

It's possible that one of the camera captures is not being properly released during the 'detect cameras' thing.

I added a line to delete the cap object, and that might have fixed this issue.

I'll need to iterate on it a bit before I know for sure

jonmatthis commented 1 year ago

It's possible that one of the camera captures is not being properly released during the 'detect cameras' thing.

I added a line to delete the cap object, and that might have fixed this issue.

I'll need to iterate on it a bit before I know for sure

Nope, still a problem lol :joy:

jonmatthis commented 1 year ago

Added functionality to check_if_cameras_started loop in CameraGroup that will restart a process if it dies during connection and it seems to work...

...still doesn't explain why its failing though

(but it's definitely happening in the part where we create the cv2.VideoCatpure() object )