Bug 426923 - EOS R5 CR3 Missing exif data with current master branch code
Summary: EOS R5 CR3 Missing exif data with current master branch code
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Raw (show other bugs)
Version: 7.2.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-24 11:39 UTC by K D Murray
Modified: 2021-04-24 03:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.3.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description K D Murray 2020-09-24 11:39:40 UTC
SUMMARY

CR3 images from the EOS R5 don't seem to display metadata from exif etc.  Possible duplicate of https://bugs.kde.org/show_bug.cgi?id=424860, but I think that the fixes in this issue are included in the current master branch and therefore in theory are included in the version I'm running. I can confirm the same behaviour with the released 7.1.0.


STEPS TO REPRODUCE
1. With digikam from current master branch
2. ./bootstrap.local && cd build && make install && ./finish_install.sh
3. Navigate to a directory containing CR3s
4. click metadata from RHS menu
5. Chose "no filter" from drop down menu, and "select all" under settings to enable display of all metadata fields.

OBSERVED RESULT

No metadata in exif/makernotes/iptc panels of metadata tab, even with it set to display all metadata.

EXPECTED RESULT

If I understand correctly, at least some basic EXIF metadata (e.g. exposure settings, capture date, GPS) should be present in this view in digikam version 7.1.0+ thanks to bug 424860's Exiv2 workaround.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
KDE Frameworks 5.70.0
Qt 5.14.2 (built against 5.14.2)
The xcb windowing system

ADDITIONAL INFORMATION

My digikam database (sqlite) and config file (~/.config/digikamrc) were first created with DK v 6.4-ish. I have confirmed that the behaviour I describe above happens also when i back up digikamrc etc and start from scratch with 7.2.0-beta (from current master branch).


While no QT wizard, I'm more than happy to contribute code or whatever to better support CR3s in digikam. I have some experience in C++, and a modest background in image processing. I would need supervision, but if someone from digikam knows approximately how to fix these issues but doesn't have time, I'm happy to contribute code for this.
Comment 1 caulier.gilles 2020-09-24 11:55:12 UTC
Can you share a CR3 file on the cloud to test in local ?

Thanks in advance

Gilles Caulier
Comment 2 K D Murray 2020-09-24 12:09:58 UTC
Sure! 

See https://cloudstor.aarnet.edu.au/plus/s/sVDMnJLFmdWPvJG

password is DigikamBug#426923
Comment 3 caulier.gilles 2020-09-24 12:30:16 UTC
No problem with Exif here :

https://i.imgur.com/V0jAGRG.png

Markernotes is empty because we cannot deal with these metadata using libraw. Only standard Exif are supported.

Iptc is minimal.

XMP is populated with Exif info decoded...

So all work as expected. If you want more, please ask to Exiv2 to not lost time with patents troll and to support standard ISO container as CR3 and HEIF...

Gilles Caulier
Comment 4 Maik Qualmann 2020-09-24 19:47:39 UTC
Like Gilles, I can confirm that the basic metadata is displayed.

Maybe the debug output in the terminal shows something:

export QT_LOGGING_RULES="digikam.*=true


Maik
Comment 5 K D Murray 2020-09-26 03:55:42 UTC
OK, so i can confirm the nightly appimage build does read the metadata. I assume it's an issue with a dependency from debian. Is there any easy way to make digikam build use mostly vendored libaries a la the appimage? For now i'm just saving metadata to sidecars with exiftool so I can see it in DK, so I have a workaround
Comment 6 caulier.gilles 2020-09-26 04:05:09 UTC
> I assume it's an issue with a dependency from debian.

No, it's not. We use libraw to parse CR3 files metadata, and libraw code is in digiKam core.

The CR3 metadata entries are re-routed to Exiv2 with an internal code from digiKam, an it do not depend of a specific Exiv2 version. So it must work as well.

the rest is Qt5 to sow information in GUI. Nothing special here.

