Best way to naming RAW-files

Started by Jom, July 14, 2019, 09:15:11 PM

Previous topic - Next topic

Hayo Baan

Interesting! Some remarks.

You will definitely have to add subseconds to the time to make that part more unique.
The serial number is good to use, but unless you think you will have shots from multiple versions of the same camera model, an abbreviated form of the model name would suffice and is much shorter.
I don't see why you need the original image file name in the name. It adds 8 characters which really don't tell you much (unless it is to fix the time problem I mentioned, but you can use the subseconds for that).
Hayo Baan – Photography
Web: www.hayobaan.nl

tim_rylance

QuoteI don't see why you need the original image file name in the name. It adds 8 characters which really don't tell you much (unless it is to fix the time problem I mentioned, but you can use the subseconds for that).
I always keep the original out-of-camera files in case I (or my software) make a complete mess of the time adjustment and geotagging. Keeping the original image file name as part of the new name is then the most reliable route back to the original file if I ever need to redo my processing.

Jom

QuoteYou will definitely have to add subseconds to the time to make that part more unique.
I was thought about it. But the system should only consist of data that we can identify. Not all cameras write seconds and if the camera does not record seconds, we will not be able to restore them. For example, not all cameras write time zone, but we ourselves know what time zone it is and can add he.

QuoteThe serial number is good to use, but unless you think you will have shots from multiple versions of the same camera model, an abbreviated form of the model name would suffice and is much shorter.
The system takes into account the worst situation when shooting is conducted on several cameras synchronously and serially, and part of these cameras of the same model. If your situation isn't that complicated. you may not use the serial number (1. Rules are not strict and are only basis, the system can be changed at your own risk if necessary.).
The system is initially made as wide as possible (but not excessive), so you do not have to finish it, but only simplify for yourself, if necessary.

QuoteI don't see why you need the original image file name in the name. It adds 8 characters which really don't tell you much (unless it is to fix the time problem I mentioned, but you can use the subseconds for that).
I already wrote, why cannot be use subseconds.
Remains there is only one parameter that can support the uniqueness of the file name — this is its first name, about uniquenes of which is taken care of by the camera itself.
In addition, you can save the file name in metadata, but uses only part of it.
IMG_0541 -> 0541

Jom

QuoteI always keep the original out-of-camera files in case I (or my software) make a complete mess of the time adjustment and geotagging. Keeping the original image file name as part of the new name is then the most reliable route back to the original file if I ever need to redo my processing.
Thanks, good argument. Force majeure circumstances currently have not been canceled.

Jom

Stumbled upon such a site. Maybe someone will come in handy.
dpbestflow.org

stephane-gourichon

Thank you Andrei for raising this interesting topic.
Thank you also for the link to dpbestflow

The addons below are based on my experience with Nikon cameras.

* If your camera writes it, you can use the ShutterCount field as a complement, or even an alternative to subsectimeoriginal field. In practice I no longer include subsectimeoriginal.
* Since the beginning of my workflow I took precaution of, like tim_rylance, keeping the original file name as part of the new file name. More than once I used the "rename" command with a regexp, or a sed-based bash command line to rename files back. But it makes scripts a little more complicated if you want the forward rename operation to be idempotent (which means "be a no-op if works was already done"). exiftool syntax %-8f came in handy in that case.
* I prefer when the file name can be completely regenerated from the file content. But the original file (or even part of it) is not in metadata written by Nikon cameras.

I'm working on a workflow refinement where original file names are recorded associated with a hash of the content (for example with md5sum or sha*sum commands) in additional files. This way, the original file name is still preserved, but externally, thus does not consume any character in current name.

All in all, I now use this command:


exiftool -v '-FileName<${datetimeoriginal}_${shuttercount}.${filetypeextension}' -d %Y-%m-%d_%H.%M.%S somefiles


Which produces files like 2019-05-18_21.45.11_43664.nef

I would add camera serial number when needed.


Extras

When several cameras shoot the same event, it is still the norm that not all have clocks properly set. When making a unified stream of photos, the usual disorder happens.

