1GPHOTO2(1)              The gPhoto2 Reference (the man              GPHOTO2(1)
2
3
4

NAME

6       gphoto2 - command-line gphoto2 client
7

SYNOPSIS

9       gphoto2 [--debug] [--debug-logfile FILENAME] [[-q] | [--quiet]] [[-v] |
10               [--verbose]] [[-h] | [--help]]
11               [--hook-script FILENAME]
12               [--list-cameras] [--list-ports] [--stdout] [--stdout-size]
13               [--auto-detect] [--port PATH] [--speed SPEED] [--camera MODEL]
14               [--filename FILENAME]
15               [--usbid USBIDS]
16               [[-a] | [--abilities]]
17               [[--folder FOLDER] | [-f FOLDER]] [[[-R] | [--recurse]] |
18               [--no-recurse]]
19               [[-l] | [--list-folders]]
20               [[-L] | [--list-files]] [[-m NAME] | [--mkdir NAME]]
21               [[-r NAME] | [--rmdir NAME]] [[-n] | [--num-files]]
22               [[-p RANGE] | [--get-file RANGE]] [[-P] | [--get-all-files]]
23               [[-t RANGE] | [--get-thumbnail RANGE]]
24               [[-T] | [--get-all-thumbnails]]
25               [--get-raw-data RANGE] [--get-all-raw-data]
26               [--get-audio-data RANGE] [--get-all-audio-data]
27               [--force-overwrite]
28               [--new]
29               [[-d RANGE] | [--delete-file RANGE]] [[-D] |
30               [--delete-all-files]]
31               [[-u FILENAME] | [--upload-file FILENAME]] [--config]
32               [--list-config]
33               [--get-config CONFIGENTRY]
34               [--set-config CONFIGENTRY=CONFIGVALUE]
35               [--set-config-index CONFIGENTRY=CONFIGINDEX]
36               [--set-config-value CONFIGENTRY=CONFIGVALUE]
37               [--capture-preview]
38               [[-F COUNT] | [--frames COUNT]] [[-I SECONDS] |
39               [--interval SECONDS]]
40               [--reset-interval]
41               [--capture-image] [--capture-movie] [--capture-sound]
42               [--capture-tethered SECONDS or COUNT]
43               [--wait-event SECONDS or COUNT]
44               [--wait-event-and-download SECONDS or COUNT]
45               [--show-info RANGE]
46               [--show-exif RANGE]
47               [--storage-info] [--summary] [--manual] [--about] [--shell]
48

DESCRIPTION

50       libgphoto2(3) is a cross-platform digital camera library, and
51       gphoto2(1) is a command-line client for it.
52
53       Where an option takes a RANGE of files, thumbnails, or other data, they
54       are numbered beginning at 1. A range is a comma-separated list of
55       numbers or spans (“first-last”). Ranges are XOR (exclusive or), so that
56       “1-5,3,7” is equivalent to “1,2,4,5,7”.
57
58       --debug
59           Turn on debugging output. Debugging output is written to stderr by
60           default, or to the filename given to the --debug-logfile option.
61
62       --debug-logfile FILENAME (since 2.3.0)
63           The logfile to write the debugging info to, if --debug is given.
64
65       --hook-script FILENAME (new after 2.3.0)
66           Execute the hook script FILENAME every time a certain event happens
67           within gphoto2. The hook script reads the environment variable
68           ACTION. It must ignore ACTION values unknown to it.
69
70           ACTION=init
71
72               gphoto2 has just been initialized. If the hook script returns
73               with a non-zero exit code now, gphoto2 will abort.
74
75           ACTION=start
76
77               gphoto2 has just finished parsing the command line and is about
78               to start executing the commands given on the command line.
79
80           ACTION=download
81
82               gphoto2 has just downloaded a file to the computer, storing it
83               in the file indicated by the environment variable ARGUMENT.
84
85           ACTION=stop
86
87               gphoto2 is about to finish. Do your final cleanups here.
88
89           All other environment variables are passed to the hook script
90           unchanged. You can make use of that to pass data to the hook
91           script.
92
93           Hook script may be specified in the ~/.gphoto/settings file as
94           gphoto2=hook-script=filename.
95
96       -q, --quiet
97           Quiet output (default=verbose).
98
99       -v, --version
100           Display version and exit.
101
102       -h, --help
103           Display a short usage message.
104
105       --list-cameras
106           List supported camera models.
107
108       --list-ports
109           List supported port devices.
110
111       --stdout
112           Send file to stdout.
113
114       --stdout-size
115           Print filesize before data.
116
117       --auto-detect
118           List auto-detected cameras and the ports to which they are
119           connected.
120
121       --port PATH
122           Specify port device. The --list-ports prints a list of valid,
123           usable ports. In case of multiple USB cameras, the --auto-detect
124           shows you the specific port each camera is connected to.
125
126       --speed SPEED
127           Specify serial transfer speed.
128
129       --camera MODEL
130           Specify camera model. The --list-cameras option prints a list of
131           all explicitly supported cameras.
132
133           Most model names contain spaces: remember to enclose the name in
134           quotes so that the shell knows it is one parameter. For example:
135           --camera "Kodak DC240".
136
137           Note that if you specify --camera, you must also specify --port.
138           Otherwise the --camera option will be silently ignored.
139
140       --filename FILENAME
141           When downloading files from the camera, specify the file name or
142           file name pattern to use when storing the downloaded file on the
143           local disk. When uploading a file to the camera, specify the
144           filename to store the uploaded file as on the camera.
145
146           The --filename option accepts %a, %A, %b, %B, %d, %H, %k, %I, %l,
147           %j, %m, %M, %S, %y, %%, (see date(1)) and, in addition, %n for the
148           number, %C for the filename suffix, %f for the filename without
149           suffix, %: for the complete filename in lowercase.
150
151           Note that %: is still in alpha stage, and the actual character or
152           syntax may still be changed. E.g. it might be possible to use %#f
153           and %#C for lower case versions, and %^f and %^C for upper case
154           versions.
155
156           %n is the only conversion specifier to accept a padding character
157           and width: %03n will pad with zeros to width 3 (e.g. print the
158           number 7 as “007”). Leaving out the padding character (e.g. %3n)
159           will use an implementation specific default padding character which
160           may or may not be suitable for use in file names.
161
162           Default value for this option can be specified in the
163           ~/.gphoto/settings file as gphoto2=filename=value.
164
165       --usbid USBIDS
166           (Expert only) Override USB IDs.
167            USBIDSmust be of the form
168            DetectedVendorID:DetectedProductID=TreatAsVendorID:TreatAsProductID
169           to treat any USB device detected as
170           DetectedVendorID:DetectedProductID as
171           TreatAsVendorID:TreatAsProductID instead. All the VendorIDs and
172           ProductIDs should be hexadecimal numbers beginning in C notation,
173           i.e. beginning with ´0x´.
174
175           Example: --usbid 0x4a9:0x306b=0x4a9:0x306c
176
177       -a, --abilities
178           Display camera abilities.
179
180       -f, --folder FOLDER
181           Specify camera folder (default="/").
182
183       -R, --recurse
184           Recursion (default for download).
185
186       --no-recurse
187           No recursion (default for deletion).
188
189       -l, --list-folders
190           List folders in folder.
191
192       -L, --list-files
193           List files in folder.
194
195       -m, --mkdir NAME
196           Create a directory.
197
198       -r, --rmdir NAME
199           Remove a directory.
200
201       -n, --num-files
202           Display number of files.
203
204       -p, --get-file RANGE
205           Get files given in range.
206
207       -P, --get-all-files
208           Get all files from folder.
209
210       -t, --get-thumbnail RANGE
211           Get thumbnails given in range.
212
213       -T, --get-all-thumbnails
214           Get all thumbnails from folder.
215
216       --get-raw-data RANGE
217           Get raw data given in range.
218
219       --get-all-raw-data
220           Get all raw data from folder.
221
222       --get-audio-data RANGE
223           Get audio data given in range.
224
225       --get-all-audio-data
226           Get all audio data from folder.
227
228       --force-overwrite
229           Overwrite files without asking.
230
231       --new
232           Only get not already downloaded files. This option depends on
233           camera support of flagging already downloaded images and is not
234           available for all drivers.
235
236       -d, --delete-file RANGE
237           Delete files given in range.
238
239       -D, --delete-all-files
240           Delete all files in folder.
241
242       -u, --upload-file FILENAME
243           Upload a file to camera.
244
245       --capture-preview
246           Capture a quick preview.
247
248       -F COUNT, --frames COUNT
249           Number of frames to capture in one run. Default is infinite number
250           of frames.
251
252       -I SECONDS, --interval SECONDS
253           Time between capture of multiple frames.
254
255           (Since 2.4) If SIGUSR1 signal is received, a picture is taken
256           immediately without waiting for the end of the current interval
257           period (see the section called “SIGNALS”). A value of -1 will let
258           gphoto2 wait forever, i.e. until a signal arrives. See also
259           --reset-interval (since 2.4).
260
261       --reset-interval (since 2.4)
262           Setting this option will reset the time interval to the value given
263           by the -I|--interval option when a SIGUSR1 signal is received in
264           time-lapse mode.
265
266       --capture-image
267           Capture an image and keep it on the camera.
268
269       --capture-image-and-download
270           Capture an image and download it immediately to the computer.
271
272       --capture-movie
273           Capture a movie. (No driver supports this at this time.)
274
275       --capture-sound
276           Capture an audio clip.
277
278       --capture-tethered
279           Lets gphoto2 wait for notifications from the camera that an object
280           was added. This is useful for tethered capture, where pressing the
281           shutter on the camera immediately transfer the image to the machine
282           for processing.
283
284           Together with the --hook-script to immediately postprocess or
285           display the images this can help a studio workflow.
286
287           This option requires support in the driver and by the camera,
288           currently newer Canon EOS and Nikon DSC are known to work.
289
290       --wait-event SECONDS or COUNT, --wait-event-and-download SECONDS or
291       COUNT
292           Lets gphoto2 wait for notifications from the camera for various
293           things. This is useful for seeing what the camera does and waiting
294           for objects to be added. The objects are kept on camera in the
295           “--wait-event” version, with “--wait-event-and-download” they are
296           downloaded.
297
298           --wait-event-and-download is equivalent to --capture-tethered.
299
300           The time to wait can be either specified as full seconds with a "s"
301           suffix, or as a number of events (just a number). If nothing
302           happens, a timeout is generated after 1 second, so a “wait-event=5”
303           will take at most 5 seconds. A “--wait-event=5s” will take exactly
304           5 second.
305
306           If no argument is given, the wait time is 1 million events
307           (basically forever).
308
309           In the download variant this can be used together with the
310           --hook-script to immediately postprocess or display the images this
311           can help a studio workflow.
312
313           This option requires support in the driver and by the camera,
314           currently newer Canon EOS and Nikon DSC are known to work.
315
316       --show-info RANGE
317           Show info.
318
319       --list-config
320           List all configuration entries.
321
322       --get-config CONFIGENTRY
323           Get the specified configuration entry.
324
325           This command will list the type, the current value and also the
326           available options of this configuration value.
327
328       --set-config CONFIGENTRY=CONFIGVALUE
329           Set the specified configuration entry. For lists of choices of
330           values this setting first looks up CONFIGVALUE as value and then as
331           index into the choice list. Since this is not fully clear, you can
332           use --set-config-index or --set-config-value to be more clear what
333           is searched for.
334
335           Look at the output of --get-config to see what values are possible
336           to set here.
337
338       --set-config-index CONFIGENTRY=CONFIGINDEX
339           Set the specified configuration entry by specifying the index into
340           the list of choices for the configuration value. This of course
341           only works for configuration settings that offer list of choices.
342
343           Look at the output of --get-config to see what indices are possible
344           to set here.
345
346       --set-config-value CONFIGENTRY=CONFIGVALUE
347           Set the specified configuration entry by specifying its new value.
348           For lists of choices the value is looked up and set.
349
350           Look at the output of --get-config to see what indices are possible
351           to set here.
352
353       --storage-info
354           Display information about the camera´s storage media.
355
356       --summary
357           Summary of camera status.
358
359       --manual
360           Camera driver manual.
361
362       --about
363           About the camera driver.
364
365       --shell
366           Start the gphoto2 shell, an interactive environment. See SHELL
367           MODEfor a detailed description.
368

SHELL MODE

370       The following commands are available:
371
372       cd
373           Change to a directory on the camera.
374
375       ls
376           List the contents of the current directory on the camera.
377
378       lcd
379           Change to a directory on the local machine.
380
381       get
382           Download the file to the current directory.
383
384       get-thumbnail
385           Download the thumbnail to the current directory.
386
387       get-raw
388           Download raw data to the current directory.
389
390       show-info
391           Show information.
392
393       delete
394           Delete a file or directory.
395
396       mkdir DIRECTORY
397           Creates a directory named “DIRECTORY”.
398
399       rmdir DIRECTORY
400           Removes a directory named “DIRECTORY”.
401
402       show-exif
403           Show EXIF information (only if compiled with EXIF support).
404
405       capture-image
406           Captures a single image and keeps it on the camera.
407
408       capture-image-and-download
409           Captures a single image and downloads it from the camera.
410
411       list-config
412           Lists all configuration values.
413
414       get-config NAME
415           Gets the configuration specified by “NAME”.
416
417       set-config NAME=VALUE
418           Sets the configuration specified by “NAME” to “VALUE”.
419
420       set-config-value NAME=VALUE
421           Sets the configuration specified by “NAME” to “VALUE”.
422
423       set-config-index NAME=VALUE
424           Sets the configuration specified by “NAME” to the “INDEX” into the
425           list of choices. Works only for Menu or Radio button entries.
426
427       wait-event COUNT or SECONDS
428           Waits for events from the camera for the specified time in SECONDS
429           (if suffixed with s) or the COUNT of events from the camera, where
430           every seconds a timeout event happens. Newly added images are kept
431           on the camera.
432
433           Default is 1 event.
434
435       wait-event-and-download COUNT or SECONDS, capture-tethered COUNT or
436       SECONDS
437           Waits for events from the camera for the specified time in SECONDS
438           (if suffixed with s) or the COUNT of events from the camera, where
439           every seconds a timeout event happens. Newly added images are
440           downloaded from the camera.
441
442           Default is 1 event.
443
444       help, ?
445           Displays command usage.
446
447       exit, quit, q
448           Exit the gphoto2 shell.
449

ENVIRONMENT VARIABLES

451       CAMLIBS
452           If set, defines the directory where the libgphoto2 library looks
453           for its camera drivers (camlibs). You only need to set this on OS/2
454           systems and broken/test installations.
455
456       IOLIBS
457           If set, defines the directory where the libgphoto2_port library
458           looks for its I/O drivers (iolibs). You only need to set this on
459           OS/2 systems and broken/test installations.
460
461       LD_DEBUG
462           Set this to all to receive lots of debug information regarding
463           library loading on ld based systems.
464
465       USB_DEBUG
466           If set, defines the numeric debug level with which the libusb
467           library will print messages. In order to get some debug output, set
468           it to 1.
469

SIGNALS

471       SIGUSR1 (since 2.4)
472           In time-lapse capture mode, receiving a SIGUSR1 signal makes
473           gphoto2 take a picture immediately.
474
475           If the --reset-interval option is given, the time counter is reset
476           to the value given by the -I|--interval option. Note that the
477           camera will need some time (from 50ms to a few seconds) to actually
478           capture the image.
479

SEE ALSO

481       libgphoto2(3), The gPhoto2 Manual[1],
482
483       The gphoto.org website[2], Digital Camera Support for UNIX, Linux and
484       BSD[3]
485

EXAMPLES

487       gphoto2 --list-ports
488           Shows what kinds of ports (USB and serial) you have.
489
490       gphoto2 --auto-detect
491           Shows what camera(s) you have connected.
492
493       gphoto2 --list-files
494           List files on camera.
495
496       gphoto2 --get-file 7-13
497           Get files number 7 through 13 from the list output by gphoto2
498           --list-files.
499
500       gphoto2 --capture-image --interval 60 --hook-script
501       /usr/share/doc/gphoto2/test-hook.sh
502           Capture one image every 60 seconds from now to eternity. The
503           example hook script will be called after each captured image has
504           been stored on the computer.
505
506       To track down errors, you can add the --debug parameter to the gphoto2
507       command line and, if dealing with USB problems, setting the environment
508       variable USB_DEBUG=1.
509

AUTHORS

511       Tim Waugh
512           Author.
513
514       Hans Ulrich Niedermann, current maintainer <gp@n-dimensional.de>
515           Author.
516
517       Michael J. Rensing
518           Author.
519
520       Miscellanous Contributors.
521
522       The gPhoto2 Team
523           Author.
524
525       Tim Waugh <twaugh@redhat.com>
526           Original man page author.
527
528       Hans Ulrich Niedermann <gp@n-dimensional.de>
529
530           Current man page editor.
531

NOTES

533        1. The gPhoto2 Manual
534           http://www.gphoto.org/doc/manual/
535
536        2. The gphoto.org website
537           http://www.gphoto.org/
538
539        3. Digital Camera Support for UNIX, Linux and BSD
540           http://www.teaser.fr/~hfiguiere/linux/digicam.html
541
542
543
544                   <pubdate>2006-12-21</pubdate>August 2006         GPHOTO2(1)
Impressum