Manage the Real Time LUT Library of a Panasonic LUMIX S9 from a computer over USB, without the LUMIX Lab app or an SD card, plus a pipeline for turning photo-editor presets into camera LUTs that look like the preset on the RAW.
Tested on a DC-S9 with firmware 2.1 on macOS (Apple Silicon). Other LUMIX bodies that support LUMIX Lab's wired connection probably speak the same protocol, but are untested.
| Task | Tool |
|---|---|
| Read-only check of camera and library | control/lumix_lut.py selftest |
| List the LUT Library (names, base Photo Style, type) | control/lumix_lut.py list |
Upload a .cube into a slot (new or replace) |
control/lumix_lut.py push FILE.cube SLOT "Name" |
| Rename / reorder | control/lumix_lut.py rename SLOT "Name", control/lut_reorder.py order.txt --start=2 |
| Read device info in any USB mode | control/devinfo.py |
| Tethered shooting, Photo Style / format / WB / EV over USB | control/lumixctl.py, control/tether_pairs.py |
| Add grain (no colour noise) to any LUT | pipeline/add_grain.py my.cube my_grain.cube 50 |
| Preset → 33-point camera LUT, evaluation sheets | pipeline/ (needs LightCraft, see below) |
Lets an AI assistant (Claude Code, Claude Desktop, any MCP client) drive the camera: list/upload/rename/move/delete LUTs, write grain into LUTs, set Photo Style, white balance, ISO, exposure, aperture, image format, LUT opacity, take pictures and report what the camera applied (LUT, grain, WB).
python3 -m venv .venv && .venv/bin/pip install -e . # needs libusb (brew install libusb); capture needs gphoto2 + exiftool
claude mcp add lumix-mcp -- "$PWD/.venv/bin/lumix-mcp" # Claude Code; other clients: command = .venv/bin/lumix-mcp (stdio)| Tool | |
|---|---|
camera_status, selftest, list_luts |
read only |
upload_lut (grain/colour noise optional), rename_lut, move_lut, delete_lut |
LUT Library; delete/replace need confirm=true |
download_lut, backup_luts |
read LUTs back from the camera as .cube |
write_lut_file |
camera-ready .cube with header tags, no camera needed |
set_photo_style, set_white_balance, set_exposure, set_image_format, set_lut_options |
verified by read-back |
restore_settings |
undo every setting change made through the server |
capture |
shoot + download, returns files and the applied LUT/grain/WB/ISO |
Not possible over USB (as far as tested): choosing the active LUT, P/A/S/M, custom modes, i.Dynamic. Firmware
operations are blocked in the transport. Tests: python tests/test_offline.py, with a camera python tests/live_mcp_test.py [--write].
apps/LumixOS is a SwiftUI app: low-latency live view (1280x960 @ 30 fps, newest frame only) with a camera-style
HUD over the picture: WB/Kelvin, Photo Style (+ LUT opacity), quality on top; mode, aperture, EV, ISO, shutter,
remaining shots and battery at the bottom; grid, centre cross, level line, optional histogram. Hover a value to open
its options, click to set it. Focus: click the picture for touch AF (moves the AF area there and focuses; in MF it opens the
magnified MF assist there instead, click/Esc closes), focus peaking (p, Low/Mid/High, 4 colours), AF (f), focus
mode AFS/AFC/MF in the HUD, an MF ring on the right (drag up = far; grabbing it switches to MF), [ ] keys
({ } fast) or the scroll wheel. Aperture lists real 1/3 stops only. Keys: space shutter, g grid, l level,
h histogram, s settings panel. Camera menu: send the live view into OBS Virtual Camera (no signing needed: LumixOS
feeds the sink of OBS's own camera extension; OBS needn't run), install the own "LumixOS Camera" extension (needs an
Apple Developer team, see apps/LumixOS/README.md) or copy the stream URL for OBS.
Errors (no camera, unplugged, camera held by another program, live view refused, service crash) are shown on the
picture with a Retry button; the app restarts the service if it dies (log: ~/Library/Logs/LumixOS/server.log).
The app starts python -m lumix.server (127.0.0.1:8765; /stream, /stream?raw=1, /state, /set, /af,
/shutter, /undo, /size, /focus; commands answer {ok, message|error}) from this repo's .venv (or LUMIX_REPO).
Build: apps/LumixOS/build_app.sh. A Tk version: python -m lumix.monitor.
The level line assumes LevelInfo (0x17000005) carries roll in 0.1° (not yet verified by tilting).
- Camera: Setup → USB Mode → PC (Tether) (or LUMIX Lab), connect by USB.
pip install -r requirements.txt(pyusb) andbrew install libusb.-
The
python3 control/lumix_lut.py list python3 control/lumix_lut.py push my_look.cube 20 "My Look".cubeneeds#LUMIXPHOTOSTYLE STD(or another base) on line 2 and at most 33 points. Optional header lines:#GRAINEFFECT L50,#COLORNOISE L1,#SHARPNESS L60,#NOISEREDUCTION L40(L0–L100).
On macOS the system camera service ptpcamerad grabs the camera; the tools kill it before connecting.
- docs/PROTOCOL.md: PTP vendor commands, LUT Library protocol, property codes,
.cubetags - docs/FINDINGS.md: what we learned the hard way (pitfalls, camera behaviour, measurements)
- docs/METHOD.md: how the preset → LUT pipeline works and why
- docs/CODES.md: all command/parameter code tables
- docs/APP_COMMANDS.md: every request LUMIX Lab builds, with data layout
- docs/SAFETY.md: what these tools never do
- docs/DEVNOTES.md: how it was built, including dead ends
- docs/REPRODUCE.md: verify the protocol against a newer LUMIX Lab yourself
- docs/FIRMWARE.md: official firmware link and checksums
- docs/TESTED.md: tested cameras (add yours)
- docs/scans/: raw property dumps, firmware 1.5 and 2.1
- examples/: demo LUTs, start with
identity_std.cube
Offline test: python3 tests/test_parse.py.
The tools never use the firmware channel (PTP 0x9606/0x9607) and refuse to. LUT operations only touch the LUT Library. Still: this is unofficial, use at your own risk, and keep your own copies of every LUT.
The pipeline/ scripts render RAWs with LightCraft's command-line renderer (lightcraft-cli). Set LIGHTCRAFT_CLI and
LIGHTCRAFT_LIBRARY if they aren't on the default paths. Python: numpy, scipy, pillow. exiftool for maker notes.
From the PTP command tables and request builders in Panasonic's LUMIX Lab Android app (3.1.0), for interoperability, then verified against a camera. No Panasonic code, assets or firmware are included in this repository.
MIT, see LICENSE. Not affiliated with Panasonic. LUMIX is a trademark of Panasonic Holdings Corporation.
- libgphoto2: Panasonic PTP property codes and tethering basics
- sapoepsilon/lumix-remote: Wi-Fi
cam.cginotes - t0saki/lumix-lut-converter: LUMIX
.cubeformat and V-Log/Standard base behaviour