GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - gphoto/libgphoto2: The libgphoto2 camera access and control library.

BranchesTags
Open more actions menu

Latest commit

 

History

13,000 Commits
13,000 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
camlibs
camlibs
 
 
doc
doc
 
 
examples
examples
 
 
gphoto2
gphoto2
 
 
libgphoto2
libgphoto2
 
 
libgphoto2_port
libgphoto2_port
 
 
packaging
packaging
 
 
po
po
 
 
tests
tests
 
 
.cirrus.yml
.cirrus.yml
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.travis-script.sh
.travis-script.sh
 
 
.travis-translate-pkgs
.travis-translate-pkgs
 
 
.travis.yml
.travis.yml
 
 
AUTHORS
AUTHORS
 
 
COPYING
COPYING
 
 
ChangeLog
ChangeLog
 
 
HACKING.md
HACKING.md
 
 
INSTALL
INSTALL
 
 
MAINTAINERS
MAINTAINERS
 
 
Makefile.am
Makefile.am
 
 
NEWS
NEWS
 
 
OUTDATED.txt
OUTDATED.txt
 
 
README.md
README.md
 
 
README.packaging
README.packaging
 
 
RELEASE-HOWTO.md
RELEASE-HOWTO.md
 
 
SECURITY.md
SECURITY.md
 
 
TESTERS
TESTERS
 
 
configure.ac
configure.ac
 
 
coverity-model.c
coverity-model.c
 
 
gphoto2-config.in
gphoto2-config.in
 
 
installcheck.mk
installcheck.mk
 
 
libgphoto2-uninstalled.pc.in
libgphoto2-uninstalled.pc.in
 
 
libgphoto2.pc.in
libgphoto2.pc.in
 
 
meson.build
meson.build
 
 
meson_options.txt
meson_options.txt
 
 

Repository files navigation

libgphoto2

Hello and welcome to the wonderful world of gphoto! This is libgphoto2, the successor of gphoto with lots of new features and additional camera drivers.

If you miss a feature, would like to report success or failure, or have any questions, please don't hesitate to contact our mailing list.

What is libgphoto2?

libgphoto2 is a library that can be used by applications to access various digital cameras. For more information on gphoto, please visit the gphoto project website.

You can find information there about our mailing lists, a list of supported cameras, and the availability of gphoto2. Another source of information is gphoto github project page where you can fetch the source code of gphoto2, libgphoto2, gtkam and other related projects.

What libgphoto2 is NOT

Unlike the original gphoto, libgphoto2 is not a standalone graphical user interface (GUI) application. Instead, it is a backend library. There are several GUI frontends for the gphoto2 library, such as gtkam, a reference implementation for a graphical libgphoto2 client in GTK2.

libgphoto2 can only communicate with cameras that use protocols it understands. If a camera uses a proprietary protocol that has not been publicly documented or reverse-engineered, libgphoto2 will not be able to communicate with it.

USB Communication Protocols

Cameras typically use one of two main protocols for communication via USB:

  • USB Mass Storage protocol: This protocol treats the camera's internal storage (e.g., an SD card) as a standard disk drive. Your operating system will automatically recognize it as an external drive that you can mount to access files, just like a flash drive. Because there are already built-in OS drivers for this protocol, you do not need libgphoto2 for these cameras.

  • PTP (Picture Transfer Protocol): Developed by Kodak and others, PTP is a dedicated protocol for transferring images. libgphoto2 fully supports PTP. Almost all modern cameras that are not USB Mass Storage devices use this protocol, including models from Nikon, Canon, Fuji, Sony, and Panasonic. Cameras labeled as "PictBridge" also work, as this is an extension of PTP. If a PTP camera is unknown to libgphoto2, it will be detected as a generic PTP camera and will typically still work without any special configuration.

  • MTP (Media Transfer Protocol): MTP is a Microsoft-developed extension of PTP. MTP-capable devices are also accessible through libgphoto2.

For an up-to-date list of supported cameras and their protocol status, please consult the camera list with support status.

Platforms

libgphoto2 is designed to compile and run on most Unix-like platforms. Support for operating systems from Microsoft is not currently available.

Bindings

  • Java: gphoto2-java, libgphoto2-jna
  • Python: python-gphoto2, gphoto2-cffi
  • C#: libgphoto2-sharp
  • Go: gphoto2-go
  • Rust: gphoto-rs
  • Node.js: node-gphoto2
  • Ruby: ffi-gphoto2
  • Crystal: gphoto2.cr

How do I build it?

If you want to have 'libgphoto2' installed into $HOME/.local, keep the PKG_CONFIG_PATH= and --prefix= arguments to configure. Otherwise adapt or remove them.

autoreconf -is  # if using a git clone
./configure PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig${PKG_CONFIG_PATH+":${PKG_CONFIG_PATH}"}" --prefix="$HOME/.local"
make
make install

Out-of-tree builds are supported. ./configure --help may help.

using Meson build system

Since f5bb6c875c143c53bc8ba725e9d34726b31c47af, you can also build the library using Meson:

cd /path/to/source/root
meson setup builddir && cd builddir
meson compile
meson test

Getting the sources

The sources are available at the following places:

  • The gphoto github repository (this page) at https://github.com/gphoto/libgphoto2
  • The gphoto project website
  • In the SVN module gphoto2-manual

The gphoto2 Manual includes important information about setting up USB hotplugging. If you encounter problems, you may also consult the FAQ, which is included in the manual.

Frontends

gphoto2 is a command line frontend which is quite powerful, especially in combination with scripts. See The gphoto2 Manual for more information.

For the GUI lovers, there are many applications that use libgphoto2 as a backend. Examples include:

  • digiKam (KDE)
  • gThumb (GNOME)
  • Shotwell (GNOME)
  • Darktable (a virtual lighttable and darkroom for photographers)
  • Entangle (a GUI for tethered shooting)
  • f-spot (GNOME / Mono)
  • GIMP (via the gtkam-gimp plugin)

We also have a GTK2 reference GUI called gtkam, which is unmaintained. Its primary special feature is its capture ability. Additionally, there are plugins for other programs available like kio_camera (which integrates camera support into KDE's file manager, Konqueror) and a FUSE plugin gphotofs.

Reporting Bugs

Every piece of software contains errors and flaws. So does libgphoto2. When you encounter something that does not work, please do the following:

  1. Find out whether this is a known problem by searching the mailing lists and the Github issues.

  2. Reproduce the problem with debug output enabled and the language set to English, so that the development team will understand the messages. You can do this by running:

     env LC_ALL=C gtkam
    

    if you're using the gtkam frontend or running:

     env LC_ALL=C gphoto2 --debug-logfile=logfile.log --debug <options>
    

    using the gphoto2 command line interface.

  3. Report the problem on the mailing list with the corresponding debug output if it is small. If it is more than a few kilobytes, please don't post the complete debug output on the list.

Links

  • gphoto project home page
  • gphoto github project page
  • gphoto camera list
  • gphoto camera remote control list and doc
  • jphoto home page
  • Information about using USB mass storage
  • gphoto development mailing list
  • gphoto user mailing list
  • gphoto translation mailing list

About

The libgphoto2 camera access and control library.

Topics

accesscameracanondigitaldslreoslibrarylinuxnikonpentaxpowershotsonyusb

Resources

Readme
LGPL-2.1 license

Security policy

Security policy
Activity
Custom properties

Stars

1.4k stars

Watchers

53 watching

Forks

397 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.