Skip to content

Commit 3561abe

Browse files
authored
Update main.py
Added debug info for video capture index
1 parent abf0ff9 commit 3561abe

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

main.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
CHANNELS = 2
1010

1111
# Device indices from query_devices()
12-
blackhole_input_device = 0
13-
headphones_output_device = 1
12+
blackhole_input_device = 1
13+
headphones_output_device = 6
1414

1515
# Mediapipe setup
1616
mp_face_mesh = mp.solutions.face_mesh
@@ -20,7 +20,10 @@
2020
hands = mp_hands.Hands(max_num_hands=1, min_detection_confidence=0.7)
2121

2222
# Webcam
23-
cap = cv2.VideoCapture(1)
23+
cap = cv2.VideoCapture(0)
24+
25+
if not cap.isOpened():
26+
print("Error: Could not open video capture device. Check the index (0, 1, etc.)")
2427

2528
# Shared panning, distance values, and master volume
2629
pan = 0.0

0 commit comments

Comments
 (0)