Skip to content

Instantly share code, notes, and snippets.

@davidbradway
Created January 25, 2015 23:47
Show Gist options
  • Save davidbradway/473ce56d5bb977538b08 to your computer and use it in GitHub Desktop.
Save davidbradway/473ce56d5bb977538b08 to your computer and use it in GitHub Desktop.
Stop Motion Video in Ubuntu using Webcam

#Stop Motion

Did this using the Acer laptop webcam using Ubuntu

Install stuff we need

sudo apt-get install cheese streamer avconc

make a directory for the files

cd ~/Downloads/
mkdir cap
cd cap/

check out the webcam

cheese

do the time-lapse capture

streamer -o 0000.jpeg -s 300x200 -j 100 -t 2000 -r 1

filter out bad shots, etc

shotwell

rename and move to temp

i=0; for file in ~/Downloads/cap/*.jpeg; do cp $file /tmp/photo$i.jpg; i=$((i+1)); done

do video encoding

avconv -i /tmp/photo%d.jpg -r 24 video.mp4

clean up

rm *.jpeg
rm /tmp/photo*.jpg
mv video.mp4 ..
cd ..
rm cap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment