On 1/9/06, <b class="gmail_sendername">Tom Brown</b> <<a href="mailto:tom.brown@goodtechnology.com">tom.brown@goodtechnology.com</a>> wrote:<div><span class="gmail_quote"></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> I'm using the camE package from Dag's repo with a QuickCam Pro 4000. I<br>> do have X, although camE is purely being used to ftp the images to
<br>> another location. I can't really tell for sure whether the local X is<br>> important to that setup, but I suspect not.<br><br>OK thanks - how do you 'capture' the images?</blockquote><div><br>
Here's my /etc/camE.conf - this captures a frame every 5 seconds and ftps it off to another server:<br>
<br>
<div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">[ftp]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">host = REMOTEHOST</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">user = USER</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">pass = PASS</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">dir = /home/webcam</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">file = webcam1.jpg</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">tmp = imageup1.jpg</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">local = 0</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">passive = 1</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[grab]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">device = /dev/video0</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">width = 640</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">height = 480</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">delay = 5</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">input = webcam</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">quality = 80</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">title_text = 1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">text = %d-%m-%Y %H:%M:%S</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">ttf_dir = /usr/share/fonts/bitstream-vera/</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">text_font=VeraMoBd/7</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">title_font=VeraMoBd/8</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">framerate = 1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">pwc_wb_mode = outdoor</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># image settings (0-100) defaults are 50</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">colour = 60</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">brightness = 50</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">contrast = 50</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">hue = 50</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">whiteness = 50</span><br style="font-family: courier new,monospace;">
</div>
<br>
</div>(obviously REMOTEHOST, USER and PASS have been changed for my security!)<br>
<br>
and also here's my modified /etc/init.d/camE script:<br>
<br>
<div style="margin-left: 40px; font-family: courier new,monospace;">#!/bin/bash<br>
#<br>
# camE This shell script enables the startup of camE<br>
#<br>
# Author: Seth Vidal <<a href="mailto:skvidal@phy.duke.edu">skvidal@phy.duke.edu</a>><br>
#
modified from the yum startup script by Tony<br>
#<br>
# chkconfig: 345 98 02<br>
#<br>
# description: Enable startup of camE, a frame grabber & ftp tool<br>
# processname: camE<br>
# config: /etc/camE.conf<br>
#<br>
<br>
# source function library<br>
. /etc/rc.d/init.d/functions<br>
<br>
lockfile=/var/lock/subsys/camE<br>
<br>
RETVAL=0<br>
<br>
start() {<br>
echo -n $"Enabling webcam: "<br>
/usr/local/bin/setpwc -x<br>
/usr/bin/camE -c /etc/camE.conf >/dev/null 2>/dev/null &<br>
touch "$lockfile" && success || failure<br>
RETVAL=$?<br>
echo<br>
}<br>
<br>
stop() {<br>
echo -n $"Disabling webcam: "<br>
killall /usr/bin/camE<br>
rm -f "$lockfile" && success || failure<br>
RETVAL=$?<br>
echo<br>
}<br>
<br>
restart() {<br>
stop<br>
start<br>
}<br>
<br>
case "$1" in<br>
start)<br>
start<br>
;;<br>
stop)<br>
stop<br>
;;<br>
restart|force-reload)<br>
restart<br>
;;<br>
reload)<br>
;;<br>
condrestart)<br>
[ -f "$lockfile" ] && restart<br>
;;<br>
status)<br>
if [ -f $lockfile ]; then<br>
echo $"Webcam is enabled."<br>
RETVAL=0<br>
else<br>
echo $"Webcam is disabled."<br>
RETVAL=3<br>
fi<br>
;;<br>
*)<br>
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"<br>
exit 1<br>
esac<br>
<br>
exit $RETVAL<br>
</div>
<br>
You'll probably need to delete the setpwc line, since that's an extra
tool I've copied in as a binary from a previous incarnation of my box,
and I'm not quite sure where to get it from at the moment. It just
resets the colour balance of the webcam, and may not be relevant for
your model anyhow.<br></div><br>
After these 2 files are in place, it's just a service like any other,
so use 'chkconfig camE on' and 'service camE start'. Keep an eye on
your /var/log/messages, if the camera is dropping frames regularly then
the logfile can get big.<br clear="all"><br>-- <br>Cheers,<br><br>Tony