2025-04-23: ExifTool 12.84 is now available
QuoteThat sounds like you didn't save the complete config file. Line 9675 in the code is checking for the the very last line of the config fileYou are right! My fault, the last line was missing for unknown reasons.
Quote from: FixEUser on Today at 04:48:34 AMThere are at least 3 problems with your script:
1) It doesn't return any other value then without -config join_tags_ID3-config
Quote2) It returns an error "join_tags_ID3.config did not return a true value at Image/ExifTool.pm line 9675."
1; #end
Quote3) For other readers: The config file needs to be named exactly the same as you use it in the command line:
exiftool -config join_tags_ID3.config -G1 -a -s -UserDefinedText Y:\temp\x\y\test.mp3
Quote@StarGeek: I'm not sure if you understand my initial question:
I asked for a solution to get 1 (one) specific tag content, for example "MusicBrainz Album Artist Id".
The idea would be a (not yet working) syntax likeexiftool -config specificID3.config -G1 -a -s -UserDefinedText("MusicBrainz Album Artist Id") music.mp3
and then get only this value:
d87e52c5-bb8d-4da8-b941-9f4928627dc8
How could I achieve that?
C:\>exiftool -config join_tags_ID3.config -G1 -a -s -MusicBrainzTRMId "Y:/Music/Music/Sorted/Albums/Journey/Greatest_Hits/01-Only_the_Young.mp3"
[Composite] MusicBrainzTRMId : e5d018af-3a9d-4ed9-9593-a7b0b63c4579
C:\>exiftool -config join_tags_ID3.config -G1 -a -s -UserDefinedText -*Brainz* "Y:/Music/Music/Sorted/Albums/Journey/Greatest_Hits/01-Only_the_Young.mp3"
[ID3v2_3] UserDefinedText : (MusicBrainz TRM Id) e5d018af-3a9d-4ed9-9593-a7b0b63c4579
[ID3v2_3] UserDefinedText : (MusicBrainz Artist Id) abd506e1-6f2b-4d6f-b937-92c267f6f88b
[ID3v2_3] UserDefinedText : (MusicBrainz Album Id) 43ca7ac8-bd36-4468-bab4-004a9a34de66
[ID3v2_3] UserDefinedText : (MusicBrainz Album Type) compilation
[ID3v2_3] UserDefinedText : (MusicBrainz Album Status) official
[ID3v2_3] UserDefinedText : (MusicBrainz Album Artist Id)
[ID3v2_3] UserDefinedText : (MusicBrainz Album Release Country) US
[Composite] MusicBrainzAlbumReleaseCountry : US
[Composite] MusicBrainzTRMId : e5d018af-3a9d-4ed9-9593-a7b0b63c4579
[Composite] MusicBrainzArtistId : abd506e1-6f2b-4d6f-b937-92c267f6f88b
[Composite] MusicBrainzAlbumId : 43ca7ac8-bd36-4468-bab4-004a9a34de66
[Composite] MusicBrainzAlbumType : compilation
[Composite] MusicBrainzAlbumStatus : official
[Composite] MusicBrainzAlbumArtistId :
QuoteAre you sure that
my $table = Image::ExifTool::GetTagTable('Image::ExifTool::Composite');
is the correct way to get the UserDefinedText content?
my $nameTag = 'UserDefinedText';
and Desire => {
0 => $nameTag,
Quote from: maxardis on Today at 02:21:13 PMJust one question. I cannot seem to find any mention of ConvertUnixTime() in man pages nor by googling (only mentioned on some other threads on this forum). And you also say that it is an internal function. So I guess it means that it might "disappear" with some future version of exiftool right? It is kind of a hack, sort of, right?
QuoteQuote from: StarGeek on Today at 12:13:34 PMYou don't mention your OS, but you appear to be on Mac/Linux
I am on Linux if that is important, yes. I can translate Windows CMD into Linux one no problem. It's pretty much the same
Quote from: StarGeek on Today at 12:13:34 PMYou don't mention your OS, but you appear to be on Mac/Linux
Quote from: maxardis on Today at 06:52:02 AMI am trying to do this:exiftool -p '${exif:DateTimeOriginal;ShiftTime(${exif:OffsetTimeOriginal}, -1)} ${directory}/${filename}' ./dir/*
And what I get is a warning:Warning: Bareword "OffsetTimeOriginal" not allowed while "strict subs" in use for 'exif:DateTimeOriginal'
. I don't understand that message and I don't know what I am doing wrong, nor how to fix it.
C:\>exiftool -G1 -a -s -SubSecDateTimeOriginal y:\!temp\Test4.jpg
[Composite] SubSecDateTimeOriginal : 2024:05:20 12:00:00-07:00
C:\>exiftool -p "${SubSecDateTimeOriginal;DateFmt('%s');$_=ConvertUnixTime($_);DateFmt('%Y-%m-%dT%H:%M:%S')}" y:\!temp\Test4.jpg
2024-05-20T19:00:00
ECHO OFF
@CLS
SETLOCAL enabledelayedexpansion
FOR /F "tokens=2 delims=)" %%M IN ('
exiftool.exe -a -UserDefinedText -ext mp3 -recurse . ^| findstr /c:%1 /i
') DO (
SET LeftTrimmedValue=%%M
ECHO !LeftTrimmedValue:~1!
)
ShowContentOfThisUndefinedText "musicbrainz album artist id"
and you get the wantedexiftool (magic options here...) ./directory/*
and get output to stdout like so:2024-01-01T10:10:10 ./directory/file1.jpg
2024-01-01T10:11:10 ./directory/file2.jpg
2024-01-02T10:10:10 ./directory/file3.jpg
...
$ exiftool -d '%Y-%m-%dT%H:%M:%S' -p '${exif:DateTimeOriginal}${exif:OffsetTimeOriginal} ${directory}/${filename}' ./dir/*
exiftool -p '${exif:DateTimeOriginal;ShiftTime(${exif:OffsetTimeOriginal}, -1)} ${directory}/${filename}' ./dir/*
Warning: Bareword "OffsetTimeOriginal" not allowed while "strict subs" in use for 'exif:DateTimeOriginal'
. I don't understand that message and I don't know what I am doing wrong, nor how to fix it.exiftool -config specificID3.config -G1 -a -s -UserDefinedText("MusicBrainz Album Artist Id") music.mp3
and then get only this value: