Thursday, February 21, 2008

Tethered capture with gphoto2

It turns out that it's fairly easy to use a linux box to
take pictures using my Nikon D50 and display the results
to the screen:

$ gphoto2 --capture-image --interval 10 -F 2 --hook-script

The above takes two frames ten seconds apart (making a D50 into
a very expensive webcam). Alternatively, I could use the following
to use the camera normally but have the pictures show up on the
computer screen:

$ gphoto2 --capture-tethered --hook-script

The "hook script" is what does the actual display after each shot:

$ cat
#! /bin/bash

self=`basename $0`

case "$ACTION" in
echo "$self: INIT"
# exit 1 # non-null exit to make gphoto2 call fail
echo "$self: START"
echo "$self: DOWNLOAD to $ARGUMENT"
eog ${ARGUMENT} &
echo "$self: STOP"
echo "$self: Unknown action: $ACTION"

exit 0

Pretty darn cool!

Friday, February 01, 2008

Thought for the day

In drobbins' post today,,
he offers the following advice:

If a project doesn't meet your needs, I encourage you to create your own
project. If you do, I recommend keeping the development team small,
tight-knit and independent. I think this will maximize your productivity
as well as your overall enjoyment of collaborative and open development.

Is that the future for Gentoo? It's already happening to some extent.
The next generation of the (in)famous Gentoo init system is now
an independent project ( Paludis
( and pkgcore (
are independent package managers designed to work with Gentoo's
portage tree. Drobbins independently releases x86 and amd64
stage tarballs ( Anybody who
wants to can create their own overlay repository such as those

Internally, though, Gentoo works pretty much the same way. Take
a look at
sometime. Most Gentoo developers spend their time toiling
on a handful of specific projects. Yet that specialization inside
Gentoo seems to contribute to the feeling that Gentoo lacks any
sort of coherent direction. Would things really be that different
if those projects were independent, external projects?

I've no idea. Thoughts / comments welcome.


Label Cloud