macOS 11: test captures in CI are darker than in 10.15
As far as I see, the only relevant change was GitHub Action's upgrade to macOS 11.
Old:
- Test captures from CI: test_captures.zip
- Actions: https://github.com/letmaik/pyvirtualcam/actions/runs/1538778242
- Commit: ee8f89ace6b100f55f58ead2ff5f37906aa80502
- Note: The commit just after that unfortunately introduced an issue in storing of the test capture artifacts, which only was fixed in the current commit (see below). No relevant changes happened within the "blackout" though in the code.
- OS: macOS 10.15.7
Current:
- Test captures from CI: test_captures.zip
- Actions: https://github.com/letmaik/pyvirtualcam/actions/runs/1884252051
- Commit: c8b67f642c13fd400f0b7f2255c6126326e500de
- OS: macOS 11.6.3
In both old and current, the OBS version used in CI was the same: 26.1.2.
Log excerpt showing the diff for current:
FAILED ../test/test_capture.py::test_capture[diff-RGB-obs] - assert 24.0 <= 2
FAILED ../test/test_capture.py::test_capture[diff-BGR-obs] - assert 24.0 <= 2
FAILED ../test/test_capture.py::test_capture[diff-I420-obs] - assert 33.0 <= 2
FAILED ../test/test_capture.py::test_capture[diff-NV12-obs] - assert 33.0 <= 2
FAILED ../test/test_capture.py::test_capture[diff-YUYV-obs] - assert 33.0 <= 2
FAILED ../test/test_capture.py::test_capture[diff-UYVY-obs] - assert 33.0 <= 2
Comparison
This is for UYVY which is the native pixel format of this camera, so theoretically it should be closest to the reference.
Reference

Old

Current

I'm not sure where the issue is coming from. It would be good to get independent user verification from someone running macOS 11.
I should note that the test capture mechanism used here relies on OpenCV's VideoCapture, but the OpenCV Python package version is pinned to 4.5.1.48 (see dev-requirements.txt for why), both in old and current.
Things to try:
-
Bumping the OBS version in CI to the latest is worth a try, maybe some fixes were needed for macOS 11, though it's unlikely. EDIT: Tried that but didn't help: https://github.com/letmaik/pyvirtualcam/runs/5300762692
-
Run the CI workflow to use macOS 10.15 which is still available. Currently it uses macos-latest which switched to macos 11 recently. EDIT: This avoids the issue! https://github.com/letmaik/pyvirtualcam/actions/runs/1886403645
- Possibly related: https://www.reddit.com/r/MacOS/comments/qnmd4m/very_dark_image_from_webcam_in_mac_os_monterey/
Status: To keep CI green, I switched back to 10.15 in the meantime.
Call for help: If someone has macOS 11, try the following experiment and report back:
- Output a fixed test image on the virtual camera in OBS (the app, not using Python).
- Start some video app like Zoom and take a screenshot of the virtual cam image.
- Check if they are identical or not.
- If the screenshot is darker, then the issue can be reported to OBS and is not related to pyvirtualcam.