Skip to content

Instantly share code, notes, and snippets.

@nonchip
Created January 21, 2018 04:29
Show Gist options
  • Save nonchip/10a9ea0de50ae103586820b86743fa64 to your computer and use it in GitHub Desktop.
Save nonchip/10a9ea0de50ae103586820b86743fa64 to your computer and use it in GitHub Desktop.
outputs a `v4l2-ctl -c` command that sets the current settings for /dev/video0, useful to put the output into `/etc/rc.local` or the likes to make it set up your preferred settings on boot
echo v4l2-ctl -c $(v4l2-ctl --all -k | grep -E '\(int)|\(menu)|\(bool)' | sed -E 's/^ *//;s/^([^ ]*).*value=([^ ]*).*/\1=\2/' | tr '\n' , | head -c -1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment