ExifTool Forum

ExifTool => Newbies => Topic started by: daap on January 10, 2018, 05:15:21 PM

Title: Image vs. -listx tags
Post by: daap on January 10, 2018, 05:15:21 PM
Hi,

I must be missing something and I can't find the right part of the documentation about this.

When querying an image, exiftool returns a tag EXIF:CameraModelName with the camera's model name as value. However, when running exiftool -listx, this tag is not part of the data returned. Why is that?

Cheers,
Daap
Title: Re: Image vs. -listx tags
Post by: StarGeek on January 10, 2018, 05:56:03 PM
FAQ #2 (https://exiftool.org/faq.html#Q2):

"When you run exiftool, by default it prints descriptions, not tag names, for the information it extracts." 

To find out the name of the tag, add -s to your command.
Title: Re: Image vs. -listx tags
Post by: daap on January 10, 2018, 07:06:33 PM
Hi StarGeek,

Leaving out -s (I was using it actually) when getting tags from an image does not change the name of this particular field.

Using -s in combination with -listx actually omits descriptions which would otherwise be included. The names are included either way.

So I don't really understand your answer.

Daap
Title: Re: Image vs. -listx tags
Post by: daap on January 10, 2018, 07:17:04 PM
I found it, I was using -l and -s at the same time, and -l seems to win. Leaving -l out makes it work.

Thanks!
Title: Re: Image vs. -listx tags
Post by: Phil Harvey on January 10, 2018, 07:27:26 PM
A single -l doesn't win over a -s.  It has exactly the opposite effect to -s, so one -s will cancel out one -l (and visa versa).  So you would need two -l's to win over one -s.

- Phil
Title: Re: Image vs. -listx tags
Post by: daap on January 11, 2018, 12:36:30 AM
Hi Phil,

As described, that is not the behaviour I see. The -l seems to win over the -s (note that the -l was specified before -s, not sure if the order matters here).

Daap
Title: Re: Image vs. -listx tags
Post by: StarGeek on January 11, 2018, 02:45:28 AM
What version of exiftool are you using (exiftool -ver).

The behavior here is consistent regardless of if I put -s or -l and is exactly the same as if I don't put either.  Putting -s or -l by themselves gives different results consistant with what their output should be. 

C:\>exiftool -l -s -model y:\!temp\Test3.jpg
Camera Model Name               : EXIF:Model

C:\>exiftool -s -l  -model y:\!temp\Test3.jpg
Camera Model Name               : EXIF:Model

C:\>exiftool -model y:\!temp\Test3.jpg
Camera Model Name               : EXIF:Model

C:\>exiftool -l -model y:\!temp\Test3.jpg
Camera Model Name
      EXIF:Model

C:\>exiftool -s -model y:\!temp\Test3.jpg
Model                           : EXIF:Model
Title: Re: Image vs. -listx tags
Post by: daap on January 11, 2018, 05:05:02 PM
I'm on 10.67. I just downloaded 10.74 and that shows the same behaviour.

Running ..\exiftool -t -G -s "2017-09-08 09-23-38 SONY.jpg" gives result (I only show the model line here, not the whole result):
EXIF   Model   DSC-HX90V

Running ..\exiftool -t -G -l -s "2017-09-08 09-23-38 SONY.jpg" gives result:
EXIF   Camera Model Name   DSC-HX90V

Running ..\exiftool -t -G -l -s -s "2017-09-08 09-23-38 SONY.jpg" gives result:
EXIF   Model   DSC-HX90V

So it does look like adding more -s overrides -l, but not in the case where just -l -s are specified.

The -t or -G have no influence on this, they just change the representation.
Title: Re: Image vs. -listx tags
Post by: Phil Harvey on January 11, 2018, 05:49:23 PM
It is just that -l alone has no effect with -t because the 2-line output format is not compatible with a tab-delimited single-line output.

- Phil