Deep-Live-Cam icon indicating copy to clipboard operation
Deep-Live-Cam copied to clipboard

OpenCV: camera failed to properly initialize!

Open wangbooth opened this issue 1 year ago • 7 comments

MacBook M1 Pro macOS Sonoma 14.5

When using Live mode, errors may occur:

OpenCV: not authorized to capture video (status 0), requesting...
OpenCV: camera failed to properly initialize!

If you are using Termius or another terminal to run run.py, it is possible to encounter this issue. Please switch to using macOS’s native Terminal.app to run it.

wangbooth avatar Aug 10 '24 05:08 wangbooth

MacBook M1 Pro macOS Sonoma 14.5

When using Live mode, errors may occur:

OpenCV: not authorized to capture video (status 0), requesting...
OpenCV: camera failed to properly initialize!

If you are using Termius or another terminal to run run.py, it is possible to encounter this issue. Please switch to using macOS’s native Terminal.app to run it.

Using native Terminal.app, still have the problem.

2024-08-10 15:49:40.844 Python[5375:81665] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceType to your Info.plist.
OpenCV: out device of bound (0-2): 3
OpenCV: camera failed to properly initialize!

Screenshot 2024-08-10 at 3 49 54 PM

M1 Pro 14.6.1

RoversX avatar Aug 10 '24 05:08 RoversX

MacBook M1 Pro macOS Sonoma 14.5 When using Live mode, errors may occur:

OpenCV: not authorized to capture video (status 0), requesting...
OpenCV: camera failed to properly initialize!

If you are using Termius or another terminal to run run.py, it is possible to encounter this issue. Please switch to using macOS’s native Terminal.app to run it.

Using native Terminal.app, still have the problem.

2024-08-10 15:49:40.844 Python[5375:81665] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceType to your Info.plist.
OpenCV: out device of bound (0-2): 3
OpenCV: camera failed to properly initialize!
Screenshot 2024-08-10 at 3 49 54 PM M1 Pro 14.6.1

same

laloe74 avatar Aug 10 '24 05:08 laloe74

MacBook M1 Pro macOS Sonoma 14.5 When using Live mode, errors may occur:

OpenCV: not authorized to capture video (status 0), requesting...
OpenCV: camera failed to properly initialize!

If you are using Termius or another terminal to run run.py, it is possible to encounter this issue. Please switch to using macOS’s native Terminal.app to run it.

Using native Terminal.app, still have the problem.

2024-08-10 15:49:40.844 Python[5375:81665] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceType to your Info.plist.
OpenCV: out device of bound (0-2): 3
OpenCV: camera failed to properly initialize!
Screenshot 2024-08-10 at 3 49 54 PM M1 Pro 14.6.1

same

Solved, you may need to change this Screenshot 2024-08-10 at 3 56 18 PM

Super low fps lol

RoversX avatar Aug 10 '24 05:08 RoversX

MacBook M1 Pro macOS Sonoma 14.5 When using Live mode, errors may occur:

OpenCV: not authorized to capture video (status 0), requesting...
OpenCV: camera failed to properly initialize!

If you are using Termius or another terminal to run run.py, it is possible to encounter this issue. Please switch to using macOS’s native Terminal.app to run it.

Using native Terminal.app, still have the problem.

2024-08-10 15:49:40.844 Python[5375:81665] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceType to your Info.plist.
OpenCV: out device of bound (0-2): 3
OpenCV: camera failed to properly initialize!
Screenshot 2024-08-10 at 3 49 54 PM M1 Pro 14.6.1

same

Solved, you may need to change this Screenshot 2024-08-10 at 3 56 18 PM

Super low fps lol

After reporting the error, there is just a blank window with nothing.

laloe74 avatar Aug 10 '24 05:08 laloe74

MacBook M1 Pro macOS Sonoma 14.5 When using Live mode, errors may occur:

OpenCV: not authorized to capture video (status 0), requesting...
OpenCV: camera failed to properly initialize!

If you are using Termius or another terminal to run run.py, it is possible to encounter this issue. Please switch to using macOS’s native Terminal.app to run it.

Using native Terminal.app, still have the problem.

2024-08-10 15:49:40.844 Python[5375:81665] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceType to your Info.plist.
OpenCV: out device of bound (0-2): 3
OpenCV: camera failed to properly initialize!
Screenshot 2024-08-10 at 3 49 54 PM M1 Pro 14.6.1

same

Solved, you may need to change this Screenshot 2024-08-10 at 3 56 18 PM Super low fps lol

After reporting the error, there is just a blank window with nothing.

restart

wangbooth avatar Aug 10 '24 06:08 wangbooth

for macOS 14.5 using M3 MacBook Pro I had to change the index for camera in ui.py and chose 1 for the index in line ~259 ==> "cap = cv2.VideoCapture(1)"

of course I had to enable the camera from privacy settings too

MazenQ88 avatar Aug 10 '24 06:08 MazenQ88

I fix it

  1. https://github.com/hacksider/Deep-Live-Cam/issues/80#issuecomment-2278248039
  2. https://stackoverflow.com/questions/60469202/unable-to-install-tkinter-with-pyenv-pythons-on-macos/61879759#61879759

laloe74 avatar Aug 10 '24 06:08 laloe74