Created
February 22, 2017 20:04
-
-
Save rfong/b1f9b0ec7dcd5243cba2abd87b6657c3 to your computer and use it in GitHub Desktop.
Bash settings w/ multiple C920 logitech cameras
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cameras=(0 1 2) | |
function apply_cams() { | |
# Apply `v4l2-ctl $@` to all cams | |
# Example usage: apply_cams -C focus_auto | |
for cam in "${cameras[@]}"; do | |
echo "/dev/video$cam" | |
v4l2-ctl -d $cam $@ | |
done | |
} | |
alias list_cam_ctrls='v4l2-ctl -L' | |
: """ | |
Common v4l2-ctl commands I care about: | |
-C, --get-ctrl=<ctrl>[,<ctrl>...] | |
get the value of the controls | |
-c, --set-ctrl=<ctrl>=<val>[,<ctrl>=<val>...] | |
set the value of the controls | |
-d, --device=<dev> | |
use device <dev> | |
-l, --list-ctrls | |
display all controls and their values | |
-L, --list-ctrls-menus | |
display all controls and their menus | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment