Main Menu

XMP into CR2

Started by Jom, February 02, 2020, 02:32:22 AM

Previous topic - Next topic

Jom

Hi.

Can I put data from XMP in CR2 and save the settings variants?

I truing

exiftool -tagsfromfile 123.xmp 123.cr2

but this command does not save the settings.

Hayo Baan

This should be the command to use, I think. What settings is it not saving? Can you share an example?
Hayo Baan – Photography
Web: www.hayobaan.nl

Jom

Editing variants are not saved.
I circled them in a red rectangle in the screenshot.
Only the active variant is saved, others are not.

Hayo Baan

Interesting, just tried this myself and you're correct; the saved settings in XMP:XMP-crss are not included.

@Phil, is there a reason for this?
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

The XMP crss settings are not saved because it would be a real pain in the ass to add write support for this.  This is a deeply nested, complex and undocumented set of properties, and adding this ability would be of limited use because you can already copy the XMP as a block if you really need to do this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Jom

#5
I'm trying to gather information about XMP bit by bit and found that not all file formats support XMP and therefore a sidecar xmp-file is created in these cases next to the main one (.cr2).
This is done to avoid corruption the data in the main file (https://helpx.adobe.com/lightroom-classic/help/metadata-basics-actions.html "...To avoid file corruption, XMP metadata is stored in a separate file called a sidecar file....").
Otherwise, it makes no sense to keep a sidecar xmp-file (but Adobe Camera Raw do it).
It turns out that not allowed support writing sidecar xmp into the main files.
Correct me if I'm wrong.

Phil Harvey

ExifTool allows you to write sidecar XMP files into the main files.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Jom

Yes, but without versions of editing.
And why does Adobe not do this, but write a sidecar file?

StarGeek

Quote from: Andrei Korzhyts on February 02, 2020, 11:29:48 PM
I'm trying to gather information about XMP bit by bit and found that not all file formats support XMP and therefore a sidecar xmp-file is created in these cases next to the main one (.cr2).
This is done to avoid corruption the data in the main file (https://helpx.adobe.com/lightroom-classic/help/metadata-basics-actions.html "...To avoid file corruption, XMP metadata is stored in a separate file called a sidecar file....").

Both of these points (files not supporting and not writing to avoid corruption) are a bit of a photographer's myth.  Exiftool has shown for that it is possible to do so safely for about a decade.

The problem is that it isn't necessarily easy to do so and it's been shown many times that even big companies (looking at you, Nikon) can screw it up regularly.  That doesn't consider individual programmers who may not be experienced with the subject of metadata in the first place.  So most people/companies don't even try allocate the resources/time needed to do so and just say "you can't do this".
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Jom


Phil Harvey

Quote from: Andrei Korzhyts on February 03, 2020, 07:15:14 AM
Yes, but without versions of editing.

As I mentioned, you can write the entire XMP sidecar file as a block.  So it would include crss information if that is what you mean.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Jom

QuoteAs I mentioned, you can write the entire XMP sidecar file as a block.  So it would include crss information if that is what you mean.

Can you give an example of a command?
I just started to dive into XMP (very difficult in English, there is almost nothing valuable in Russian), so explain in a few words what crss information is.

Phil Harvey

This can be done in various ways.  Here are 2 ways to do it:

1. exiftool "-xmp<=sidecar.xmp" FILE

2. exiftool -tagsfromfile sidecar.xmp -xmp FILE

crss information is Adobe Camera Raw Saved Settings.  ie. the raw conversion settings that you used to develop the image.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Jom

Thanks I will experiment with this.

Jom

I experimented and came to the conclusion that it is better not to do so.
If you then edit the file again, the editor, for example ACR, will again create a sidecar file and there will be duplication of data and a mess.