Main Menu

Test File Args file

Started by StarGeek, May 20, 2018, 03:11:46 PM

Previous topic - Next topic

StarGeek

This is the Arg file I use to create the test file I use to see what metadata various programs use.  I originally used it to test the Windows Properties->Details tab, thus the name. edit: now changed

In most cases the tag will be filled with the name of the tag if possible (e.g. XMP-dc:Description is filled with the value "XMP-dc:Description"), otherwise with a unique value compared to similar tags e.g., EXIF:ISO has a different value than XMP:ISO.  This is especially important with the various date/time tags.

The command to use it would be something like:
exiftool -@ /path/to/MetadataTestFile.args TestFile.jpg
and then you'll have a test file with more metadata than you probably need.

Edit:
  • 2019-06-18: Updated to version 1.03, some minor tweaks, a few tags removed, removed duplicate line
  • 2020-10-04: Added small jpeg with all the data already embedded, needs to be unzipped
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

That looks useful.  Perhaps we should make this topic sticky?

But I have three issues with the name of the file.

1. The "Windows" in the name makes it seem like it may not be useful for other platforms.

2. The leading "!" makes it a bit awkward to use on Mac/Linux ("!" must be quoted).

3. Argument files in the ExifTool distribution have the extension ".args".  It would be good to be consistent.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Any suggestions on a new name?  "MetadataTestFile.args"?

I used the exclamation point to make it first in my directory listing so it was easier to find in my increasingly messy test file directory.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Quote from: StarGeek on May 21, 2018, 11:34:38 AM
Any suggestions on a new name?  "MetadataTestFile.args"?

Sounds great!

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Ok, name changed and thread stickied.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

colink

@StarGeek

Thanks for creating this file - I am glad my suggestion for a test file / image was useful :-)

I am getting an error (Windows 10).
I created a new image named TestFile.jpg
Put MetadataTestFile.args in the same folder (ExifTool is also in the same folder)

run the following command
exiftool -@ MetadataTestFile.args TestFile.jpg

I get the error -  Error opening arg file MetadataTestFile.args

Am I doing something wrong?

Thanks ColinK

Phil Harvey

Hi Colin,

The args file must be in the current working directory unless you specify a path as in StarGeek's example command.

You can avoid having to type the path by dragging and dropping MetadataTestFile.args onto the cmd window.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

colink

Thanks again Phil

Sorry, my silly mistake (as usual) - I had previously worked in a different folder and forgot to do cd- "current folder"

ColinK

mpegleg

StarGeek. Windows doesn't like your Arg file. It cries Error 0x80070216!!!! >:(

I get this "interesting" Windows error, when I try to clear the XPComments and attempt to save it from the Properties box:

OS: Windows 11 Pro

StarGeek

#9
Ooohhh, interesting.  You have a people entry.  I never had that.  Either Windows has updated it's metadata reading or your version does something different than the US version.  (edit: I have it as well, time to update my other thread)

I'll have to check on this, as I haven't kept this version up to date.  I had to remove a couple of tags because they would cause errors in other things as a simple string wasn't really allowed.

Edit: Ok, I see why I never encountered this.  I never bothered to try and edit the test file through Windows.  I'm not sure if it's worth trying to figure out which of the 1,400 or so tags is causing this, as this is only for testing purposes, you aren't supposed to have all this data for "real" files.  I'll give it some quick testing to see if I can narrow it down, but I don't think I'll put a lot of effort into fixing this.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

StarGeek

What the bloody hell!

I decide to try and be methodical about figuring this out.  So I remove the first two hundred lines and see if the error goes away.  Cool, that does it.  So the error must be in the first two hundred lines, right?  Update the test file using the first two hundred lines and... no error.  Run it with the last 1200 lines, no error.

Ok, more testing.  Remove this, remove that, intermittent errors.  Oh, remove the GPS section, no error, that's were the problem must be, right?  Run the GPS section by itself, no error.  What the hell!

Start over, add 100 lines at a time. No errors until I add lines 901 to 1,000.  Aha!  There error must be there!  Test just lines 901 to 1,000.  No error.

Start removing some individual tags between 901 and 1,000.  It starts working.  Add those tags back in.  It... works?  Start over, remove lines 1,014 to 1,020.  It... works?  Those are XMP tags, same as the ones I was removing in the 900 to 1,000 range.  Go elsewhere, remove a handful of XMP tags, and it works.

Ok, I think this is a problem with the way Windows is parsing XMP data, not an actual mathematical error in the metadata itself.  You can "fix" it by removing about 10-20 XMP tags from the arg file.   Or just not edit the test file using Windows ;)
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

mpegleg

Oooh. Sorry. Didn't mean to give you a headache over it. lol

I was just curious about the error message that was generated. I certainly don't need to use it at the moment. :)
OS: Windows 11 Pro

Phil Harvey

I suspect this is a bug in the way Windows handles the extended XMP in JPG files.  (The generated XMP doesn't fit in a single JPEG segment, so an extended XMP segment is used.)  My guess is that it wouldn't be a problem for a TIFF file.

Note that I get this warning when I use your argfile:

"Warning: Argument "XMP-EXIF:ApertureValue" isn't numeric in numeric gt (>) in XMP-exif:ApertureValue (ValueConvInv)"

Due to this line in the file:

-XMP-EXIF:ApertureValue=XMP-EXIF:ApertureValue

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: Phil Harvey on June 18, 2019, 12:44:03 PM
"Warning: Argument "XMP-EXIF:ApertureValue" isn't numeric in numeric gt (>) in XMP-exif:ApertureValue (ValueConvInv)"

Interesting.  I don't get that, but I also noticed that I have that line listed twice.  One that sets it to 1.0 and the one you list.  But easy enough to fix
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

StarGeek

Quote from: Phil Harvey on June 18, 2019, 12:44:03 PM
I suspect this is a bug in the way Windows handles the extended XMP in JPG files.  (The generated XMP doesn't fit in a single JPEG segment, so an extended XMP segment is used.)  My guess is that it wouldn't be a problem for a TIFF file.

You are correct.  Tried on a Tiff file and there was no error.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype