CaptureTime to Exif

Status
Not open for further replies.

CloudedGenie

Member
Premium Classic Member
Joined
Mar 7, 2017
Messages
69
Location
South Carolina, USA
Lightroom Experience
Intermediate
Lightroom Version
I've been trying every trick I can think of to rename my files using sub-second data (other than renaming it outside of Lightroom and then re-importing it). Although most of my photos are not at that high a rate, I have quite a few high rate bursts from four-wheel drive action shots. I am using a date and time based naming convention (that helps me sort the DSLR and GoPro and Phantom and iPhone photos in Explorer as well as Lightroom).

However, the random three-number additions to the "duplicate" file numbers in the same second are driving me crazy. I know there is no rational reason for the file names to be the same length, but they just have to be!

I came up with the idea to use the CaptureTime to Exif plugin to write the time string, including the sub-seconds, to a field that I can access from the file renaming template (and for now I decided on the Headline). However, I can for the life of me not get the command line to work (on either the .NEF or the .JPG files.

I am using the following command line, hoping that it would always give me a three-digit subsecond string added to the timestamp. However, after executing it, there is nothing in the metadata or in Lightroom...

-d %Y%m%d_%H%M%S "-Headline<${subsectimeoriginal;$_.=0 x(3-length)}"

Please help - or let me know if there is an easier more elegant way to achieve this :)
 
To be honest, I don't think this is a job for this plugin. But one step you may be missing is to read the metadata back into Lightroom. The plugin can also be debugged by running its Exiftool commands from a command line with the -k switch. But I wouldn't use the plugin.

One odd thing is that my Search and Replace plugin is usually the one people use for tricky file renaming. Maybe that gave you the idea.

So are the subseconds shown in the metadata, in an EXIF field? If so, I may be able to quickly adapt one of my scripts to populate the headline. This will be the more elegant and less frustrating way forward.

John
 
Thanks for the reply, John.

I've tried reading the data back into Lightroom, to no avail... The "change" does not appear in the EXIF data. I also have a license for your other plugin, so if there is an easy way to use it, I'm all ears / eyes...

The subseconds appear in the EXIF data (when viewed using Jeffrey Friedl's Metadata Viewer), as part of these time stamps:
Sub Sec Time (for ModifyDate)
Sub Sec Time Original
Sub Sec Time Digitized

It does not need to be transferred specifically to the Headline field, I just need the value in any field that I can access from the Lightroom rename template builder. If there is a more appropriate field, I am open to suggestions!
 
Sorry, my question was unclear. I didn't mean in the file, but in Lightroom. So In Lightroom's Metadata panel, are the subseconds visible in the EXIF?
 
John, none of the subsecond fields show up in Lightroom when viewing the list of Metadata items showing "EXIF" or even "All Possible Items"...
 
I've been looking into this and think I now see the problem and what you are doing. So I shot a sequence of pics at 5fps panning the camera from left to right (so I could see the exact order of the pictures) and imported them without any renaming. Initially Lightroom sorts them perfectly. Added Order displayed them in the correct sequence, and Capture Time order was the same.

I then tried renaming and used a scheme like this YYYYMMDD HHmmSS. This caused two problems:
  • Subseconds are ignored, so the first image is named 20170401 1109 37.RAF but the second was named 20170401 1109 37-6.RAF, the third was named 20170401 1109 37-7.RAF etc. Even if subseconds are ignored, why start the sequence at 6?
  • When I sorted by Capture Time, the images were displayed in Filename order. It looks like this is a fallback because of whole rather than subseconds. I guess the underlying SQL is "order by time, filename".
Until Adobe decide to handle subseconds, I think one must rely on external tools as you have tried. So I would initially suggest something I mentioned in my first reply, the -k switch. When you run the command line (which should include the path to Exiftool as well as your arguments), add a space and -k. This should keep the window open and allow you to read whether the command completed or why it failed.

John
 
So I made some progress.

I managed to write the sub-seconds into the Headline field for the In-Camera jpg files, but it would not transfer for the NEF files. I then told the plug-in to write the information to the NEF file directly, and then when I deleted the xmp file, I could get the updated Headline into Lightroom when I read the metadata back from the file. This meant I could successfully rename all the files in my test folder using sub-seconds! :cool: It is done in a ridiculously roundabout way, and it will take me ages to do this folder by folder, but it works! :thumbsup:

However, I would much prefer writing this information to the xmp file only and then importing it, without having to touch the NEF file. This also means I would not lose the pitiful amount of keywording and entering location information that I have already done.

Any idea why the plugin does not update the xmp file when I tell it not to write to the NEF file?
 
Any idea why the plugin does not update the xmp file when I tell it not to write to the NEF file?

No, it should work as you have expected. Because you're writing an IPTC field, Headline, writing to the sidecar should work and Lightroom itself would prefer data in the sidecar to any data in the NEF. You could always try the debugging method which involves a command line and the -k switch.

One thought is whether it's really necessary to rename to the second. My own renaming scheme is YYMMDD_1234 where 1234 is a 4 digit sequential number for the day, and others include the original filename. So sorting by capture time or filename is always reliable.

John
 
As my profile picture indicate, I achieve computer stuff pretty much by trying everything I can think of, until something works... I have been contemplating changing my naming scheme, but since I usually use more than one camera, and usually but not always shoot RAW+JPG on my Nikons, that became too hard. It would have been awesome if I could have accessed the shutter count in Lightroom for renaming...

I have managed to get the XMP file written, using the following manual command string in the Capture Time to Exif plugin:

"-Headline<${subsectimeoriginal;$_.=0 x(3-length)}" -o %d%f.xmp

(it's not that simple) and then copying the command line and executing that with the -k switch. That told me that I could not use the -o option with the -overwrite_original_in_place option. The -overwrite_original_in_place option is added by the plugin. When I removed that from the command line, so that it became

".......\jbcapturetimetoexif.lrplugin\exiftool.exe" "-headline<${subsectimeoriginal;$_.=0 x(3-length)}" -o "%d%f.xmp" "......Test\JvR-20141223-064922.NEF" -X -m -k

This created the XMP file (with only the Headline tag). I could then read the metadata from the file and that updated only the Headline field in Lightroom, without having to touch the RAW file.
Is there a way I can tell the plugin not to add that option, or perhaps modify my command line to achieve the same?
 
Status
Not open for further replies.
Back
Top