Author Topic: Test File Args file  (Read 3805 times)

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3476
Test File Args file
« on: May 20, 2018, 03:11:46 PM »
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
« Last Edit: June 18, 2019, 02:17:51 PM by StarGeek »
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16296
    • ExifTool Home Page
Re: Test File Args file
« Reply #1 on: May 21, 2018, 06:53:23 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3476
Re: Test File Args file
« Reply #2 on: May 21, 2018, 11:34:38 AM »
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.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16296
    • ExifTool Home Page
Re: Test File Args file
« Reply #3 on: May 21, 2018, 01:19:24 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3476
Re: Test File Args file
« Reply #4 on: May 21, 2018, 01:38:34 PM »
Ok, name changed and thread stickied.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

colink

  • Jr. Member
  • **
  • Posts: 26
Re: Test File Args file
« Reply #5 on: May 22, 2018, 05:41:31 AM »
@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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16296
    • ExifTool Home Page
Re: Test File Args file
« Reply #6 on: May 22, 2018, 07:04:05 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

colink

  • Jr. Member
  • **
  • Posts: 26
Re: Test File Args file
« Reply #7 on: May 23, 2018, 05:40:45 AM »
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

  • Sr. Member
  • ****
  • Posts: 174
Re: Test File Args file
« Reply #8 on: June 18, 2019, 07:12:25 AM »
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 10 Pro x64

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3476
Re: Test File Args file
« Reply #9 on: June 18, 2019, 11:05:11 AM »
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.
« Last Edit: June 18, 2019, 11:30:32 AM by StarGeek »
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3476
Re: Test File Args file
« Reply #10 on: June 18, 2019, 12:32:30 PM »
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 ;)
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

mpegleg

  • Sr. Member
  • ****
  • Posts: 174
Re: Test File Args file
« Reply #11 on: June 18, 2019, 12:36:07 PM »
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 10 Pro x64

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16296
    • ExifTool Home Page
Re: Test File Args file
« Reply #12 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.

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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3476
Re: Test File Args file
« Reply #13 on: June 18, 2019, 02:17:01 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
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3476
Re: Test File Args file
« Reply #14 on: June 18, 2019, 02:20:08 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.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.