My workflow refinement will include a program (I started it, it works perfectly but only covers the basic functionalities) that can automatically rename a bunch of files with proper timestamps based on hints. A good and relatively easy to obtain hint is to have all participants take a photograph of a common object that shows time, for example your watch. If not done the same day (for example, participants contact you later), you can ask them to *not* change their camera clock but take a photograph of their browser showing https://time.is/ and send it via e-mail.

Regards.

Jom

Thanks Stephane.

QuoteBut the original file (or even part of it) is not in metadata written by Nikon cameras.
You mean the file name?

stephane-gourichon

Quote from: Andrei Korzhyts on August 02, 2019, 04:29:34 PM
Thanks Stephane.

QuoteBut the original file (or even part of it) is not in metadata written by Nikon cameras.
You mean the file name?

Yes, the file name. When original file name looks like DSC_1234.JPG or NEF/MOV. There's nothing like 1234 in the metadata. The shuttercount is there, but not correlated (mine has 5 digits). That said, the shuttercount in itself is better than the four-digit number if only because it is unique per device.


Here is a more complete command line that I may use:


exiftool -v '-FileName<${datetimeoriginal}_${Model;s/[^a-zA-Z0-9]/-/}_${SerialNumber}_${shuttercount}.${filetypeextension}' -d %Y-%m-%d_%H.%M.%S *.nef *.jpg


Again, the ";" syntax in exiftool comes in handy to adjust the camera model name and flatten it to a valid filename.

Jom

#23
I have been thinking about the problem of naming photo files for a long time and a lot. My modest business depends on it. My desire for order forces me to create this theory.
Now it is called «ТЕОРИЯ И ПРАКТИКА ИМЕНОВАНИЯ RAW-ФАЙЛОВ ФОТОГРАФИЙ» (THEORY_AND_PRACTICE_OF_NAMING_RAW_FILES_OF_PHOTOS).

Here are my main conclusion I came to:
It is impossible to create one for all action plan for naming files.
I do not create a ready-made solution, but a universal algorithm that can be adapted to create a solution for your needs.

This is due to the boundless inconsistency between the camera manufacturers and the forced agreements that reality dictates to us.

I do not consider the following candidates for parts of the name and I giving reasons:
1. Subseconds.
They do not add informational content to the file name;
they do not consolidate uniqueness, only increase it;
they can be defined differently by the manufacturer (different fractions);
they are rarely written to the metadata.
2. Hash from content of file.
He do not add informational content to the file name and consumes space in the file name.

Option with photographing clocks interesting, clever and good, but only in controlled conditions and only with an accuracy of one second.
However, this is good practical advice for many cases.

Skids

Hi,
I have just joined the forum, so thats my excuse for posting to an older topic.  I have just spent this Christmas holiday writing a utility application to rename and copy camera raw files.  I'm not as concerned about creating a file name that is unique in the universe but I want them to be unique to me and most likely unique in the world.

I have adopted the following structure :  SQL date _ Shoot time _ Shoot Name _ KeyWord _ Original Camera Name . Extension

For example a raw file named p1234567.rw2  is renamed 20191217_164520_Didcot_Joe_McNally_p1234567.rw2

This works for me because I only use a single camera on a shoot.  If I were using more than one camera then I would think about adding an additional discriminator.  This could be as simple as "Cam1" or "Cam2".  No spaces or other harmful characters allowed.

I believe that "uniqueness" is all a question of odds versus complexity.  My solution works for me and produces filenames that are unlikely to be duplicated by other photographers even if they were on the same shoot.  If I were shooting from orbit I would add the mission name e.g.  _Apollo_11_ or STS45, not that I see it being a problem for many people.

just my two pence

best wishes

Skids

Phil Harvey

My two cents:  If you are just looking for something unique, then you could use the ExifTool NewGUID tag.  But this tag is based on the current date/time, and not the date/time of 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

I'm going for a long time to this and now this is possible for using.

Порядок именования фотографий (ПИФ)
Naming order of photos (PIF)
pif.afoteris.com