macOS 10.14+ Media Capture Authorization
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- macos, python
- Lĩnh vực
- build-system, desktop
Hướng nghiên cứu
Bắt đầu với modules/videoio/src/cap_avfoundation_mac.mm của OpenCV tại điều kiện cấp quyền được liên kết, sau đó kiểm tra cấu hình build wheel và các thiết lập trình biên dịch macOS. Tái hiện hành vi của ứng dụng đã đóng gói trên macOS 10.15.3 với opencv-python 4.1.2.30. Công việc được xem là hoàn tất khi một bản build wheel được hỗ trợ yêu cầu cấp quyền camera đúng cách mà không làm hồi quy hành vi Qt đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Actual Behaviour
I'm currently trying to package a (windowed) Kivy app with PyInstaller and have spent a decent amount of time trying to track down this bug. I believe the issue I'm running into is not with any of those libraries or with OpenCV. I'm pretty sure the issue is with how your wheels are generated.
When using opencv-python in the Terminal, the Terminal requests camera permissions and everything seems ok. However when running a packaged version of the same app it crashes.
For MacOS 10.14 and above OpenCV should request camera permissions. I've been through Apple's documentation and nothing there has helped.
Running a packaged app (using opencv-python version 4.1.2.30 from PyPi) in Xcode Instruments I'm getting this error:
OpenCV: Cannot use FaceTime HD Camera (Built-in)
OpenCV: camera failed to properly initialize!
Expected Behaviour
When camera access is not authorized the following should be printed:
OpenCV: not authorized to capture video (status 0), requesting...
OpenCV: camera failed to properly initialize!
If camera access has been rejected:
OpenCV: camera access has been denied. Either run 'tccutil reset Camera' command in same terminal to reset application authorization status, either modify 'System Preferences -> Security & Privacy -> Camera' settings for your application.
OpenCV: camera failed to properly initialize!
The Issue
OpenCV uses compiler flags to determine whether or not media capture needs to be authorized (see here). When the opencv-python wheels are built, it seems like xcode9.4 is the only version used. I'm guessing xcode10.2 or newer would satisfy #if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 but I'm not totally sure.
Using your repo I built a wheel locally, and verified that I am getting the behavior I expect. However the version I built is having some issues with Qt. Would it be possible to have a 10.14+ wheel in addition to the 10.9 one to ensure this code is run on the correct machines? I understand this is a bit of an edge case but I think it would be an improvement if its not a lot of work for you.
I can provide more info or a more concrete example if needed.
Steps to reproduce
- For sample code I've been using code from here
- macOS 10.15.3
- architecture x86_64
- opencv-python version 4.1.2.30
- Ngôn ngữ chính
- Python
- Star
- 5.4k
- Fork
- 1k
- Merge trung bình
- 22 giờ 17 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của opencv/opencv-python
-
[DOC] README file Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
opencv/opencv-python#1217 · 3 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
opencv/opencv-python#1165 · 2 bình luận · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
opencv/opencv-python#1273 · 1 bình luận ·
-
FFMPEG v8.1.1 vulnerabilities Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
opencv/opencv-python#1272 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
opencv/opencv-python#1268 · 1 bình luận ·
Tất cả issue của opencv/opencv-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/skills#1811 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
speaches-ai/speaches#678 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
datalayer/mcp-compose#42 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conda-forge/spacy-feedstock#177 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
UKGovernmentBEIS/inspect_evals#2523 ·