NOW: Exiftool usage lessons .. WAS: Bug ?? in Auto CHDK to Exif - General Help and Assistance on using CHDK stable releases - CHDK Forum  

NOW: Exiftool usage lessons .. WAS: Bug ?? in Auto CHDK to Exif

  • 22 Replies
  • 13808 Views
*

Offline Sow.N.Reap

  • *
  • 23
  • Canon S5is
Advertisements
Has anyone else noticed that when the ISO is 80 that this program will write it ISO 800 in the Maker Notes??

I guess I'm going to have to learn how to use Exiftool. It's just this program made it SO easy to write the CHDK settings.

{edited subject title to more accurately reflect the current discussion}

« Last Edit: 12 / August / 2009, 23:22:40 by Sow.N.Reap »
Canon S5is .. My Flickr page

*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
Re: Bug ?? in Auto CHDK to Exif
« Reply #1 on: 08 / August / 2009, 14:35:03 »

Exiftool is very powerful and there is a GUI in case you don't like the command line: http://freeweb.siol.net/hrastni3/foto/exif/exiftoolgui.htm

Or you can just create a .BAT file (if you use Windows) with a set of exiftool commands and make it part of your workflow. For example:

C:\apps\exiftool\exiftool -ext .JPG * -overwrite_original "-exif:iso<iso" -r .

This will copy the real ISO to the EXIF ISO field just like "Auto CHDK to Exif". It is done for every JPG file in the current folder.

The documentation of exiftool is very good as it comes with many examples. You just have to find one similar to what you need and modify it accordingly.

*

Offline Anaglyphic

  • ***
  • 129
  • Anaglyphic lives!
Re: Bug ?? in Auto CHDK to Exif
« Reply #2 on: 08 / August / 2009, 17:30:59 »
Hello again. Well if you're going to start a 2nd thread about it, I guess I'll come over here and yell it: use exiftool. :P

I know, I know, it's not what you wanted or asked. But I'm trying to help you, I truly am.

And for the record: It does not "make it much easier to update the exif tags with it when doing a lot of photos." It's quite slow! Judging from the drive LED activity on a single image, I think he's running multiple exiftool calls when it could be done with one, or maybe just AutoIt script execution is slow. exiftool is faster and vastly more powerful than that "Auto CHDK to Exif" thing exposes, it's simply embarrassing. You could, if you were crazy enough, re-tag, rename, and otherwise manipulate your entire image library, with one command.

Just from a casual glance at the documentation of exiftool, you can see it's tagging ability is -the- standard that all image management applications strive for. Nothing can best it. Nothing. And like all our favorite tools: CHDK, dcraw, etc. it's Open Source licensed. Yes there's a learning curve. Same with CHDK. Same with dcraw.  And when you see what you can automate just with config files and argfiles...

However - if you are just stuck on using it... as I said above, it's an AutoIt script, that Barney decompiled and re-worked, which was originally written by aeropic and called Auto_ISO_Patcher. Anyway, you can do what Barney did. Barney is long gone or more likely hiding under another alias. He's not going to fix it. The AutoIt package comes with a utility called EXE2AUT, so you can extract the script and modify the source code so you can fix any errors or extend functionality...

But really? If you're willing to go to that much trouble, just give exiftool a few hours of your life. Once you learn it, you'll never need another.
8)
Since we cannot know all that there is to be known about anything,
 we ought to know a little about everything.
-- Blaise Pascal

*

Offline Sow.N.Reap

  • *
  • 23
  • Canon S5is
Re: Bug ?? in Auto CHDK to Exif
« Reply #3 on: 08 / August / 2009, 22:05:46 »
Sorry about starting a new thread .. I debated whether to continue in the other one but then thought a new one might better alert others to watch out for problems with this program. If the mods think it should be moved, then please do so.

I can see exiftool is very powerful & after the learning curve will probably be great. I was just being lazy in not wanting to have to learn it but I starting reading the docs & playing with it last night. The sooner I get started the sooner I'll learn it.

I appreciate the examples & suggestions you've both given. They've already been helpful.



Canon S5is .. My Flickr page


*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Bug ?? in Auto CHDK to Exif
« Reply #4 on: 09 / August / 2009, 11:51:03 »
Has anyone else noticed that when the ISO is 80 that this program will write it ISO 800 in the Maker Notes??
I guess I'm going to have to learn how to use Exiftool. It's just this program made it SO easy to write the CHDK settings.
That's not really a bug in "Auto CHDK to EXIF" - it's an issue of the ExifTool app..."Auto CHDK to EXIF" just runs ExifTool with the following params:

exiftool.exe -k -composite:iso>EXIF:ISO -composite:iso>MakerNotes:CameraISO -MakerNotes:ExposureTime>EXIF:ExposureTime -MakerNotes:FNumber>EXIF:FNumber -MakerNotes:OwnerName>EXIF:Artist -MakerNotes:FocusDistanceUpper>EXIF:SubjectDistance -MakerNotes:FocusDistanceUpper>EXIF:UserComment -caption-abstract<$exif:usercomment  -e -L -P -overwrite_original -r

The problem is the following: By default, ExifTool internally calculates the meta data, so if you run
 exiftool.exe "-composite:iso>MakerNotes:CameraISO" IMG_4259.JPG
you'll get the same wrong value in CameraISO...

That's easy to check:
On a sample image with ISO80, run
  exiftool.exe "-composite:iso>MakerNotes:CameraISO" IMG_4259.JPG
The original data (run exiftool.exe -iso -makernotes:cameraiso -makernotes:autoiso -makernotes:baseiso IMG_4259.JPG to list the ISO related values) is:
ISO                             : 80
Camera ISO                      : 80
Auto ISO                        : 100
Base ISO                        : 79


Data after running the ExifTool commands from above:
ISO                             : 80
Camera ISO                      : 800
Auto ISO                        : 100
Base ISO                        : 79


...somebody wondering why i list the Auto ISO / Base ISO values ? ... let's have a look to the ExifTool documentation:
Quote
ISO  N  Canon:CameraISO  (use CameraISO if numerical, otherwise calculate as BaseISO * AutoISO / 100)
There's an easy way to prevent ExifTool from calculating values, it's the -e param:
Quote
-e (--composite)     Print existing tags only -- don't calculate composite tags.
This will copy all (!) values without calculation or conversion, also on images with ISO80 - but this may have other side effects...

If somebody is interested in a modified "Auto CHDK to EXIF" version, i can build & upload one...

@Anaglyphic
You're right, using the ExifTool is the better way - but a tool like "Auto CHDK to EXIF" is sometimes better for "noobs" in this kind of stuff; e.g. it prevents "noob" users from smashing the EXIF data of their images...
And for the "slowness": No, it just runs the ExifTool once, se the command line above...
« Last Edit: 09 / August / 2009, 16:37:25 by fe50 »

*

Offline Sow.N.Reap

  • *
  • 23
  • Canon S5is
Re: Bug ?? in Auto CHDK to Exif
« Reply #5 on: 10 / August / 2009, 04:03:45 »
Thanks fe50 for explaining this though I don't know enough about exiftool to really response intelligently.

I only somewhat understand about the BaseISO * AutoISO /100 because 79*100/100 still equals 79 so why would it not put 79 in the composite? Is it because it's a non-standard value or just the way exiftool is coded? See I told you I didn't know much about exiftool (or code writing either).  

Right now I don't have a need to write/change the ISO so I'm assuming I can just leave the striked-through part out & use this (I'd don't want the UserComment stuff as either):


exiftool.exe -k -composite:iso>EXIF:ISO -composite:iso>MakerNotes:CameraISO
-MakerNotes:ExposureTime>EXIF:ExposureTime
-MakerNotes:FNumber>EXIF:FNumber -MakerNotes:OwnerName>EXIF:Artist
-MakerNotes:FocusDistanceUpper>EXIF:SubjectDistance
-MakerNotes:FocusDistanceUpper>EXIF:UserComment -caption-abstract<$exif:usercomment  -e -L -P -overwrite_original -r

And just as soon as I figure out what all the switches mean (ie: -e, -L, -P, etc) & how to format this then maybe I'll be in business till I learn the rest. I did try it but did something wrong because I got "error opening file".

And yes, you are quite right about AutoCHDK to Exif being safer for us noobs especially since I really only need 2 parameters written to the exif ...  for now anyway.
« Last Edit: 10 / August / 2009, 04:06:20 by Sow.N.Reap »
Canon S5is .. My Flickr page

*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Bug ?? in Auto CHDK to Exif
« Reply #6 on: 10 / August / 2009, 08:16:40 »
I only somewhat understand about the BaseISO * AutoISO /100 because 79*100/100 still equals 79 so why would it not put 79 in the composite? Is it because it's a non-standard value or just the way exiftool is coded?
"Auto CHDK to EXIF" just copies the value in the tag "composite:iso" to the tag "MakerNotes:CameraISO", it does no calculations itself.
Under some conditions (ISO 80 in our case), ExifTools calculates something & gives the wrong value, i don't know why...
The -e parameter prevents ExifTool from any calculations, so in our case the values will be just copied without any calculation or modification.

Quote
And just as soon as I figure out what all the switches mean (ie: -e, -L, -P, etc) & how to format this then maybe I'll be in business till I learn the rest. I did try it but did something wrong because I got "error opening file".
It's a bit tricky in a windows shell - use " " for the whole parameters, otherwise Windows interprets the > as file system pipe symbol...

Sample:  exiftool.exe "-composite:iso>MakerNotes:CameraISO" IMG_4259.JPG

I compiled a "Auto CHDK to EXIF" version with the -e parameter added (no other changes), it is available from the CHDKSOFT drop...

The "Auto CHDK to EXIF" complete package including exiftool.exe:
    http://drop.io/chdksoft/asset/auto-chdk-to-exif-v1-4-complete-zip
The "Auto CHDK to EXIF" application file only (if you have the exiftool.exe already):
    http://drop.io/chdksoft/asset/auto-chdk-to-exif-v1-4-exe

