Canon Powershot as a webcam in Debian GNU/Linux
It is possible!
I did this with Canon Powershot A85, but this should also work at least
with models:
- Canon PowerShot S50
- Canon PowerShot A60
- Canon PowerShot A70
- Canon PowerShot A75
- Canon PowerShot A80
- Canon PowerShot A95
- Canon Digital IXUS 400 (aka PowerShot S400)
- Canon PowerShot S410
which the capture
program supports.
Software needed and notes
I installed libptp,
capture and
ptpcanon
which is a Canon specific implementation of ptpcam (which, of course, is
included in libptp package).
I never figured out how ptpcam or ptpcanon should actually work, but
with capture everything works just fine. After compiling capture I got funny
error that
told me there was something wrong with /usr/include/usb.h
/usr/include/usb.h:117: error: extra semicolon in struct or union
specified
I only had to remove extra semicolons from /usr/include/usb.h
to make it work.
Note that if you're going to use and compile libptp with ptpcam you propably
have to modify configure script a little. Libptp is included in gphoto2
libraries, but I compiled
and installed it anyway. Ptpcam may be useful if you have other cameras than
Canons.
To modify the configure script find a line that looks like this:
if test "$LIBUSB_VER" \< "0.1.8"; then
and replace it with
if test "$LIBUSB_VER" \< "0.1.10"; then
or whatever you libusb
version is. Note that there are
bugs in the version 0.1.10 which may damage your camera so you should use a
higher version, I have 0.1.10a.
In order to transfer files with ftp I recommend having ncftp installed. If
you have your own apache server
at your computer you could just use symbolic linking or for example file
copying with update switch.
Using capture
I manually chmodded my usb device so that a normal user can use it. This
could be done with a script.
I also give starting commands manually in case there are any problems.
To start with capture
inanna@nornen:~$ capture start
I use following settings in webcam-like use:
inanna@nornen:~$ capture "quality normal"
inanna@nornen:~$ capture "size small"
Then I call my script
inanna@nornen:~$ ./skripta
Here is my rough script which takes care of taking pictures in 30 sec delay
and sending them by ftp.
#!/bin/bash
# Immodesign kuvaskripta
E=q
until [ "$v1" = "$E" ]
do
capture "capture kuva.jpg"
sleep 1
ncftpput -u user -p pass my.fancy.server / pic.jpg
sleep 29
#read var1 --- kind of useless
done
exit 0
The sole purprose of this script is to continue looping until I violently
stop it with ^C. It could have been done
more elegantly but this works for me.
This way you can have fun with your camera and use it for many kinds of
applications
such as watching birds, spying on neighbours etc. You also get much better
picture quality
than with some cheap webcam. There is also the advantage of discerning when
the camera takes the picture
so you can get ready with some fabulous pose. The only fault of this webcam
system is the fact that
batteries won't last for eternity, but for occasional use this works. This
is perfect for the narcissistic
type of people as well ;)
Hope this howto makes someones life easier.
Last updated 020805 by Pauliina Niemi
paanni@NO.utu.SPAM.fi