Compare commits

..

6 Commits

Author SHA1 Message Date
rehanbgmi d36b9f694f
Merge 4f05fa29da into 12fda0a3ed 2025-06-17 15:38:43 +02:00
KRSHH 12fda0a3ed
fix formatting 2025-06-17 18:42:36 +05:30
KRSHH d963430854
Add techlinked link 2025-06-17 18:42:10 +05:30
KRSHH 5855d15c09
Removed outdated links 2025-06-17 18:35:24 +05:30
google-labs-jules[bot] 4f05fa29da fix: Force AVFoundation for macOS camera, improve error clarity
Modifies modules/video_capture.py to exclusively attempt using
cv2.CAP_AVFOUNDATION for camera initialization on macOS.
The fallback to the default backend for macOS within this specific
initialization block has been removed.

If AVFoundation fails to open the camera, an error is logged, and
the subsequent standard check in the function will raise a
RuntimeError, making it clearer that AVFoundation was the point of
failure.

This change aims to provide better diagnostics for macOS camera
issues and ensure the intended AVFoundation backend is prioritized
without immediate fallback to potentially problematic default backends
like OBSENSOR.
2025-06-16 17:37:29 +00:00
KRSHH fcc73d0add
Update Download Button 2025-06-16 14:37:41 +05:30
3 changed files with 7 additions and 19 deletions

View File

@ -391,19 +391,6 @@ python run.py --execution-provider openvino
- Use a screen capture tool like OBS to stream.
- To change the face, select a new source image.
## Tips and Tricks
Check out these helpful guides to get the most out of Deep-Live-Cam:
- [Unlocking the Secrets to the Perfect Deepfake Image](https://deeplivecam.net/index.php/blog/tips-and-tricks/unlocking-the-secrets-to-the-perfect-deepfake-image) - Learn how to create the best deepfake with full head coverage
- [Video Call with DeepLiveCam](https://deeplivecam.net/index.php/blog/tips-and-tricks/video-call-with-deeplivecam) - Make your meetings livelier by using DeepLiveCam with OBS and meeting software
- [Have a Special Guest!](https://deeplivecam.net/index.php/blog/tips-and-tricks/have-a-special-guest) - Tutorial on how to use face mapping to add special guests to your stream
- [Watch Deepfake Movies in Realtime](https://deeplivecam.net/index.php/blog/tips-and-tricks/watch-deepfake-movies-in-realtime) - See yourself star in any video without processing the video
- [Better Quality without Sacrificing Speed](https://deeplivecam.net/index.php/blog/tips-and-tricks/better-quality-without-sacrificing-speed) - Tips for achieving better results without impacting performance
- [Instant Vtuber!](https://deeplivecam.net/index.php/blog/tips-and-tricks/instant-vtuber) - Create a new persona/vtuber easily using Metahuman Creator
Visit our [official blog](https://deeplivecam.net/index.php/blog/tips-and-tricks) for more tips and tutorials.
## Command Line Arguments (Unmaintained)
```
@ -447,6 +434,8 @@ Looking for a CLI mode? Using the -s/--source argument will make the run program
- [*"This real-time webcam deepfake tool raises alarms about the future of identity theft"*](https://www.diyphotography.net/this-real-time-webcam-deepfake-tool-raises-alarms-about-the-future-of-identity-theft/) - DIYPhotography
- [*"That's Crazy, Oh God. That's Fucking Freaky Dude... That's So Wild Dude"*](https://www.youtube.com/watch?time_continue=1074&v=py4Tc-Y8BcY) - SomeOrdinaryGamers
- [*"Alright look look look, now look chat, we can do any face we want to look like chat"*](https://www.youtube.com/live/mFsCe7AIxq8?feature=shared&t=2686) - IShowSpeed
- [*"They do a pretty good job matching poses, expression and even the lighting"*](https://www.youtube.com/watch?v=wnCghLjqv3s&t=551s) - TechLinked (LTT)
## Credits

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -51,14 +51,13 @@ class VideoCapturer:
else:
# Unix-like systems (Linux/Mac) capture method
if platform.system() == "Darwin": # macOS
print("INFO: Attempting to use cv2.CAP_AVFOUNDATION for macOS camera.")
print(f"INFO: macOS detected. Attempting to use cv2.CAP_AVFOUNDATION exclusively for camera index {self.device_index}.")
self.cap = cv2.VideoCapture(self.device_index, cv2.CAP_AVFOUNDATION)
# The check 'if not self.cap or not self.cap.isOpened():' later in the function
# will now directly reflect the success or failure of AVFoundation.
if not self.cap or not self.cap.isOpened():
print("WARN: cv2.CAP_AVFOUNDATION failed to open camera. Trying default backend for macOS.")
# Release the failed attempt before trying again
if self.cap:
self.cap.release()
self.cap = cv2.VideoCapture(self.device_index) # Fallback to default
print(f"ERROR: cv2.CAP_AVFOUNDATION failed to open camera index {self.device_index}. Capture will likely fail.")
# No fallback to default cv2.VideoCapture(self.device_index) here for macOS.
else: # Other Unix-like systems (e.g., Linux)
self.cap = cv2.VideoCapture(self.device_index)