Exiftool tags?

Advanced Renamer forum
#1 : 28/10-24 10:54
Bart Kestelyn
Posts: 9
Hello,
As I understand from another post, ExifTool seems to no longer be considered as a viable part of the renaming input. It was however the sole reason I chose this tool to do the renaming and ordering of my concert photo's: that I could organise and rename them according to exif values before adding them to my image processing software.
My cameras are set up to each set a specific prefix, identifying the body, but I have no control in-camera, over the number it appends to said prefix. Instead, it's a rolling counter up to 9999, after which counting restarts from zero. To minimise the risk of duplicate filenames, I use the following script to move into YYYY/MM/DD folders per filetype, taking the original folder name along, as it's the band, and renaming the file to prefix_shuttercount.ext, based on ExifTool tags.
As you see by the commented lines, I've already found some substitutes for some ExifTool tags, but the absence of shuttercount is a blocking issue for me ...

//date = app.parseTags("<ExifTool:DateTimeOriginal>").split(/[_ ]/);
date = app.parseTags("<DateTimeOriginal>").split(/[_ ]/);
//EXT1 = app.parseTags("<ExifTool:FileTypeExtension>");
EXT1 = app.parseTags("<Ext>");
EXT2 = EXT1.toUpperCase();
folder = app.parseTags("<DirName:1>");
Y = date[0];
M = date[1];
D = date[2];
h = date[3];
m = date[4];
s = date[5];
prefix = item.name.substr(0,4);
counter = app.parseTags("<ExifTool:ShutterCount>");
item.newName = prefix + counter;
item.newPath = "N:\\" + EXT2 + "\\" + Y + "\\" + M + "\\" + D + "\\" + folder;
return item.newName;
#2 : 28/10-24 12:40
Kim Jensen
Administrator
Posts: 931
Reply to #1:
That is a hasty conclusion. ExifTool is still a usable external tool from the perspective of Advanced Renamer. But it is, and has always been an external tool, with the pros and cons associated with that design. You can still use ExifTool as part of your batch processing as you have always been doing.

That said, Advanced Renamer 4 has native support for many more file formats and metadata values without the use of ExifTool or any other external libraries. The benefit is much faster processing and that I can offer more control over the output.

I don't know the metadata value ShutterCount. It is not part of the EXIF spec. What filetype are you renaming? Is it a raw camera photo format? Advanced Renamer has support for some, but not all of them. Also, some camera makers are saving additional metadata in special (often undocumented) data structures. The creators of ExifTool has been very good at reverse engineering these.
#3 : 28/10-24 14:09
Bart Kestelyn
Posts: 9
Reply to #2:
Hello,
I completely understand that it is external to your program, and that specifically catering to it is beyond your scope.
The issue I'm facing is that on my PC, in version 4.05, the ExifTool group in the Item Details shows no data, so I can't access any of its results. I'm shooting NEF + JPG using Nikon D750 + D500. I've looked at the metadata in XnView, and ShutterCount is indeed in the "MakerNotes" part of the meatadata retrieved by ExifTool.
Can I somehow trigger ExifTool from the renaming script or so?
#4 : 28/10-24 16:43
Styb
Posts: 122
Reply to #1:
Hi, the shuttercount tag is not missing, I have downloaded a sample of a nef image and I have found the tag shuttercount in the exiftool.

https://i.postimg.cc/VNVRQ8LV/Img63.png
#5 : 28/10-24 18:29
Delta Foxtrot
Posts: 339
Reply to #4:

Well, I just have to stick my big fat nose in here.

For what it's worth, I found and downloaded some NEF raw files from a D800, and in v4.05 <Exiftool:Shuttercount> works as expected, and shows up in the information panel as well. That proves nothing conclusively except that v4.x does find and use Exif data from some cameras, which I/we already knew. Are you using the latest version of Advanced Renamer? If you load 3.95 (portable) can you still use the Exif data (and by extension run your original script?) in that version.

Please excuse me, I'm just thinking out loud on the keyboard.

Best,
DF
#6 : 28/10-24 21:29
Kim Jensen
Administrator
Posts: 931
Reply to #3:
Advanced Renamer does not have native support for metadata values stored within any MakerNote structure. You will have to use ExifTool for that. I don't think any tool has better support for MakerNote than ExifTool.

Buuuuut ... I have spent the last couple of hours learning how MarkerNotes are stored, and I have successfully added support for some values (including ShutterCount) from Nikon cameras, to be released in version 4.06. I don't know if all Nikon cameras are supported by this, or if there are more variations to consider.
(note, I have not added MakerNote support for any other camera vendor).
#7 : 30/10-24 12:27
Bart Kestelyn
Posts: 9
Reply to #4:
The issue I seem to have (and that was also reported in another thread) is that ExifTool doesn't seem to reliably start up with Advanced Renamer 4.05, rendering unavailable all specific ExifTool-tags
Called from a command-line or within a different tool, the value is indeed still being retrieved by ExifTool, I just can't see it anymore since upgrading to 4.05 ;-)
#8 : 30/10-24 12:29
Bart Kestelyn
Posts: 9
Reply to #5:
I've indeed set up the portable version of 3.95, and that still works as before.
In my installation of 4.05 ExifTool doesn't seem to load ...
#9 : 30/10-24 12:29
Bart Kestelyn
Posts: 9
Reply to #6:
Thanks!!!
#10 : 30/10-24 16:08
Kim Jensen
Administrator
Posts: 931
Reply to #8:
It can sometimes take some time to load ExifTool and if it times out, it will not work at all during the current Advanced Renamer session. Version 4 will load the tool at bootup, while version 3 will not load ExifTool until it is needed. This can result in slightly different behaviour.

The timeout in version 4.05 is 8 seconds, which should be enough, but might not be in some cases. For version 4.06 I am increasing it to 15 seconds. Because the program waits until ExifTool is loaded, I do not want it to be longer than this. ExifTool really cool, but unfortunately it can also be very slow at times, which is why I want Advanced Renamer to use it as little as possible.
#11 : 31/10-24 14:50
Bart Kestelyn
Posts: 9
Reply to #10:
Just out of curiosity: does loading ExifTool at startup give you advantages further down the line compared to the v3 approach of loading it on-demand?
#12 : 01/11-24 13:12
Kim Jensen
Administrator
Posts: 931
Reply to #11:
I would say so. It gives more consistent performance results, because the first call to ExifTool takes significantly longer than later calls within the same program session.

When using an ExifTool-tag in version 3, the program will run ExifTool for every file in the list. Version 4 will only run it for the files types that are supported by the tool. The first call to ExifTool will retrieve a list of supported file extensions, which are used to determine which files will be included when running the tool.

I have added native support for many file formats myself, by reading the specs and writing the code for each format, but I am still missing a couple of popular ones, like PDF (the spec is 1300 pages, yikes!). For those missing formats, ExifTool is used to fill the gaps, until native support is added in a later version. When all popular file formats are added, the need for ExifTool will be limited, and the problems related to integrating to it, will also be of less annoyance.