Canon CR3, exiv2, rapid issues on Ubuntu 20.04

FYI

In order to move with the time I downloaded, compiled and installed the latest versions of LibRaw, Exiftool and exiv2.

Wrote a script to generate the thumbnails of CR3 files for nautilus etc (based on extracting them from the CR3 file using exiv2). Works nicely.

Started another Rapid session again and it produced errors like:

2023-02-19 20:22:41 WARNING rpdfile.py 898: Could not read metadata from /media/…/101CANON/IMG_0358.CR3. GExiv2: /media/…/Canon/rpd-tmp-u2x7m0_k/r09jW.cr3: The file contains data of an unknown image type (11)
2023-02-19 20:22:41 ERROR renameandmovefile.py 793: Failed to generate subfolder name for file: IMG_0358.CR3
etc

Traced GExiv2 which is a kind of wrapper around exiv2. Finally, looking at the error, changed in line 862 to:
force_exiftool: Optional[bool] = True,

I have not found why it went wrong with exiv2 as I can see all the tags and previews.

Copy and pasted from the documentation:

Read photo metadata using only ExifTool: To read photo metadata (including image thumbnails), the default is to use Exiv2, relying on ExifTool only when Exiv2 does not support the file format being read (e.g. Exiv2 cannot read CR3 files).


Regarding using a self-compiled version of exiv2, you need to ensure that gexiv2 is using your compiled version, not the system version. You need to figure out how to do that.

Exiv2 does support cr3 metadata as of several months ago. But I suspect that RPD doesn’t try and use it yet?

Rapid Photo Downloader has supported using exiv2 to read CR3 metadata for as long as exiv2 has supported it. Of course, the version of exiv2 the Linux distribution supplies will need to be new enough (you know that, but perhaps not everybody reading this does).

1 Like

Ah thank you! I must have missed that (and in the documentation as well)!

Sorry to have bothered you.

Although libexiv2.so points to libexiv2.so.27 which in turn points to libexiv2.so.0.27.2, the new version is libexiv2.so.0.27.6 and the names in it (including arguments) are not compatible with the system one. That is unfortunate.

As I can see all the metadata using exiv2 (including the embedded previews) I was under the impression that rapid would simply call exiv2. I am not familiar with meson etc (I only see “Run-time dependency exiv2 found: YES 0.27.2”) so I am going to mess around with the system further.