Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get cameras working on mac (fastapi branch) #54

Open
wants to merge 4 commits into
base: jon/fastapi
Choose a base branch
from

Conversation

philipqueen
Copy link
Contributor

This PR adds mac support for cameras by assuming that once any virtual cameras are removed from the QCameraDevice list, the device list lines up with the cv2 ports. That is, it assumes any virtual camera is always shown last in the cv2 ports.

Also adds some error handling in the parsing code for non mac/windows code.

@philipqueen
Copy link
Contributor Author

philipqueen commented Mar 16, 2024

Got some weird behavior when actually recording with this. It say's the webcams I used were running at 5 fps, and that it would default to slowest framerate. However, display clearly showed it was recording at faster than 5 fps. Then when checking the output videos, the two webcams recorded at 5 fps and my internal camera at 30.

I'm getting fps info from ffprobe, and it matches the video playback speed. Timestamp info looks normal though:

    'timestamp_stats_by_camera_id': {   0: {   'mean_frame_duration_s': 0.03938690085542169,
                                               'mean_frames_per_second': 25.38915167940531,
                                               'std_dev_frame_duration_s': 0.02373020642672382},
                                        1: {   'mean_frame_duration_s': 0.03932604844578313,
                                               'mean_frames_per_second': 25.428438389345178,
                                               'std_dev_frame_duration_s': 0.02341737166964161},
                                        2: {   'mean_frame_duration_s': 0.03935551957831326,
                                               'mean_frames_per_second': 25.409396463693167,
                                               'std_dev_frame_duration_s': 0.02102969659997065}},

And here's the error message I'm getting:

[2024-03-16T16:31:35.735441] [Δt:0.020952s] [ WARNING] [skellycam.backend.core_functionality.camera_group.incoming_frame_wrangler] [incoming_frame_wrangler:prescribed_framerate():57] [PID:96597:Process-1 TID:6404059136:Thread-1 ] Frame rates are not all the same: [5.0, 5.0, 30.0] - Defaulting to the slowest frame rate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant