Failure to update exif data

Started by MikeFromMesa2, March 12, 2018, 12:44:18 PM

Previous topic - Next topic

MikeFromMesa2

I assume this problem is mine, and that I am doing something wrong to cause a command to fail.

I recently bought an inexpensive manual fisheye lens which does not have an electrical connection to the camera. Without a connection all of the lens information is missing from the image exif data so I thought I would build a small app around exifTool and update the information.

Most of that works, but my attempt to update one tag, "LensType", continually fails and I do not know why. LensType is a MakerNotes entry, but it does exist in the original exif data so, as I understand it, the command should succeed. I have been trying to figure out why it is failing while all other commands seem to succeed, but have had no luck.

I am calling it from an objective-c app built in Xcode and sending a command line containing 11 change commands along with the path to the file, and get the return message that the operation succeeded. It did. 10 of the changes took, but the LensType did not. I checked to see if perhaps there were too many commands on the call, but even a single command fails. I have tried this using the command line interface, but that call fails as well. I get no debug information telling me why it failed, only that it did (0 image files update, 1 image file unchanged).

Are there some tags that can not be updated? Is there any way to get failure information back from a call to exifTool?


Phil Harvey

Use this command:

exiftool -a -H -G1 -lenstype FILE

Then look up the appropriate lensType in the tag name documentation to see if it is writable.

Without more details, I can't be more specific.  It would help if you told me the camera model.

- 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 ($).

MikeFromMesa2

Quote from: Phil Harvey on March 12, 2018, 01:19:54 PM
Use this command:

exiftool -a -H -G1 -lenstype FILE

Then look up the appropriate lensType in the tag name documentation to see if it is writable.

Without more details, I can't be more specific.  It would help if you told me the camera model.

- Phil

The camera is an Olympus OM-D E-M1 Mk II. The lens is a Samyang 7.5mm fisheye.

In searching through the exif data I found one more tag that I had not yet addressed, LensID, and added it to the app along with the appropriate new value. it also would not update so that is now LensType and LensID. LensType is MakerNotes and LensID is Composite.

I will run the commands you mentioned to see what it tells me. I did not know that some data was not writable.

MikeFromMesa2

Here is the output from the Terminal command:

Michaels-Mac-mini:bin michael$ exiftool -a -H -G1 -lenstype /Volumes/Work/Photos/UWA2/OLY00812.ORF
[Olympus]       0x0201 Lens Type                       : None
Michaels-Mac-mini:bin michael$


and the response for the lensID was:

Michaels-Mac-mini:bin michael$ exiftool -a -H -G1 -lensid /Volumes/Work/Photos/UWA2/OLY00812.ORF
[Composite]          - Lens ID                         : None



Phil Harvey

The Olympus 0x0201 LensType is writable.  Perhaps the problem is FAQ 6?

Composite:LensID is based on LensType (among other things).

- 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 ($).

MikeFromMesa2

Quote from: Phil Harvey on March 12, 2018, 02:25:01 PM
The Olympus 0x0201 LensType is writable.  Perhaps the problem is FAQ 6?

Composite:LensID is based on LensType (among other things).

- Phil
I read FAQ 6 and the discussion of print conversion and, if I am understanding it correctly, what it seems to be saying is that some tags can only be modified using specific text values because those values are used to translate to actual stored values.

LensType is a string value. For example, in the images I take with my Olympus UWA I get the value of:

Olympus M.Zuiko Digital ED 9-18mm F4.0-5.6

and it seems unlikely to me that this would be a translated value as there would have to be literally thousands of them and the list would constantly be changing as new lenses were added and existing ones dropped or upgraded. Still, I will take the value given by my Olympus lens and test using it with the fisheye lens, if only to see what happens when I make the call.

Is there any debug option I can use to give me more information as to why exiftool was not able to actually change the data?

UPDATE:

Perhaps you are right about FAQ 6. I ran the app in Xcode instead of just running the app, and I got the following error messages in the error list box:

Warning: Expected one or more integer values in XMP-aux:LensID (ValueConvInv)

Is there any list that gives valid lens integer values for this tag?

StarGeek

A quick look at the Olympus tag page seems to indicate that Lenstype is not a string but 6 individual 8-bit integer values. The Olympus Lens model tag appears to be a string.
"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

MikeFromMesa2

#7
Quote from: StarGeek on March 12, 2018, 02:48:35 PM
A quick look at the Olympus tag page seems to indicate that Lenstype is not a string but 6 individual 8-bit integer values. The Olympus Lens model tag appears to be a string.

Thank you for the link. I used it to find the Olympus 8mm lens type data. It is not quite the same, but perhaps it will help with some of the de-fishing apps. However when I tried to use it in the exif command that also failed. Probably because I was using the wrong format.

I tried the value in single parens ('0 06 01'), quotes, without quotes, with spaces, without spaces, as a string of hex values and as the decimal equivalent of 1537, both in quotes and without. None of those worked to change the image value. All such calls returned 1 image unchanged.

What should be the format for such a command? exiftool -LensType=xxxx filePath - what specific format for the hex values would be right?

Phil Harvey

As per FAQ 6, "xxxx" should be the lens model name in your command, but for this to work the model must be listed in this table.  If it isn't (or even if it is), I would suggest writing EXIF:LensModel.

- 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 ($).

MikeFromMesa2

Quote from: Phil Harvey on March 12, 2018, 03:52:32 PM
As per FAQ 6, "xxxx" should be the lens model name in your command, but for this to work the model must be listed in this table.
Oh, of course.

I read the FAQ, but I guess I failed to think through its use in this case.

MikeFromMesa2

Just to let anyone following this thread know - using the Olympus information in the link that Phil Harvey sent to me I was able to set the LensType (and all of the other exif settings) to the values I wanted and, once that was done, the LensID entry also got updated, without my having to enter a separate command.

Once that was done the image was recognized by my photo editing software and it did the automatic distortion corrections, which was the purpose of entering the exif information to begin with.

Thank you to everyone who posted.