Q : did you put something special in type mime settings in digiKam setup panel ?
There is a difference about CR3 files which have XMP sidecar or not ?

Gilles Caulier
Comment 7 K D Murray 2020-09-26 04:18:16 UTC
> did you put something special in type mime settings in digiKam setup panel ?

Not that I can find. I've checked:

Configure Digkam -> Views -> Mime Types: no text in any "extra image/video/audio files" text boxes, and cr2 and cr3 are in the currently supported image list

Configure Digkam -> Metadata -> Sidecars: both read and write to/from xmp files are enabled, writing to xmp is for read-only item only.

Is there anywhere else I should look?


> There is a difference about CR3 files which have XMP sidecar or not?

Unless I make an XMP sidecar with exiftool which contains the full metadata from the CR3, there is no difference between CR3 files with or without XMP files.
Comment 8 K D Murray 2020-09-26 04:19:40 UTC
Oh, i forgot to say that there are also no notes about metadata when the qt debugging logs are enabled, so no hints from that either.
Comment 9 Maik Qualmann 2020-09-26 08:32:59 UTC
The EOS R5 RAW is not supported by libraw at the moment. The loaded image in the Image Editor is broken. Darktable cannot open it either.

Maik
Comment 10 caulier.gilles 2020-09-26 09:09:39 UTC
Well seen Maik...

Kevin, please report again to libraw team the CR3 EOS R5 support wish, and don't forget to provide Raw file samples...

Best

Gilles Caulier
Comment 11 K D Murray 2020-09-27 23:57:06 UTC
Looks like broken CR3 from EOS R5/R6 is a known issue for libraw, with fixes in the pipeline. It appears the author of the new CR3 decoder is keeping it private for now, but will be in the next released version of libraw (I hope).

https://github.com/LibRaw/LibRaw/issues/317#issuecomment-671383514

https://github.com/LibRaw/LibRaw/issues/317#issuecomment-674831840

Cheers,
Kevin
Comment 12 caulier.gilles 2020-12-28 10:34:24 UTC
Git commit 86f907da7edaa01bbb519ddd1da871ac65b773f6 by Gilles Caulier.
Committed on 28/12/2020 at 10:32.
Pushed by cgilles into branch 'master'.

Update internal Libraw to last 0.20.2 to imporve metadata extraction from Exif and Xmp
https://www.libraw.org/news/libraw-0-20-2-Release
Related: bug 320039, bug 403267

M  +1    -0    NEWS
M  +39   -0    core/libs/rawengine/libraw/Changelog.txt
M  +3    -3    core/libs/rawengine/libraw/libraw/libraw_types.h
M  +1    -1    core/libs/rawengine/libraw/libraw/libraw_version.h
M  +12   -2    core/libs/rawengine/libraw/samples/dcraw_emu.cpp
M  +1    -1    core/libs/rawengine/libraw/samples/raw-identify.cpp
M  +7    -2    core/libs/rawengine/libraw/src/decoders/kodak_decoders.cpp
M  +2    -1    core/libs/rawengine/libraw/src/decoders/unpack_thumb.cpp
M  +5    -2    core/libs/rawengine/libraw/src/libraw_datastream.cpp
M  +1    -1    core/libs/rawengine/libraw/src/metadata/identify.cpp
M  +2    -1    core/libs/rawengine/libraw/src/metadata/makernotes.cpp
M  +34   -32   core/libs/rawengine/libraw/src/preprocessing/raw2image.cpp

https://invent.kde.org/graphics/digikam/commit/86f907da7edaa01bbb519ddd1da871ac65b773f6
Comment 13 caulier.gilles 2021-04-24 03:23:13 UTC
With next digiKam 7.3.0, a new ExifTool based metadata viewer have been introduced, and Exiftool support fully CR3 file format (Exif, Makernotes, etc..).

See the screenshot taken with your CR3 sample :

https://imgur.com/1F8sklz

Gilles Caulier