Existing users, log in.  New users, create a free account.  Lost password?

Mac OS X  |  Internet  |  Chat / IM / SMS  |  isightcapture  |  Great as a webcam! My script included here:

isightcapture

isightcapture

CLI capture utility for iSight camera

Version:  1.1

   [ Views: 605 ]

Great as a webcam! My script included here:

Feedback Type:  Usage Tip

Contributed by: fsdlk@uaf.edu Monday, September 24 2007 @ 10:50 AM PDT

Product Platform: MacOSX

Used Product For: Less than a month

Recommend Product: YES

#!/bin/tcsh

# webcam2file.command
# Webcam to file script; for creating a webcam website on a mac.
# September 21, 2007

# Make sure this script is saved with unix line returns and set it executable
# ex: chmod 750 webcam2file.command
# For quick launch in the GUI; In the finder Get Info (command i) and set Open With to Terminal.app
# Then drag the script on to the *bottom* dock.

# Requires: isightcapture and ImageMagick
# ImageMagick is used for date stamping the web image.
# For ImageMagick on the mac; install macports and run the following command to install:
# sudo /opt/local/bin/port install rb-rmagick
# MacPorts: http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts
# isightcapture: http://www.intergalactic.de/hacks.html

echo "Starting Web Cam"
echo ""

while (1 == 1)

# For more date format options see: http://en.wikipedia.org/wiki/Date_%28Unix%29#Formatting
set date=`date "+%l:%M:%S %p"`

echo "taking photo ${date}"

# Have isight capture the image and save it to the Macintosh website folder.
# Assumes isightcapture is placed in /local/bin; change if not.
/local/bin/isightcapture -w 320 -h 240 ~/Sites/images/cam-raw.jpg

# Comment this line if you don't install ImageMagick or don't want to put a timestamp on the image.
# For more ImageMagick text stamp options see: http://www.imagemagick.org/Usage/annotating/
/opt/local/bin/convert ~/Sites/images/cam-raw.jpg -gravity South -background skyblue -splice 0x18 -draw "text 0,0 '${date}'" ~/Sites/images/cam.jpg

#sleep setting regulates time between photos, currently 1 second + write and date = 5 about seconds
sleep 1

end
exit   

Rate this Usage Tip

Was this Usage Tip helpful? Yes | No

Comments

0 comments |

No user comments.