CAT | Life / People
10
Image > video in linux
No comments · Posted by opcode1300 in Life / People, Linux, MAKE/HACK
I was ask if I knew of a way to grab a image from a web page over the course of a day because a friend will be standing in front of a webcam but we didn’t know when.
so as we all know the answer is yes with Linux
First, we need to get the image. the filename is the same but is refreshed once a minute. This will use wget to download the image and name the file like “2009_05_29-15_29_32.jpg”
then all we need to do is setup a cron job [I cheated and used gnome-schedule]
wget http://www.jach.hawaii.edu/weather/images/ukirt.jpg -O /home/alex/Desktop/ukirt_grab/"`date +%Y_%m_%d-%H_%M_%S.jpg`"
Now I listed the contents of the directory by date and output that to a file.
ls -1tr /home/alex/Desktop/Lee > /home/alex/Desktop/ukirt_grab/files.txt
Last, Use mencoder to make the movie.
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o /home/alex/Desktop/test.avi -mf type=jpeg:fps=20 mf://@/home/alex/Desktop/ukirt_grab/files.txt

