In today's tutorial we see some small function gPhoto2, a program command-line oriented * NIX systems which in addition to other functions, allows us to access some of the functionality “hidden” (or non-advertised) of our cameras.
It should be stated at the outset that not all cameras are supported. The complete list is available on the manuale online Application.
The operation is very simple. Configure the camera (io face you Canon EOS 20d) so that the USB connection is of type PTP (under the menu “Communication” – “PTP”).
Now connect the camera to your computer with its USB cable.
The connection, gPhoto2 if it is already installed, our operating system automatically mount the camera allowing you to download photos inside. As we shall see gPhoto2 can do much more, but to operate it is necessary that the camera is not mounted. The easiest way is to click with the right mouse button and select the icon for the camera “Unmount”, “Skinned” the “Remove drive safely”.
At this point gPhoto2 should be granted access to the camera. Meanwhile, let's see if the “sees”.
$ gphoto2 --summary Individuata una "Canon:EOS 20D (normal mode)". Summary of the camera: Identification of the camera: Type: Canon:EOS 20D (normal mode) Manufacturer: unknown Stato alimentazione: with battery (Power OK) Information on flash memory: Unit A: 3'904'152 byte totali 3'890'804 byte disponibili Ora: 2012-03-03 19:25:16 (ORA host +0 seconds)
Well, the camera was found, my brand says, type, available memory and battery status.
We take a photo
Type this command from the terminal will hear the classic “clack-clack” shutter of the 20d, and the picture is registered in the camera memory.
Other cool features
How many photos were taken from my camera from the date of manufacture until now?
$ gphoto2 --get-config=/main/status/shuttercounter
And if I wanted to download all the photos on the CF card inserted in the camera (without “mount” the camera)?
$ gphoto2 --get-all-files
In the next article we will see how to set up your computer so that it forwards the trip command at regular intervals, 'll mount the frames automatically creating a video with ffmpeg. This technique is called “time-lapse”.