https://bugs.kde.org/show_bug.cgi?id=521479
Bug ID: 521479
Summary: Use camera sequence metadata when grouping burst or
bracketed photos
Classification: Applications
Product: digikam
Version First 9.1.0
Reported In:
Platform: macOS (DMG)
OS: macOS
Status: REPORTED
Severity: wishlist
Priority: NOR
Component: Albums-ItemsGroup
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 193161
--> https://bugs.kde.org/attachment.cgi?id=193161&action=edit
Workaround script
DESCRIPTION
I want digiKam to use camera sequence metadata when grouping burst or bracketed
photos.
The "Group Selected By Timelapse / Burst" action seems to use file names and
timestamps to guess which photos belong together. This can work as a fallback,
but some cameras already store more precise sequence information in the image
metadata.
My use case is importing many exposure-bracketed sets and continuous bursts
from a camera. For exposure bracketing, one real group is usually small, for
example, 5 files. When I take many bracketed sets close together, "Group
Selected By Timelapse / Burst" can combine several real bracket sets into a
single large group. Fixing this by hand takes a lot of time because I need to
open or inspect the large group, ungroup it, and then regroup each bracket set.
In one real album with 1896 Sony ARW photos that I took over multiple days, I
compared "Group Selected By Timelapse / Burst" with the camera sequence
metadata. Using the camera sequence metadata as the reference result, only 189
of 355 groups would already be correct. The other 166 camera-accurate groups
would be wrong or missing. Most of them are packed into 58 oversized groups
created by "Group Selected By Timelapse / Burst", so I would need to inspect
and split those 58 groups by hand.
The metadata also found two 2-photo continuous-drive bursts that "Group
Selected By Timelapse / Burst" would leave ungrouped, because it only creates
groups with 3 or more photos.
Most of the problem is exposure bracketing: 150 bracketing groups would fall
within the oversized groups created by "Group Selected By Timelapse / Burst".
This happens because bracketed frames are often taken within the same stored
timestamp second. In this album, all 325 camera-reported bracketing groups had
at least two photos with the same stored timestamp second, and 120 complete
5-shot bracket groups had all five photos in the same stored timestamp second.
Examples where "Group Selected By Timelapse / Burst" joins separate 5-shot
bracket sets:
```text
DSC06975..DSC06984 "Group Selected By Timelapse / Burst": one 10-photo group
camera metadata: DSC06975..DSC06979 and DSC06980..DSC06984
DSC06995..DSC07014 "Group Selected By Timelapse / Burst": one 20-photo group
camera metadata: four separate 5-photo bracket groups
DSC07035..DSC07054 "Group Selected By Timelapse / Burst": one 20-photo group
camera metadata: four separate 5-photo bracket groups
```
The camera already stores the correct sequence information. For Sony ARW files
from a Sony ILCE-7RM4A, exiftool shows these MakerNote fields:
```text
Sony:ReleaseMode
Sony:ReleaseMode2
Sony:ReleaseMode3
Sony:SequenceNumber
Sony:SequenceImageNumber
Sony:SequenceFileNumber
Sony:SequenceLength
```
For exposure bracketing, the camera stores both the position and the length of
the bracket set:
```text
DSC07747.ARW ReleaseMode=Exposure Bracketing SequenceFileNumber=1
SequenceLength=5 files
DSC07748.ARW ReleaseMode=Exposure Bracketing SequenceFileNumber=2
SequenceLength=5 files
DSC07749.ARW ReleaseMode=Exposure Bracketing SequenceFileNumber=3
SequenceLength=5 files
DSC07750.ARW ReleaseMode=Exposure Bracketing SequenceFileNumber=4
SequenceLength=5 files
DSC07751.ARW ReleaseMode=Exposure Bracketing SequenceFileNumber=5
SequenceLength=5 files
DSC07752.ARW ReleaseMode=Exposure Bracketing SequenceFileNumber=1
SequenceLength=5 files
```
For continuous-drive bursts, the camera does not store a fixed numeric length,
but it still stores the position in the burst and resets to 1 at the start of a
new burst:
```text
ReleaseMode=Continuous
ReleaseMode2=Continuous
ReleaseMode3=Continuous
SequenceFileNumber=1..N
SequenceLength=Continuous
```
This metadata gives more accurate group boundaries than second-level
timestamps.
STEPS TO REPRODUCE
1. Import Sony ARW files shot in exposure bracketing or continuous-drive mode.
2. Select a range that contains several bracket sets or continuous bursts.
3. Use Group -> Group Selected By Timelapse / Burst.
OBSERVED RESULT
digiKam does not seem to use the Sony MakerNote sequence fields when grouping
burst or bracketed photos. It uses file names and timestamps, which can combine
several real bracket sets into a single larger group.
EXPECTED RESULT
When camera sequence metadata is available, digiKam should use it to more
accurately determine burst and bracketing group boundaries.
For the Sony ARW examples above:
- exposure-bracketing files numbered 1..5 should form one 5-photo group
- the next file where the sequence resets to 1 should start a new group
- continuous-drive photos should stay in the same group until the camera
sequence resets or the file-name sequence breaks
- this metadata should not group normal shots without burst sequence
information
This could be done either inside "Group Selected By Timelapse / Burst" by using
metadata first, when available, and falling back to the existing "Group
Selected By Timelapse / Burst" behavior, or as a separate metadata-aware
grouping action. A Sony-only action may not handle mixed selections well when
they contain Sony and non-Sony files, so fallback behavior for unsupported
files would still matter.
SOFTWARE/OS VERSIONS
Operating System (available in the Info Center app, or by running `kinfo` in a
terminal window): macOS 26.5 (25F71)
KDE Plasma Version: not applicable
KDE Frameworks Version: 6.26.0
Qt Version: 6.11.0
ADDITIONAL INFORMATION
digiKam version: 9.1.0
Camera: Sony ILCE-7RM4A
File type: Sony ARW
Album metadata checks:
- 1896 Sony ARW files
- 1622 files marked `Exposure Bracketing`
- 262 files marked `Continuous`
- 12 normal shots ignored by this metadata-based grouping
- metadata-based grouping produced 355 groups
- 325 groups came from fixed-length exposure bracketing
- 30 groups came from camera-reported continuous-drive runs
- maximum bracketing group size: 5
- maximum continuous-drive group size: 38, matching a camera sequence numbered
1..38
Related existing reports:
- Bug 400777: "Group images by timelapse / burst [patch]" is the original
feature request for "Group Selected By Timelapse / Burst" and is RESOLVED
FIXED.
- Bug 468442: "Auto Grouping images using maintenance tool" is related to
automatic grouping, but does not seem to cover camera MakerNote sequence
metadata.
Reference validation logic used locally, included as pseudocode only:
```text
images = selected images sorted by filename
current_group = []
for image in images:
metadata = read image metadata
release_text = ReleaseMode + ReleaseMode2 + ReleaseMode3
sequence_number = Sony:SequenceFileNumber or Sony:SequenceImageNumber
sequence_length = numeric value from Sony:SequenceLength, if any
if release_text contains "Bracketing" and sequence_number is present and
sequence_length > 0:
mode = "bracketing"
else if release_text contains "Continuous" and sequence_number is present:
mode = "continuous"
else:
flush current_group if it is large enough
continue
if current_group is not empty and (
mode changed
or filename is not consecutive
or sequence_number is not previous_sequence_number + 1
or sequence_number reset to 1
):
flush current_group if it is large enough
append image to current_group
if mode is "bracketing" and current_group size == sequence_length:
flush current_group
flush current_group if it is large enough
```
Also attached is a Python script I'm using in the meantime to make this change
manually, which can be used to guide the implementation of the required logic
or as a workaround for others running into the same issue.
AI disclosure:
This issue draft was prepared with assistance from Codex. Codex helped inspect
local Sony ARW metadata, search for related KDE Bugzilla reports, and draft the
wording. The reporter reviewed the findings and remains responsible for the
submission.
--
You are receiving this mail because:
You are watching all bug changes.