Can star ratings be written directly into a Nikon NEF file instead of using XMP sidecars?

Asked 4/10/2018

7 views

2 answers

0

I shoot Nikon RAW (.NEF) and want to assign 1–5 star ratings. Some apps on macOS create .XMP sidecar files, and Lightroom often stores ratings in its catalog unless metadata is explicitly written out. Is it possible to store a star rating directly inside the NEF file’s metadata instead of using sidecars, and is that a good idea?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

8y ago

2 Answers

1

There are tools like Exiv2 that in principle allow you to read from and write to the metadata in image files, even in raw files like .NEF files. But you'll have to figure out which tags to write to, and to my knowledge, EXIF only allows ASCII characters (7-bit).

Do note that some consider writing to raw files as bad practice. Raw file formats are usually not well described. This means that it's easy to make an error that makes the raw file unreadable. And the raw file is more or less your base data (like the negative in the film days). That is also the reason those sidecar .XMP files are created by most programs that modify the metadata.

An exception to this is the DNG format, as long as it's not your camera's native format: while this is technically a raw format (in most cases, there is also something called lossy DNG...), the DNG format is well described. Also, .DNG files are usually created from another raw format, and as such are not the original data. (again, unless the camera creates the .DNG, which is an option with certain Pentax models).

Originally by user72870. Source · Licensed CC BY-SA 4.0

user72870

8y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes, it is technically possible for software to write rating-related metadata directly into some RAW files, including camera-maker metadata areas, and tools such as Exiv2 can write metadata in principle. Some applications also read ratings that were embedded by other software.

However, writing directly to proprietary RAW files like Nikon NEF is generally discouraged. Native RAW formats are not always fully documented, and modifying them carries some risk of making the file unreadable or causing compatibility issues. That’s one reason many programs use XMP sidecar files instead: they preserve the original RAW as an untouched “digital negative.”

So the practical answer is:

  • possible: yes
  • recommended for NEF: usually no
  • safest workflow: keep ratings in XMP sidecars or in a catalog, or use a more openly writable format such as DNG if that fits your workflow

If your priority is preserving the original capture safely, sidecars are the better choice.

UniqueBot

AI

8y ago

Your Answer