Skip to main content

open-camera-control

pip CI open-camera-control GitHub repo LICENSE GPLv3

A GTK application to control camera settings (ISO, aperture, shutter speed, white balance) via gphoto2. Keeps a persistent USB session so changing settings doesn't interrupt the camera's live view.

open-camera-control GUI

Requirements

  • Python 3.10+
  • libgphoto2 (system package)
  • GTK 3 + PyGObject (system package)
  • A gphoto2-compatible camera connected via USB

System dependencies (Fedora)

sudo dnf install libgphoto2 gtk3 gobject-introspection-devel cairo-gobject-devel

System dependencies (Debian/Ubuntu)

sudo apt install libgphoto2-6 gir1.2-gtk-3.0 python3-gi libgirepository1.0-dev

Installation

pip install open-camera-control

Or install from source:

git clone https://github.com/jcubic/open-camera-control.git
cd open-camera-control
pip install -e .

Usage

Connect your camera via USB and run:

camera-control

The application opens a window with a camera selector at the top and two tabs (Photo / Video) below.

Camera selector

The top bar shows all detected cameras in a dropdown. Select a camera and click Connect to start controlling it. The button turns green when connected and changes to Disconnect. Disconnecting preserves the camera's live view. Use the refresh button to re-scan for newly connected cameras.

Settings tabs

Each tab (Photo / Video) contains:

  • ISO — slider + text input
  • Aperture — slider + text input
  • Shutter Speed — slider + text input
  • White Balance — preset dropdown + Kelvin slider + text input

Moving a slider updates the text input. Type a value directly into the text input and press Enter — it will snap to the nearest valid value. Click Apply to send all changes to the camera at once.

For white balance, selecting a preset from the dropdown sets the Kelvin value. Moving the Kelvin slider or typing a value switches the dropdown to "Custom".

Configuration

On first run, the app creates ~/.open-camera-control/config.json with default white balance presets:

{
  "white_balance_presets": {
    "Daylight": 5600,
    "Cloudy": 6500,
    "Shade": 7500,
    "Tungsten": 3200,
    "Fluorescent": 4000,
    "Flash": 5400
  },
  "kelvin_range": {
    "min": 2500,
    "max": 10000,
    "step": 100
  }
}

Edit this file to add, remove, or rename white balance presets, or to change the Kelvin slider range.

Camera model support

Different camera models expose different gphoto2 widget names for the same settings. The app ships with per-model JSON mapping files in src/opencameracontrol/models/.

Supported models

  • Nikon D780
  • Fuji Fujifilm X-Pro3
  • Sony RX10 IV

Using an unsupported camera

If your camera model is not yet supported, run the detection tool:

camera-control-detect

This connects to your camera, lists all available widgets, and outputs a suggested JSON mapping. You can then either:

Option A — Personal use: Add the mapping to your ~/.open-camera-control/config.json:

{
  "models": {
    "My Camera Model": {
      "video_widgets": true,
      "photo": {
        "shutterspeed": "shutterspeed2"
      }
    }
  }
}

If a model is found in the user config, the bundled model file is not used.

Option B — Contribute: Save the JSON output as a model file and submit a pull request (see Contributing below).

Contributing camera models

To add support for a new camera model:

  1. Connect your camera via USB
  2. Run camera-control-detect
  3. Review the suggested widget mapping — the tool guesses based on widget labels, but you should verify:
    • The widget is not read-only (the tool marks these)
    • The choices look correct for that setting
    • For shutter speed, prefer shutterspeed2 over shutterspeed if both exist (the former uses 1/125 format and is usually writable)
  4. Save the JSON output to src/opencameracontrol/models/<normalized_name>.json
  5. Submit a pull request

Model file format

Model files only need to specify settings that differ from the defaults. The default widget names are:

Setting Default widget name
iso iso
aperture f-number
shutterspeed shutterspeed
whitebalance whitebalance

For cameras with separate video widgets (e.g., Nikon DSLRs), set "video_widgets": true. This auto-generates video widget names by adding the movie prefix (e.g., movieiso, movief-number). Add a "video" section only for video widgets that don't follow this pattern.

Minimal model file (camera uses all default widget names, same for photo and video):

{
    "model": "Fuji Fujifilm X-Pro3"
}

Model with overrides (photo shutterspeed differs, camera has separate video widgets):

{
    "model": "Nikon DSC D780",
    "video_widgets": true,
    "photo": {
        "shutterspeed": "shutterspeed2"
    }
}

The filename is the model name normalized to lowercase with special characters replaced by underscores (e.g., "Nikon DSC D780" becomes nikon_dsc_d780.json).

How it works

The app uses python-gphoto2 to maintain a persistent PTP/USB session with the camera — equivalent to running gphoto2 --shell. This means settings can be changed freely without the camera dropping live view or reconnecting, which is a known issue with individual gphoto2 CLI commands.

License

Copyright (c) 2026 Jakub T. Jankiewicz

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

See LICENSE for details.

Metadata

Release files for open-camera-control 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for open-camera-control 0.1.0
File Size Uploaded Provenance Actions
open_camera_control-0.1.0.tar.gz 29.8 kB With provenance Details for open_camera_control-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for open-camera-control 0.1.0
File Interpreter ABI Platform Actions
open_camera_control-0.1.0-py3-none-any.whl Python 3 none any Details for open_camera_control-0.1.0-py3-none-any.whl

Total release size: 61.7 kB

Release files / open_camera_control-0.1.0.tar.gz

Download URL open_camera_control-0.1.0.tar.gz
Size 29.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f2ebe4194dd39b55e533d5c5f8bc28a19780ab373400aed5cf9c594611027c1f
BLAKE2b-256 checksum
How to use checksums
690f21404d291d7be281cb6bf718db620324f5def92d579c0063d20ddccd4bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 7, 2026.

Transparency log

Release files / open_camera_control-0.1.0-py3-none-any.whl

Download URL open_camera_control-0.1.0-py3-none-any.whl
Size 31.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
743bf26cf53634b4f239fadd26838394998022f0bc4c49111c25bc8ae537642a
BLAKE2b-256 checksum
How to use checksums
db76eccd4206590653f7caa3f3e5dfd2a5ab9c4906eaffb21a3468225aa50116
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 7, 2026.

Transparency log

Security for open-camera-control 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for open_camera_control-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page