.ExifTool_config for Dummies

Started by cali92rs, April 18, 2012, 02:29:01 PM

Previous topic - Next topic

cali92rs

OK, I am officially a dummy, lol.

I am trying to understand how the ExifTool_config file works in order to create a composite tag, but I am not getting past first base.

1)  Is ExifTool_config an actual file that has been created, or do we create it ourself?
2)  Is the ExifTool_config this entire document?  https://exiftool.org/config.html

Thanks in advance.

Phil Harvey

1) You create the config file yourself.  It is a plain text file. 

2) The entire document is the config file.  You can search the forum for more examples.  Here is a simple one.

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

cali92rs

 I am having a problem with getting the exiftool and config file in the same location.  Exiftool downloaded into /usr/bin.  When I try to rename the file to .ExifTool_config in /usr/bin,  I get an error stating that I don't have permission.   
Can I change where exiftool is downloaded for easier access,  or am I looking at it wrong?

Phil Harvey

typically, the config file should go in your home directory.  On Mac/Linux you do it like this:

mv your_config_file.txt ~/.ExifTool_config

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

cali92rs

Phil, thanks so much, you have the patience of a saint!
:)

cali92rs

So I was finally able to get the sample .ExifTool_config file to work.
The whole reason for this is so I can get LR3 to correct for my Sigma 8-16mm, per these instruction by Beholder3:
http://www.pentaxforums.com/forums/post-processing-articles/176330-sigma-8-16-mm-lens-correction-metadata-ps-lr-especially-8-mm.html

The .ExifTool_config file I created was:

%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
Calc35mm => {
Require => 'copy2:FocalLength',
ValueConv => '$val * 1.5'},
},
);


Then I ran this command:

exiftool -exif:FocalLength<copy2:FocalLength MYIMAGEFILE


However, when i run that, I get this:
-bash: copy2:FocalLength: No such file or directory

What do I need to modify in the above code to get the 8mm in the focal length of my image's exif ?

Thanks again!



Phil Harvey

I think the command you wanted was this:

exiftool "-exif:focallength<calc35mm" MYIMAGEFILE

You forgot the quotes, and you didn't use the user-defined tag that you created.

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

cali92rs

It seems like I am close, but not quite there yet.
I run this command line:

exiftool "-exif:FocalLength<copy2:FocalLength" "-exif:FocalLengthIn35mmFormat<Calc35mm" MYIMAGEFILE.DNG

And I get confirmation that 1 file was updated, I check the Exif data and focal length = 8.1mm and 35mm equivalent = 12.1mm, so it looks ok.
However, when I enable profile correction in LR3 Develop, nothing happens.
Any idea why?

Thanks again in advance!

Phil Harvey

Sorry, I don't know what information the LR3 profile correction requires.

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

cali92rs

I finally got it!

My command line should've looked like this:

exiftool '-exif:FocalLength<copy2:FocalLength' '-exif:FocalLengthIn35mmFormat<Calc35mm' MYIMAGEFILE.DNG

Instead of the full quotation marks " i was using previously...works great now.  Thanks for all your help Phil!

Phil Harvey

The double quotes in your previous command will work on all systems (Windows and Mac/Linux).

The single quotes in this command will work only on Mac/Linux.

If you are running on Mac/Linux, the two commands are equivalent.

So there must be something else that changed if you think it is now working.  Could it be that you forgot to re-import the image into LR?

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

cali92rs

Phil,

I ran it both ways, single and double quotes, and both yielded the same results, as you said would happen.
I believe what happened before is that I did not load the .ExifTool_config file, or if I did, it was a different version.  I must have created and re-created 50 versions during my trials and error session.  So I re-created proper the file, with:

print "LOADED!\n";

As prescribed by your FAQ to verify that it loaded correctly, and it worked from there :)

Thanks again :D

Phil Harvey

Great!

You get bonus points for reading the FAQ. :)

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