macOS 10.14+ Media Capture Authorization
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- macos, python
- Área
- build-system, desktop
Línea de trabajo
Comienza con modules/videoio/src/cap_avfoundation_mac.mm de OpenCV en la condición de autorización enlazada y, a continuación, inspecciona la configuración de compilación del wheel y los ajustes del compilador de macOS. Reproduce el comportamiento de la aplicación empaquetada en macOS 10.15.3 con opencv-python 4.1.2.30. Se considera terminado cuando una compilación de wheel compatible solicita correctamente la autorización de la cámara sin introducir regresiones en el comportamiento de Qt informado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 5.4k
- Forks
- 1k
- Merge medio
- 22 h 17 min
- PR fusionados (30 d)
- 3
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de opencv/opencv-python
-
[DOC] README file Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
opencv/opencv-python#1217 · 3 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
opencv/opencv-python#1165 · 2 comentarios · 1 reacción ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
opencv/opencv-python#1273 · 1 comentario ·
-
FFMPEG v8.1.1 vulnerabilities Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
opencv/opencv-python#1272 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
opencv/opencv-python#1268 · 1 comentario ·
Todos los issues de opencv/opencv-python
Issues similares
-
essnmx good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
-
[Feature] 奇物选择添加优先级 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
syfoud/Simulated_Scepter#174 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Giskard-AI/giskard-oss#2840 · 1 comentario ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Abiertoarea: repo bug perceived difficulty: 2
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
yeti-platform/yeti#1380 ·