GPHOTO2(1) | The gPhoto2 Reference (the man | GPHOTO2(1) |
NAME
gphoto2 - command-line gphoto2 client
SYNOPSIS
gphoto2 [--debug]
[--debug-logfile FILENAME]
[--debug-loglevel LEVEL] [[-q] | [--quiet]] [[-v] |
[--verbose]] [[-h] | [--help]] [--usage]
[--hook-script FILENAME]
[--list-cameras] [--list-ports] [--stdout] [--stdout-size] [--parsable]
[--auto-detect] [--port PATH] [--speed SPEED]
[--camera MODEL]
[--filename FILENAME] [--filenumber FILENUMBER]
[--usbid USBIDS]
[[-a] | [--abilities]]
[[--folder FOLDER] | [-f FOLDER]] [[[-R] |
[--recurse]] | [--no-recurse]]
[[-l] | [--list-folders]]
[[-L] | [--list-files]] [[-m NAME] |
[--mkdir NAME]]
[[-r NAME] | [--rmdir NAME]] [[-n] |
[--num-files]]
[[-p RANGE or NAME] |
[--get-file RANGE or NAME]] [[-P] |
[--get-all-files]]
[[-t RANGE or NAME] |
[--get-thumbnail RANGE or NAME]]
[[-T] | [--get-all-thumbnails]]
[--get-raw-data RANGE or NAME]
[--get-all-raw-data]
[--get-audio-data RANGE or NAME]
[--get-all-audio-data]
[--get-metadata RANGE or NAME]
[--get-all-metadata] [--upload-metadata FILENAME]
[--force-overwrite]
[--new]
[[-d RANGE or NAME] |
[--delete-file RANGE or NAME]] [[-D] |
[--delete-all-files]]
[[-u FILENAME] | [--upload-file FILENAME]]
[--config]
[--list-config] [--list-all-config]
[--get-config CONFIGENTRY]
[--set-config CONFIGENTRY=CONFIGVALUE]
[--set-config-index CONFIGENTRY=CONFIGINDEX]
[--set-config-value CONFIGENTRY=CONFIGVALUE] [--reset]
[--capture-preview] [--show-preview]
[[-F COUNT] | [--frames COUNT]]
[[-I SECONDS] | [--interval SECONDS]]
[--reset-interval]
[--capture-image] [--trigger-capture]
[--capture-movie SECONDS or COUNT]
[--capture-sound]
[--capture-tethered SECONDS, COUNT or STRING]
[--wait-event SECONDS, COUNT or STRING]
[--wait-event-and-download SECONDS, COUNT or STRING]
[--keep] [--no-keep]
[--show-info RANGE or NAME]
[--show-exif RANGE or NAME]
[--storage-info]
[--summary]
[--manual]
[--about]
[--shell]
DESCRIPTION
libgphoto2(3) is a cross-platform digital camera library, and gphoto2(1) is a command-line client for it.
Where an option takes a RANGE of files, thumbnails, or other data, they are numbered beginning at 1. A range is a comma-separated list of numbers or spans (“first-last”). Ranges are XOR (exclusive or), so that “1-5,3,7” is equivalent to “1,2,4,5,7”.
--debug
--debug-logfile FILENAME (since 2.3.0)
--debug-loglevel LEVEL (since 2.5.5)
--hook-script FILENAME (new after 2.3.0)
ACTION=init
ACTION=start
ACTION=download
ACTION=stop
All other environment variables are passed to the hook script unchanged. You can make use of that to pass data to the hook script.
Hook script may be specified in the ~/.gphoto/settings file as gphoto2=hook-script=filename.
-q, --quiet
-v, --version
-h, --help
--usage
--list-cameras
--list-ports
--stdout
--stdout-size
--parsable
--auto-detect
--port PATH
--speed SPEED
--camera MODEL
Most model names contain spaces: remember to enclose the name in quotes so that the shell knows it is one parameter. For example: --camera "Kodak DC240".
Note that if you specify --camera, you must also specify --port. Otherwise the --camera option will be silently ignored.
--filename FILENAME
The --filename option accepts %a, %A, %b, %B, %d, %H, %k, %I, %l, %j, %m, %M, %S, %y, %%, (see date(1)) and, in addition, %n for the number, %C for the filename suffix, %f for the filename without suffix, %F for the foldername, %: for the complete filename in lowercase.
Note that %: is still in alpha stage, and the actual character or syntax may still be changed. E.g. it might be possible to use %#f and %#C for lower case versions, and %^f and %^C for upper case versions.
%n is the only conversion specifier to accept a padding character and width: %03n will pad with zeros to width 3 (e.g. print the number 7 as “007”). Leaving out the padding character (e.g. %3n) will use an implementation specific default padding character which may or may not be suitable for use in file names.
Default value for this option can be specified in the ~/.gphoto/settings file as gphoto2=filename=value.
--filenumber FILENUMBER
--usbid USBIDS
Example: --usbid 0x4a9:0x306b=0x4a9:0x306c
-a, --abilities
-f, --folder FOLDER
-R, --recurse
--no-recurse
-l, --list-folders
-L, --list-files
-m, --mkdir NAME
-r, --rmdir NAME
-n, --num-files
-p, --get-file RANGE
-P, --get-all-files
-t, --get-thumbnail RANGE
-T, --get-all-thumbnails
--get-raw-data RANGE
--get-all-raw-data
--get-audio-data RANGE
--get-all-audio-data
--upload-metadata FILENAME
--get-metadata RANGE
--get-all-metadata
--force-overwrite
--skip-existing
--new
-d, --delete-file RANGE
-D, --delete-all-files
-u, --upload-file FILENAME
--capture-preview
-B--bulb SECONDS
--show-preview
-F COUNT, --frames COUNT
-I SECONDS, --interval SECONDS
(Since 2.4) If SIGUSR1 signal is received, a picture is taken immediately without waiting for the end of the current interval period (see the section called “SIGNALS”). A value of -1 will let gphoto2 wait forever, i.e. until a signal arrives. See also --reset-interval.
--reset-interval
--capture-image
--capture-image-and-download
--trigger-capture
This feature is only available for some camera brands and drivers.
--keep
--no-keep
--keep-raw
--capture-movie SECONDS
If not argument is specified, it will capture preview frames until you press Ctrl-C. Arguments that can be specified are either seconds of capture or number of preview frames.
--capture-sound
--capture-tethered SECONDS, MILLISECONDS, COUNT or MATCHSTRING
Together with the --hook-script to immediately postprocess or display the images this can help a studio workflow.
This option requires support in the driver and by the camera, currently newer Canon EOS and Nikon DLSR work.
--wait-event SECONDS, MILLISECONDS, COUNT or MATCHSTRING, --wait-event-and-download SECONDS, MILLISECONDS, COUNT or MATCHSTRING
--wait-event-and-download is equivalent to --capture-tethered.
The time to wait can be either specified as full seconds with a "s" suffix, a number of milliseconds with a "ms" suffix, as a number of events (just a number), or a sub-string to match. If nothing happens, a timeout is generated after 1 second, so a “wait-event=5” will take at most 5 seconds. A “--wait-event=5s” will take exactly 5 second.
It is also possible to wait for MATCHSTRING, for things like CAPTURECOMPLETE, FILEADDED, TIMEOUT or other events printed out.
If no argument is given, the wait time is 1 million events (basically forever).
In the download variant this can be used together with the --hook-script to immediately postprocess or display the images this can help a studio workflow.
This option requires support in the driver and by the camera.
If gphoto2 receives a SIGUSR1 during the wait, it will immediately take a picture (similar to “--capture-image”), and depending on mode either leave it on camera or download it. (Since 2.5.28)
If gphoto2 receives a SIGUSR2 during the wait, it will safely end the tethering. (Since 2.5.25)
--show-info RANGE
--config
--list-config
--list-all-config
This command is a combination of --list-config and calling --get-config on all the entries.
--get-config CONFIGENTRY
This command will list the type, the current value and also the available options of this configuration value.
--set-config CONFIGENTRY=CONFIGVALUE
Look at the output of --get-config to see what values are possible to set here.
--set-config-index CONFIGENTRY=CONFIGINDEX
Look at the output of --get-config to see what indices are possible to set here.
--set-config-value CONFIGENTRY=CONFIGVALUE
Look at the output of --get-config to see what values are possible to set here.
--reset
This command resets the USB port of either the first auto-detected camera, or the port specified with --port usb:XXX,YYY. This option is useful if somehow the protocol talking to the camera locked up and simulates plugging out and in the camera.
--storage-info
--summary
--manual
--about
--shell
SHELL MODE
The following commands are available:
cd DIRECTORY
ls
lcd DIRECTORY
get FILENAME
put FILENAME
get-thumbnail FILENAME
get-raw FILENAME
show-info FILENAME
delete FILENAME
mkdir DIRECTORY
rmdir DIRECTORY
show-exif FILENAME
capture-image
capture-image-and-download
capture-preview
list-config
get-config NAME
set-config NAME=VALUE
set-config-value NAME=VALUE
set-config-index NAME=VALUE
wait-event COUNT or SECONDS
Default is 1 event.
wait-event-and-download COUNT or SECONDS, capture-tethered COUNT or SECONDS
Default is 1 event.
help, ?
exit, quit, q
ENVIRONMENT VARIABLES
CAMLIBS
IOLIBS
LD_DEBUG
USB_DEBUG
SIGNALS
SIGUSR1 (since 2.4)
If the --reset-interval option is given, the time counter is reset to the value given by the -I|--interval option. Note that the camera will need some time (from 50ms to a few seconds) to actually capture the image.
SIGUSR2 (since 2.5.26)
SEE ALSO
libgphoto2(3), The gPhoto2 Manual[1],
The gphoto.org website[2], Digital Camera Support for UNIX, Linux and BSD[3]
EXAMPLES
gphoto2 --list-ports
gphoto2 --auto-detect
gphoto2 --list-files
gphoto2 --get-file 7-13
gphoto2 --capture-image --interval 60 --hook-script /usr/share/doc/gphoto2/test-hook.sh
To track down errors, you can add the --debug parameter to the gphoto2 command line and, if dealing with USB problems, setting the environment variable USB_DEBUG=1.
AUTHORS
Tim Waugh
Hans Ulrich Niedermann, current maintainer <gp@n-dimensional.de>
Michael J. Rensing
Marcus Meissner <marcus@jet.franken.de>
Miscellanous Contributors.
The gPhoto2 Team
Tim Waugh <twaugh@redhat.com>
Hans Ulrich Niedermann <gp@n-dimensional.de>
NOTES
- 1.
- The gPhoto2 Manual
- 2.
- The gphoto.org website
- 3.
- Digital Camera Support for UNIX, Linux and BSD
<pubdate>2015-08-01</pubdate>August 2006 | [FIXME: source] |