*Edit: The AutoIt source code and the readme.txt file are also available as single files from the chdksoft drop...
« Last Edit: 10 / August / 2009, 13:05:39 by fe50 »

*

Offline Anaglyphic

  • ***
  • 129
  • Anaglyphic lives!
Re: Bug ?? in Auto CHDK to Exif
« Reply #7 on: 10 / August / 2009, 10:47:22 »
"Auto CHDK to EXIF" just runs ExifTool with the following params:

exiftool.exe -k -composite:iso>EXIF:ISO -composite:iso>MakerNotes:CameraISO <cut>
. . .
It should instead pull from makernotes, eg. exif:iso<canon:
Exactly. And this is my problem teaching "noobs" to use someone's app, it could be WRONG, and for example pulling data from the wrong place, and forcefully writing a Composite tag which exiftool derives from other data automatically... they will never know. Hell, only because you disassembled the thing and posted it do I know.

@Anaglyphic
You're right, using the ExifTool is the better way - but a tool like "Auto CHDK to EXIF" is sometimes better for "noobs" in this kind of stuff; e.g. it prevents "noob" users from smashing the EXIF data of their images...
And for the "slowness": No, it just runs the ExifTool once, se the command line above...
re: smashing up their tags, yes that can happen. So maybe the first thing we discuss should be how to dump every single tag into a sidecar file for backup. Another thing "Auto CHDK to Exif" isn't going to do... re: the slowness, that is interesting. I guess it must be the AutoIt runtime overhead? Not that it's worth tracking down, I find the app... limiting.

If somebody is interested in a modified "Auto CHDK to EXIF" version, i can build & upload one...
I was thinking a wiki article on exiftool usage with specific CHDK-centric examples would go farther, but you're right, I'm sure there are many that would welcome this, and at least we know you'd implement it correctly. (and implement tag backup sidecar XMLs?)
8)
Since we cannot know all that there is to be known about anything,
 we ought to know a little about everything.
-- Blaise Pascal


*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Bug ?? in Auto CHDK to Exif
« Reply #8 on: 10 / August / 2009, 13:01:37 »
@Anaglyphic

LOL - i personally do not use it, i just had a look to the app to see whether it is ia ExifTool issue; i use AutoIt daily, so it was simple to check it.
Yes, blind using 'someone's app' may be dangerous; but when the source code is available, everybody can have a look to it & decide whether he/she use it or not...
I've just modified the app to go around the reported ISO80-issue...since i don't use it by myself, i do not plan to enhance this tool...

The ExifTool documentation is very good, but for beginners with limited knowledge it is indigestive.
As you surely know - sometimes it's a pain to teach a mouse-only-windows-user to type in / run a command in a cmd window from the right folder in the right way...so this part would be easier for you as a native english speaker  :)
So - yeah, a wikia article on ExifTool usage would be nice, feel free to write it :D

*

Offline Sow.N.Reap

  • *
  • 23
  • Canon S5is
Re: Bug ?? in Auto CHDK to Exif
« Reply #9 on: 10 / August / 2009, 13:06:07 »
The -e parameter prevents ExifTool from any calculations, so in our case the values will be just copied without any calculation or modification.
But with possible side effects so right now I'd rather just leave that out.

It's a bit tricky in a windows shell - use " " for the whole parameters, otherwise Windows interprets the > as file system pipe symbol...

Sample:  exiftool.exe "-composite:iso>MakerNotes:CameraISO" IMG_4259.JPG
Ah .. double quotes .. I only used single. I thought maybe it should have been double. It was getting late ..  I read about quotes but thought it showed single quotes.

I compiled a "Auto CHDK to EXIF" version with the -e parameter added (no other changes), it is available from the CHDKSOFT drop...
Thanks .. I appreciate you going to all that work, but I think I'm going to learn exiftool anyway. But at least now other unsuspecting people might not write ISO 800 instead of 80 into the exif.

re: smashing up their tags, yes that can happen. So maybe the first thing we discuss should be how to dump every single tag into a sidecar file for backup. Another thing "Auto CHDK to Exif" isn't going to do... re: the slowness, that is interesting.

Dumping into sidecars files ... this sounds like it could be better than saving the original file. I don't really need a bunch of duplicate files taking up hard drive space. I'm assuming this would take less space. I'll look into that more.

I didn't really find AutoCHDK to Exif much slower than using exiftool but then again I don't really know much about exiftool yet. I think I read something about optimizing it but I'd rather learn HOW to use it first, then worry about speed later.

I was thinking a wiki article on exiftool usage with specific CHDK-centric examples would go farther, ....
I'm torn on this idea. It sounds like a good thing but then again it could give us noobs just enough info to get into trouble without knowing how to get out. But with all the info on the exiftool site it could help to have more specific examples. I get info overload on that site. But I've already learned a lot just by everyone's examples & figuring out how to reply to fe50's post. :)

I really do appreciate everyone's help & input.
Canon S5is .. My Flickr page

 

Related Topics