Hi.
I'm trying to geotag and sort photos at the same time but got an error:
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in File:Geotime (ValueConvInv) - /Volumes/LUMIX/DCIM/myfilename1.jpg
Without -geotag "~/Desktop/*.gpx" it work as I expected. The same happen when I only geotag photos without moving them .
Here is cli:
exiftool -geotag "~/Desktop/*.gpx" -ext JPG -r /Volumes/LUMIX/DCIM/ -d "%Y_%m/%d" '-directory<'~/Documents/tst'/${Exif:DateTimeOriginal}/${MakerNotes:LensType;}/${Composite:GroupName;}'
Here is .exiftoolconfig
%Image::ExifTool::UserDefined = (
# Composite tags are added to the Composite table:
'Image::ExifTool::Composite' => {
GroupName => {
Desire => {
0 => 'FileName',
1 => 'DriveMode',
2 => 'SequenceNumber'
},
ValueConv => '
$val[1] =~ /\d+\s(\d+).+/;
my $myindex = $1;
$myindex = $val[2] if (defined $val[2]);
if ($myindex>0) {
#print $myindex. "\n";
$val[0] =~ m/^(.{2})(\d+)/;
my $startIndex=$1 . ($2 +1 - $myindex);
$startIndex;
}'
},
# **** ADD ADDITIONAL COMPOSITE TAG DEFINITIONS HERE ****
},
);
My first guess is that the -d option is messing up the time format for the geotag. What happens when you use the command without the -directory part but with the -d option?
edit: It took me a few minutes to test, as I don't use geotagging option directly (Geosetter FTW), but yes, it appears the -d option is overriding the time data in the gpx file. I faintly recall seeing the problem before in the forum but can't find the post.
StarGeek is correct. -geotag implies "-Geotime<DateTimeOriginal" unless otherwise specified, which requires a properly formatted DateTimeOriginal. Try specifying an unformatted DateTimeOriginal, like this:
exiftool -geotag "~/Desktop/*.gpx" "-geotime<datetimeoriginal#" -ext JPG -r /Volumes/LUMIX/DCIM/ -d "%Y_%m/%d" '-directory<'~/Documents/tst'/${Exif:DateTimeOriginal}/${MakerNotes:LensType;}/${Composite:GroupName;}'
(perhaps I should make this the default)
- Phil
Quote from: Phil Harvey on December 06, 2016, 07:49:13 AM
(perhaps I should make this the default)
- Phil
It would be nice to show such an example in help page because I spent too much time trying to make it work before posting this question.
An additional question: How to suppress warning messages like this one:
"Warning: Time is too far before track in File:Geotime (ValueConvInv) - /Volumes/LUMIX/DCIM/102_PANA/P1000000.RW2"
But not all of them.
Thanks.
You can't suppress just a single warning tag. -m suppresses only minor warnings, and -q -q suppresses them all.
I'll update the documentation and make DateTimeOriginal# the default for the next release.
- Phil
Thanks
Found something I haven't expected.
exiftool -copyright='A A' -Artist='____@GMAIL.COM' -progress -geotag "~/Desktop/gpx/*.gpx" "-geotime<datetimeoriginal#" -d "%Y_%m/%d" -ext ORF -ext CR2 -ext NEF -ext RW2 '-directory<'$nas'/${Exif:DateTimeOriginal}/${LensShort;}/${Composite:GroupName;}' -r "$1"
exiftool -copyright='A A' -Artist='____@GMAIL.COM' -progress -d "%Y_%m/%d" -ext ORF -ext CR2 -ext NEF -ext RW2 '-directory<'$nas'/${Exif:DateTimeOriginal}/${LensShort;}/${Composite:GroupName
;}' -r "$1"
exiftool -copyright='A A' -Artist='____@GMAIL.COM' -progress -api largefilesupport=1 -ext MP4 -d "%Y_%m/%d" '-directory<'$nas'/${Exif:DateTimeOriginal}/MP4/' -r "$1"
It used to MOVE files but right now it does COPY.
exiftool -ver
10.36
I think that since you are changing the file, the original is preserved. If that's the cause then simply adding -overwrite_original should fix it. Another cause could be that you do not have write permissions in the directory (but I think it is my first assumption).
Solved with "-overwrite_original"
Just FYI, this is explained in the Notes section here (https://exiftool.org/filename.html#Notes).
- Phil