2025-04-23: ExifTool 12.84 is now available
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:#------------------------------------------------------------------------------
# File: join_tags_ID3.config
#
# Description: ExifTool config file to generate new tags from ID3:UserDefinedText,
# based upon the original join_tags.config
#
# Revisions: 2020-11-16 - P. Harvey created
# 2024-05-19 - Bryan (StarGeek) Williams edited
#
#------------------------------------------------------------------------------
my $nameTag = 'UserDefinedText';
sub JoinTags($$)
{
my ($val, $et) = @_;
my $table = Image::ExifTool::GetTagTable('Image::ExifTool::Composite');
my $i;
for ($i=0; ;++$i) {
my $suffix = $i ? " ($i)" : '';
my $temp = $et->GetValue("$nameTag$suffix") or last;
$temp=~m/^\(([^)]+)\)\s*(.*)/;
my $name = $1 or last;
my $value = $2;
last unless defined $value;
my $tagInfo = Image::ExifTool::AddTagToTable($table, $name, {
Name => Image::ExifTool::MakeTagName($name),
});
$et->FoundTag($tagInfo, $value);
}
return undef;
}
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
JoinTagsID3 => {
Desire => {
0 => $nameTag,
1 => $valueTag,
},
RawConv => \&JoinTags,
},
},
);
1; #end
C:\>exiftool -config join_tags_ID3.config -G1 -a -s -UserDefinedText -Composite:all Y:\!temp\x\y\test1.mp3
[ID3v2_3] UserDefinedText : (Rip date) 2008-06-22
[ID3v2_3] UserDefinedText : (Source) CD (LP)
[ID3v2_3] UserDefinedText : (Ripping tool) EAC
[ID3v2_3] UserDefinedText : (Release type) Normal Release
[Composite] DateTimeOriginal : 2008:24:06
[Composite] AudioBitrate : 206 kbps
[Composite] Duration : 0:03:22 (approx)
[Composite] Releasetype : Normal Release
[Composite] Ripdate : 2008-06-22
[Composite] Source : CD (LP)
[Composite] Rippingtool : EAC
C:\>exiftool -config join_tags_ID3.config -G1 -a -s -UserDefinedText -composite:all Y:\!temp\x\y\test2.mp3
[ID3v2_3] UserDefinedText : ([rating]) 3
[ID3v2_3] UserDefinedText : (Release type) Normal release
[ID3v2_3] UserDefinedText : (Rip date) 2007-09-14
[ID3v2_3] UserDefinedText : (Ripping tool) EAC
[ID3v2_3] UserDefinedText : (Source) CD
[ID3v2_3] UserDefinedText : (Rating) 0
[Composite] DateTimeOriginal : 2007:11:09
[Composite] AudioBitrate : 186 kbps
[Composite] Duration : 0:03:45 (approx)
[Composite] Rating : 0
[Composite] Rating : 3
[Composite] Releasetype : Normal release
[Composite] Ripdate : 2007-09-14
[Composite] Rippingtool : EAC
[Composite] Source : CD
Quote from: FixEUser on May 19, 2024, 07:58:15 AMHow can I extract the content of a specific ID3 "User Defined Text" tag?
QuoteWhat exiftool-syntax would it be if the only way to get the content is using "ID3:Copy4"?This won't work as you have specified an actual tag name. You could try ID3:Copy4:UserDefinedText but that assumes the item you are looking for is in the exact same location for every file, which seems unlikely.
Album Artist Sort Order : ABBA
User Defined Text : (ARTISTS) ABBA
User Defined Text : (BARCODE) 602498664636
User Defined Text : (CATALOGNUMBER) 0602498664636
User Defined Text : (MusicBrainz Album Artist Id) d87e52c5-bb8d-4da8-b941-9f4928627dc8
User Defined Text : (MusicBrainz Album Id) 6b1d9e00-246f-4701-8f7f-57f7d2d998e6
User Defined Text : (MusicBrainz Album Release Country) XE
User Defined Text : (MusicBrainz Album Status) Official
User Defined Text : (MusicBrainz Album Type) Album
User Defined Text : (MusicBrainz Artist Id) d87e52c5-bb8d-4da8-b941-9f4928627dc8
User Defined Text : (MusicBrainz Release Group Id) 1f78ea53-5e9c-46b6-8cd4-9d8a9c547a85
User Defined Text : (MusicBrainz Release Track Id) 594c05ce-bbb5-45cd-b971-4e268d3b137b
User Defined Text : (originalyear) 1974
User Defined Text : (SCRIPT) Latn
Picture MIME Type : image/jpeg
-a -g0:4
options to get something like this:---- ID3:Copy4 ----
User Defined Text : (MusicBrainz Album Artist Id) d87e52c5-bb8d-4da8-b941-9f4928627dc8
What exiftool-syntax would it be if the only way to get the content is using "ID3:Copy4"?