| General Export Including Film Data.dtpreset | ||
| LICENSE | ||
| README.md | ||
darktable Film Photography Metadata Workflow
My film photography workflow using darktable. These cover two main sections: adding meaningful film metadata to scanned negatives, and exporting images with clean, space-free filenames compatible with Piwigo with some of that metadata in the image file's description.
Contents
- Film metadata schema — custom XMP fields for camera, film stock, development data, etc.
- Export preset — writes film metadata into the image description on export (this is great for automatically populate in the alt-text for some Mastodon clients, for instance)
Film Metadata Schema
darktable supports custom metadata fields via the Xmp.plus.CustomN tags. These fields appear in the metadata panel in the lighttable view and are written into exported images as XMP sidecar data.
Setup
In darktable's lighttable view, open the metadata panel, click the hamburger menu (☰) in the panel header, and choose Preferences. Add the following fields in the order shown — the display order matters.
| XMP Tag | Display Name | Visible |
|---|---|---|
Xmp.plus.Custom1 |
Camera | ✓ |
Xmp.plus.Custom2 |
Lens | ✓ |
Xmp.plus.Custom3 |
Film Stock | ✓ |
Xmp.plus.Custom4 |
Film Format | ✓ |
Xmp.plus.Custom5 |
Film Speed | ✓ |
Xmp.plus.Custom6 |
Shot At | ✓ |
Xmp.plus.Custom7 |
Shot Date | ✓ |
Xmp.plus.Custom8 |
Developer | ✓ |
Xmp.plus.Custom9 |
Time/Temp | ✓ |
A note on field assignment: darktable assigns custom fields by position — Custom1 through Custom9 — not by name. The display names above are just labels. If you add them in a different order, the export preset's field references will be wrong and you'll need to adjust them to match.
Field descriptions
- Camera — camera body (e.g.
Nikon F100) - Lens — lens used (e.g.
Nikkor 28-300mm f/3.5-5.6) - Film Stock — film name (e.g.
Ilford HP5) - Film Format —
135,6x6,6x7,6x9,4x5, etc. - Film Speed — box speed (e.g.
400) - Shot At — actual exposure index if pushed or pulled (e.g.
800) - Shot Date — date the roll was shot, in whatever format you prefer
- Developer — developer used (e.g.
Kodak XTOL) - Time/Temp — development time and temperature (e.g.
5:45 @ 22C)
Note: None of these fields are explicitly required - for instance I leave the lens field blank on cameras with fixed lens and/or when I've swapped lenses during a photo session. This being often blank is why it doesn't feed into the export section below.
Export Preset
General_Export_Including_Film_Data.dtpreset
This export preset writes a formatted description string into the exported image using the custom metadata fields above. The description is written to both Exif.Image.ImageDescription and Xmp.dc.description. I opted to use both as part of a trial-and-error test of getting this to show up in alt-text - I left both populated in case some other tool I use down the road uses one field or the other.
Example output
Nikon F100 | Ilford HP5 400 | Shot at 800 | Developed in Kodak XTOL | 5:45 @ 22C
Description template
$(Xmp.plus.Custom1) | $(Xmp.plus.Custom3) $(Xmp.plus.Custom5) | Shot at $(Xmp.plus.Custom6) | Developed in $(Xmp.plus.Custom8) | $(Xmp.plus.Custom9)
The preset uses Camera, Film Stock, Film Speed, Shot At, Developer, and Time/Temp. The remaining fields — Lens, Film Format, and Shot Date — are available in the metadata panel and written to XMP sidecars, but not included in the export description string by default. You can extend the template to include them if you want more detail in the exported image's description.
Export path and filename
The preset is configured with the following output path:
~/darktable/export/$(ROLL_NAME)/$(ROLL_NAME)_$(SEQUENCE4)
Note: I edit images in darktable on two different computers - my main Linux PC and a MacBook. I symlinked the SSD I store both my photos and my darktable config on to a directory called "darktable" in my home directory. This way on either computer this path looks the same to darktable.
This produces exports like ~/darktable/export/06.07.2025_Greensboro/06.07.2025_Greensboro_0001.jpg — one subfolder per film roll (folder), files named after the roll with a 4-digit sequence number, no spaces anywhere. I choose to not use spaces in my folders because Piwigo doesn't like spaces - if that's not important to you for whatever reason, folders and filenames with spaces in them work just fine.
Update the path to match your own export destination before using it.
Installation
Copy General_Export_Including_Film_Data.dtpreset to your darktable config directory:
- macOS/Linux:
~/.config/darktable/(or wherever your--configdirpoints - in my case with my multi-machine setup it also resides on the SSD with all my images)
Then restart darktable. The preset will appear in the export module's preset list.
Notes on film scanning
Lens distortion and lensfun: When scanning film, the scanning lens introduces essentially no distortion — but the original capture lens (used to make the exposure) sometimes does. Barrel distortion from the original capture lens is baked into the film frame itself. In darktable's lens correction module, correct for the capture lens (e.g. Nikkor 28-300), not the scanning lens. Using a similar lens profile with lensfun's orthographic projection setting can resolve visible barrel distortion on scanned images. This is especially noticable taking pictures of things with lines, like wooden siding on a barn.
Per-lens presets: darktable styles or presets are a practical way to encode per-lens corrections for different film rolls. If you shoot with multiple lenses, a preset per lens that applies the right lensfun profile saves time and keeps corrections consistent. In my experience so far, I've only needed to do lens correction on photos taken with my 28-300, the "all in one zoom" lens that more or less lives on my F100 body.