Main Menu

Recent posts

#1
Newbies / Re: How to extract the content...
Last post by StarGeek - May 21, 2024, 09:36:00 PM
While trying to make this config file (which is no longer needed), I run exiftool to find all my mp3s that had UserDefinedText. I just ran 12.85 against those and didn't see any obvious problems

Example output with 12.85
c:\exiftool -G1 -a -s -userdefined:all -@ temp.txt
<snip...>
======== Y:/Music/Music/Sorted/Albums/Journey/Greatest_Hits/01-Only_the_Young.mp3
[UserDefined]   MusicBrainzTRMId                : e5d018af-3a9d-4ed9-9593-a7b0b63c4579
[UserDefined]   MusicBrainzArtistId             : abd506e1-6f2b-4d6f-b937-92c267f6f88b
[UserDefined]   MusicBrainzAlbumId              : 43ca7ac8-bd36-4468-bab4-004a9a34de66
[UserDefined]   MusicBrainzAlbumType            : compilation
[UserDefined]   MusicBrainzAlbumStatus          : official
[UserDefined]   MusicBrainzAlbumArtistId        :
[UserDefined]   MusicBrainzAlbumReleaseCountry  : US
#2
Newbies / Re: How to extract the content...
Last post by Phil Harvey - May 21, 2024, 08:58:39 PM
I'm tweaking this a bit, so some tag names may be different for version 12.86.  Specifically, some underlines in tag names may be removed in favour of camel case.

- Phil
#3
Newbies / Re: Padding numbers
Last post by StarGeek - May 21, 2024, 07:46:16 PM
Ooops, I didn't look closely enough at the rest of it.  I just saw the quotes.
#4
Newbies / Re: Padding numbers
Last post by Phil Harvey - May 21, 2024, 07:31:19 PM
I don't see how your track sprintf expression will work.

Try this:  ${track;$_=sprintf("%02d",$_)}

- Phil
#5
Newbies / Re: Padding numbers
Last post by StarGeek - May 21, 2024, 07:11:04 PM
You have to do the same thing with the quotes as you did in the Perl command, single quotes outside, double quotes inside. That is assuming you're using Mac/Linux.

exiftool -r -ext mp3 '-testName< ${track;sprintf("%02d")} - ${title;}.%e' file

Or escape the interior quotes... at least I think that would work
exiftool -r -ext mp3 '-testName< ${track;sprintf(\'%02d\')} - ${title;}.%e' file

Another option using the Perl Repetition Operator x, no other quotes needed
exiftool -r -ext mp3 '-testName< ${track;$_=0 x(2-length).$_} - ${title;}.%e' file
#6
Newbies / Padding numbers
Last post by Juanca1944 - May 21, 2024, 05:42:22 PM


Hello everyone,

Thanks to finding this wonderful tool, I started reorganizing my music collection. Now I have the possibility to have the correct title and also add the track number, but there are several formats: 3, 03, 3/18, and I want to normalize them to the 03 format, meaning with a leading 0 if necessary.
 
This works in Perl: perl -e 'printf "%02d\n", 3', but when I try to use it with exiftool, I get an error
exiftool -r -ext mp3 '-testName< ${track;sprintf('%02d')} - ${title;}.%e' file
"Warning: Numeric variables with more than one digit may not start with '0' for 'track'",
and I haven't been able to find a solution.

I appreciate anyone who can help me.

Best regards.
#7
Newbies / Re: MeteringMode seems to be w...
Last post by StarGeek - May 21, 2024, 04:08:06 PM
Use the command in FAQ #3 as your base command so you can see all the tags with that name and the groups they belong to.

exiftool -G1 -a -s -n -MeteringMode /path/to/files/

MeteringMode can appear in several different groups, include the Makernotes from different cameras. It's quite possible that without the -a (-duplicates) option you are seeing the MeteringMode from a different group.
#8
Newbies / MeteringMode seems to be wrong
Last post by PaulPanter - May 21, 2024, 03:39:04 PM
If i use PHP with exif_read_data(), i get for some image the value 5 for MeteringMode. But with
exiftool "path/to/IMG_4667.jpg" -MeteringMode -n i get the value 3 for the same file. 5 is the correct value. Do someone have a idea, why this happens and i get the wrong value with exiftool 12.57?
#9
Newbies / Re: text output with each Regi...
Last post by StarGeek - May 21, 2024, 01:34:05 PM
Ooops, yeah, it needs to be RegionRectangle.

On top of that, the whole RegionInfoMP is such a bad format when it comes to the RegionRectangle.

The -sep option is going to be needed because RegionRectangle is four comma separated numbers and then exiftool will separate each entry by a comma. So it requres a rewrite of the FMT file
${RegionPersonDisplayName;$_=(split /##/)[0]}|${RegionRectangle;$_=(split /##/)[0]} $Filename
${RegionPersonDisplayName;$_=(split /##/)[1]}|${RegionRectangle;$_=(split /##/)[1]} $Filename
${RegionPersonDisplayName;$_=(split /##/)[2]}|${RegionRectangle;$_=(split /##/)[2]} $Filename
${RegionPersonDisplayName;$_=(split /##/)[3]}|${RegionRectangle;$_=(split /##/)[3]} $Filename
${RegionPersonDisplayName;$_=(split /##/)[4]}|${RegionRectangle;$_=(split /##/)[4]} $Filename

Using the above format file and -sep ##
C:\>exiftool -sep ## -G1 -a -s -p temp4.txt y:\!temp\Test4.jpg
Indiana Jones|0.7299916, 0.5606775, 0.0913558, 0.1152361 Test4.jpg
Marion Ravenwood|0.6800793, 0.3213397, 0.0537576, 0.0679942 Test4.jpg
#10
Newbies / Re: text output with each Regi...
Last post by Iwonder - May 21, 2024, 11:47:18 AM
@StarGeek
I tried so many things ! mostly using RegionRectangle, but I never get the 4 coordinates associated with the person name  :(
However $RegionInfoRegions only gives a dash for every line of the output file :(