Bigo72ha a "gphoto", "libgphoto ... telepítve vannak:
2.2. Using the gphoto2 command line interface
(CLI) (Gphoto manuálja - egyféle)
OK, we begin with finding out how you can connect a camera to your computer:
alice@host:~$ gphoto2 --list-ports
Devices found: 4
Path
Description
--------------------------------------------------------------
serial:/dev/ttyS0
Serial Port 0
serial:/dev/ttyS2
Serial Port 2
serial:/dev/ttyS3
Serial Port 3
usb:
Universal Serial Bus
alice@host:~$
In this example, we see that we have the three serial devices /dev/ttyS0, /dev/ttyS2 and /dev/ttyS3 which
are configured properly and to which gphoto2 has write permissions for. Additionally, there is also a USB bus.
However, we cannot tell yet whether we will have write access to the USB device file your camera will be assigned
by your operating system.
The next step is to connect you camera and find out whether gphoto2 can find it. This may only work with USB.
(FIXME: can any of the people with RS232 cameras help me on this issue?)
alice@host:~$ gphoto2 --auto-detect
Model
Port
----------------------------------------------------------
Canon PowerShot G2
usb:
alice@host:~$
In this case, a camera called “Canon PowerShot G2” is connected to your system’s USB bus.
OK, so now let’s see what we can find out about the camera:
alice@host:~$ gphoto2 --summary
Detected a ’Canon PowerShot G2’.
Camera Summary:
Camera identification:
Model: Canon PowerShot G2
Owner: Alice Smith
Power status: on battery (power OK)
Flash disk information:
Drive D:
31’885’312 bytes total
27’668’480 bytes available
Time: 2002-07-09 20:45:15 (host time +0 seconds)
alice@host:~$
The actual result of gphoto2 --summary may be different from camera to camera. However, we can see that
gphoto2 obviously can talk to the camera, and we get some information about the camera.
OK, now that we have seen that there is some space occupied on the storage medium of the camera, let’s have a
look at what is stored there:
alice@host:~$ gphoto2 --list-files
Detected a ’Canon PowerShot G2’.
There are no files in folder ’/’.
There are no files in folder ’/DCIM’.
There are 4 files in folder ’/DCIM/154CANON’:
#1
CRW_5417.CRW
rd 2334 KB image/x-canon-raw
#2
IMG_5415.JPG
rd 1044 KB image/jpeg
#3
IMG_5416.JPG
rd
31 KB image/jpeg
#4
MVI_5418.AVI
rd 682 KB video/x-msvideo
There are no files in folder ’/DCIM/CANONMSC’.
alice@host:~$
There are multiple folders on the camera, and there are several files of different types and sizes on stored in one
of them. One is a raw file of the type this camera produces, two are JPEG files (one large and one small) and one
seems to be a short video sequence.
Now that we have an impression of what expects us when we actually download the images from the camera, we
are going to do that:
alice@host:~$ gphoto2 --get-all-files
Detected a ’Canon PowerShot G2’.
Downloading ’CRW_5417.CRW’ from folder
Saving file as CRW_5417.CRW
Downloading ’IMG_5415.JPG’ from folder
Saving file as IMG_5415.JPG
Downloading ’IMG_5416.JPG’ from folder
Saving file as IMG_5416.JPG
Downloading ’MVI_5418.AVI’ from folder
Saving file as MVI_5418.AVI
alice@host:~$
’/DCIM/154CANON’...
’/DCIM/154CANON’...
’/DCIM/154CANON’...
’/DCIM/154CANON’...
And now we have all the files in our current directory (in this case in directory ~) and can do something with them.
khm, a többi a manuálban.
Még egyszer a link:
http://sourceforge.net/projects/gphoto/files/documentation/0.0.0/gphoto2-manual-2.1.1dev4.pdf/download