Skip to content

Commit 776ece9

Browse files
committed
Add --all feature to list-usb-cameras
1 parent ea41d32 commit 776ece9

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#!/bin/bash
22

3+
ALL=$1
4+
35
echo "Available USB camera devices:"
46
for path in /dev/v4l/by-id/usb-*-video-index0; do
5-
echo " $path"
7+
if [[ "$ALL" == "--all" ]]; then
8+
echo
9+
echo "=== $path ==="
10+
echo
11+
v4l2-ctl --device "$path" --all --list-formats --list-formats-ext
12+
else
13+
echo " $path"
14+
fi
615
done

0 commit comments

Comments
 (0)