Main Menu

Recent posts

#21
Why should this file not exist? There would be more severe consequences with other files, so if we refine your approach, ExifTool should do an integrity check over everything?
#22
Your post highlights the metadata chaos an app developer must deal with. exiftool has been a great help to rationalize this chaos. Example: -keywords tag works for all file types I deal with. But not JXL. Ideally, exiftool would make -keywords (and others) work transparently for all file types, or at least the relevant ones where users would naturally use keywords or tags to classify images. I hope I am not beating a dead horse here. Ideally, if -keywords is used for a JXL file, exiftool woud convert this to -subject. Ideally, the JXL standard would have kept -keywords instead of making arbitrary changes that make life for developers more difficult.

I will have to deal with it. Thanks for your help.
#23
Quote from: FrankB on Today at 01:56:47 AM
Quote from: ThankYou on Today at 01:26:42 AM@FrankB, I think your suggestion seems like it would be exactly what I'm looking for, but is that something that can be called via the exiftool terminal command?

No. GUI uses the GeoCode webservice to get the data (lat, lon, country, city etc) and ExifTool to update the files.

Ahhh, I didn't even know ExifToolGUI existed though so thanks for sharing. It looks like it will come in handy if not for this dilema.
#24
Swap the quotes. You're on Linux, so a dollar sign surrounded by double quotes is a shell variable, not an exiftool tag.

As an example, you would use this
-if '$filetype eq "PNG" '
#25
Quote from: ThankYou on Today at 01:26:42 AM@FrankB, I think your suggestion seems like it would be exactly what I'm looking for, but is that something that can be called via the exiftool terminal command?

No. GUI uses the GeoCode webservice to get the data (lat, lon, country, city etc) and ExifTool to update the files.
#26
I was trying to update -AllDates on a bunch of files and got the dreaded "Error: Not a valid PNG (looks more like a JPEG)"

It doesn't tell me which files have errored, so I want to broadly update files. I found several different commands I can use to do so, but then they aren't working right. I provided a screenshot of the commands and results.


First I'm showing the target folder with a single png file, 14.png

Next I'm making sure I isolate files with png extension, and print the FileType and FileTypeExtension, shows PNG and png as expected
./exiftool -ext png -filetype -filetypeextension /mnt/user/metadata/Andrew/time\ capsule/six\ flags\ pix/
I test an if statement for checking if the file is a JPEG, that fails as expected.
./exiftool -ext png -if "$filetype eq 'JPEG'" "-filename=%f.jpg" /mnt/user/metadata/Andrew/time\ capsule/six\ flags\ pix/
Then I test it again checking for PNG, but this also fails. Weird.
./exiftool -ext png -if "$filetype eq 'PNG'" "-filename=%f.png" /mnt/user/metadata/Andrew/time\ capsule/six\ flags\ pix/
So I try out another approach I found that doesn't use if statement, just applying the FileTypeExtension tag it has and it should just rename it to the same filename it already is... except it doesn't.
./exiftool -ext png "-filename=%f.$fileTypeExtension" /mnt/user/metadata/Andrew/time\ capsule/six\ flags\ pix/
I list the files in the folder again and see it renamed it to "14." without the extension.

So I have to manually mv the file to put the extension back on.

I don't think I'm doing anything wrong here. What gives?

Screenshot 2024-11-21 011301.png
#27
Thank you everyone for the comments. @FrankB, I think your suggestion seems like it would be exactly what I'm looking for, but is that something that can be called via the exiftool terminal command?

My use case is that I am reorganizing a large library of photos and images. I'm using exiftool to create an XMP sidecar for every image with the various meta data refactoring rules I've developed to suit my needs.

Ideally, I would like to include the city, county, state/province, and country metadata in the XMP file.

The challenge I've found with the geonames Gazetteer dataset (the one exiftool uses) is that population data is missing for a lot of cities so using the population filter on a larage diverse set of images has incosistent results, and it has nothing to do with exiftool directly.

I've tried to remedy this first by tweaking my exiftool geolocation settings to craft the output, and then by tweaking the build_geolocation settings to craft the dataset. My ultimate conclusion is that geonames dataset is just too inconsistent for my use case.

GeoNames provides a second Postal Codes dataset that lacks the population data, and is limited to cities and postal codes, and in my cursory review is much more consistent than the Gazetteer dataset. I've considered taking the Postal Code dataset, and then manually adapting it to the GeoNames Gazetteer dataset format, and then running the exiftool build_geolocation tool as-is to produce a postal code dataset that works with exiftool. The issue I perceive with this approach is that the geolocation function will return the postal code center nearest the images' GPS coordinates which may not be the actual postal code the image is located in. That's a compromise I'm willing to live with, but correctly representing the city location of the image is preferred.

I'm an exiftool newbie in the sense this is my first exiftool project, but I have tried to read as much of the resources as possible. Looking for feedback from the experts here.

Thanks in advance for all the help.
#28
This worked great! Thank you so much!
#29
Thank you very much.
The RunTimeValue is a tag that is present in the metadata of every apple photo I've come across and it usually consists in a very long number. Since it is a very long number, it is quite unique to each photo and it can be used like a fingerprint for images. Since the RunTimeValue tag can't be deleted, created or edited, I end up with all my non-Apple photos to have the same RunTimeValue tag, which make them appear fake if compared to one another, since that tag is very unlikely to be the same.
I think I will be the only one to ever ask for it, in case you can have a look at it and it is easy to make that tag writable I would be super grateful, otherwise it is not a problem since I'm already very satisfied with what I achieved, thank you!
#30
Metadata / Re: Question about wrong dates...
Last post by wlire - November 20, 2024, 11:32:47 PM
Quote from: StarGeek on November 20, 2024, 05:19:45 PM
Quote from: wlire on November 20, 2024, 04:11:50 PMSo instead of copying the system file modify date, can I just offset all the quicktime times 4 hours forward?

You can use the GlobalTimeShift option with -TagsFromFile

QuoteIn addition to this, I would like to preserve the existing system file modify date

Add the -P (-preserve) option.

Test this first, but the command would be something like
exiftool -P -GlobalTimeShift 4 -TagsFromFile @ -Time:All /path/to/files/


For some reason, when i have globaltimeshift set to 0 instead 4 it gives me the result I was looking for (dates are now in utc like the h11) however there is also an XMP tag created:
[XMP-xmp]       CreateDate                      : 2024:04:13 17:14:27
[XMP-xmp]       ModifyDate                      : 2024:04:13 17:14:27

Is there a way I can exclude this? And what would be the reason for the dates shifting by the correct amount when I put 0 instead of 4 for globaltimeshift?