Skip to content

cameroncros/cameraControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cameraController

Global hotkeys for controlling camera exposure on Windows (DirectShow) and Linux (v4l2).

Usage

cargo run -- list
cargo run -- keycodes
cargo run -- config path/to/config.toml
cargo run -- wizard path/to/config.toml
  • list: list video input devices detected by the platform backend.
  • keycodes: print key/button codes as you press them.
  • config: Load the config, and listen for key presses to trigger camera controls.
  • wizard: interactively add a binding to a config file.

Config format

[[bindings]]
key = "CTRL_L+SHIFT_L+KeyE"
device = "Logitech"
control = "Exposure"
mode = "INCREMENT"

[[bindings]]
key = "ALT+KeyA"
device = "Logitech"
control = "Exposure"
mode = "AUTO"

[[bindings]]
key = "ALT+KeyS"
device = "Logitech"
control = "Exposure"
mode = { SET = 120 }

Notes:

  • Use keycodes to discover the exact key strings, or just use the wizard.
  • mode supports AUTO, INCREMENT, DECREMENT, or SET.
    • AUTO: Put the exposure meter in auto mode.
    • INCREMENT: Increase the exposure by 1.
    • DECREMENT: Decrease the exposure by 1.
    • SET: Set the exposure to the given value.

Platform notes

  • Linux: requires v4l2 and access to /dev/video*.
  • Windows: uses DirectShow/Media Foundation to access camera controls.

About

Rust util to control exposure setting on webcam

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages