Skip to content

Instantly share code, notes, and snippets.

@kropp
Created January 19, 2016 15:43
Show Gist options
  • Save kropp/f94159d842e287fb3559 to your computer and use it in GitHub Desktop.
Save kropp/f94159d842e287fb3559 to your computer and use it in GitHub Desktop.
Take a photo with a webcam on Ubuntu
#!/bin/bash
export time=`date +%Y-%m-%d-%H-%M-%S`
export filename="$HOME/photos/photo-$time.jpg"
avconv -f video4linux2 -s 1920x1080 -i /dev/video0 -ss 0:0:0.1 -frames 1 $filename
echo $filename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment