View previous topic :: View next topic |
Author |
Message |
fotomachi
Joined: 02 Feb 2008 Posts: 638 Location: Estados Unidos de las Esferas Ultraterrenales
|
Posted: Sat Feb 18, 2012 3:45 pm Post subject: Exiftool for MF lenses |
|
|
fotomachi wrote:
The following is written with Lightroom in mind... Perhaps it is important to know that I have written these small "scripts" for use with NEX.
I would like to write basic lens information to the EXIF for use in Lightroom. If I use an Industar-26m, I want to put that in the EXIF. Problem is, I may have several copies of the same lens, so I'll want to write something like a serial number as well. And while we're at it, I want to put the used f-value as well. I use the following cmd line for exiftool:
exiftool -@ ARGFILE RAWDIR
ARGFILE is named for the particular lens that I used:
czjtessar50exa.txt: Carl Zeiss Jena Tessar 50mm f/3.5 (EXA)
jupiter9LTM.txt: Jupiter 9 8.5cm f/2 (M39)
nikon50f18.txt: Nikon 50mm f/1.8
yashica28.txt: Yashica ML 28mm f/2.8
etc....
RAWDIR is the directory that contains the RAW-files I want to change. So the command line may become something like this:
exiftool -@ czjtessar50exa.txt H:\RAW\2012\20120218.Family.NEX\
Now let's take a look at the content of czjtessar50exa.txt:
Quote: |
-n
-XMP:Lens=Carl Zeiss Jena Tessar 50mm f/3.5 (EXA)
-XMP:SerialNumber=3692001
-EXIF:MaxApertureValue=3.5
-EXIF:FocalLength=50
-EXIF:FocalLengthIn35mmFormat=50
-EXIF:FNumber=5.6
|
Note that it will write the f-value to all RAW-files, so it's useful if all pictures are made at the same aperture setting. If this is not the case, drop the line, or write scripts per used f-value and divide your images over different directories. It's not difficult but becomes "laborious". You'd also have to remember all used settings or - like in the old days - write them down
Now let's take a look at the content of yashica28.txt:
Quote: |
-n
-XMP:Lens=Yashica ML 28mm f/2.8
-XMP:SerialNumber=A12019868
-EXIF:MaxApertureValue=2.8
-EXIF:FocalLength=28
-EXIF:FocalLengthIn35mmFormat=28
-EXIF:FNumber=4
|
All photos made were at f/4.
Now a last one especially for those hung up on ruski optics and the Π-symbol:
Quote: |
-n
-ex
-XMP:Lens=Jupiter-9 8,5cm f/2 Π ; (M39)
-XMP:SerialNumber=5800237 Π ;
-EXIF:MaxApertureValue=2
-EXIF:FocalLength=85
-EXIF:FocalLengthIn35mmFormat=85
-EXIF:FNumber=2
|
You have to remove the space between Π and ; to make it work.
And if it works like on my computer, all these date should show up in LR. It's now easy to search in the archives for all photos made by a certain lens.
Hope it was useful. _________________ :::[ f o t o m a c h i . M X ]:::
:::[ F o T o M a C h i . C o M ]:::
:::[ M y . l e n s . c o l l e c t i o n ]:::
:::[ M a c h i g l a z k i . О п т и к . B l o g ]::: |
|
Back to top |
|
|
Attila
Joined: 24 Feb 2007 Posts: 57865 Location: Hungary
Expire: 2025-11-18
|
Posted: Sat Feb 18, 2012 5:26 pm Post subject: |
|
|
Attila wrote:
Great hint! Many thanks! _________________ -------------------------------
Items on sale on Ebay
Sony NEX-7 Carl Zeiss Planar 85mm f1.4, Minolta MD 35mm f1.8, Konica 135mm f2.5, Minolta MD 50mm f1.2, Minolta MD 250mm f5.6, Carl Zeiss Sonnar 180mm f2.8
|
|
Back to top |
|
|
dani9batan
Joined: 19 Jan 2012 Posts: 218 Location: Madrid (Spain)
|
Posted: Thu Mar 01, 2012 8:49 am Post subject: |
|
|
dani9batan wrote:
Hi,
Does anyone could explain how to get the EXIF data of the target in Lightroom or Photoshop? I would like to do but I am in capable.
Thank you. _________________ Canon EOS 5D Mark II, Contax 167MT
Contax Distagon T* 2,8/28
Contax Planar T* 1,7/50 (x2)
Contax Planar T* 1,4/85
Contax Sonnar T* 2,8/135
|
|
Back to top |
|
|
fotomachi
Joined: 02 Feb 2008 Posts: 638 Location: Estados Unidos de las Esferas Ultraterrenales
|
Posted: Thu Mar 01, 2012 10:30 am Post subject: |
|
|
fotomachi wrote:
dani9batan wrote: |
Hi,
Does anyone could explain how to get the EXIF data of the target in Lightroom or Photoshop? I would like to do but I am in capable.
Thank you. |
Tal vez le ayude este link para encontrar los datos EXIF en LR.
Perhaps this link (en español) will help you. _________________ :::[ f o t o m a c h i . M X ]:::
:::[ F o T o M a C h i . C o M ]:::
:::[ M y . l e n s . c o l l e c t i o n ]:::
:::[ M a c h i g l a z k i . О п т и к . B l o g ]::: |
|
Back to top |
|
|
dani9batan
Joined: 19 Jan 2012 Posts: 218 Location: Madrid (Spain)
|
Posted: Thu Mar 01, 2012 11:00 am Post subject: |
|
|
dani9batan wrote:
fotomachi wrote: |
dani9batan wrote: |
Hi,
Does anyone could explain how to get the EXIF data of the target in Lightroom or Photoshop? I would like to do but I am in capable.
Thank you. |
Tal vez le ayude este link para encontrar los datos EXIF en LR.
Perhaps this link (en español) will help you. |
Thanks! but I would want to change this EXIF data; change de name of the lens and the aperture of diaphragm.
Gracias por el español _________________ Canon EOS 5D Mark II, Contax 167MT
Contax Distagon T* 2,8/28
Contax Planar T* 1,7/50 (x2)
Contax Planar T* 1,4/85
Contax Sonnar T* 2,8/135
|
|
Back to top |
|
|
fotomachi
Joined: 02 Feb 2008 Posts: 638 Location: Estados Unidos de las Esferas Ultraterrenales
|
Posted: Thu Mar 01, 2012 12:25 pm Post subject: |
|
|
fotomachi wrote:
You need to have exiftool installed. You can get this program here: http://www.sno.phy.queensu.ca/~phil/exiftool/
Then you write a file that includes all the data you want to change, also known as ARG-file. I make individual text files for every lens that I have. For instance yashica28.txt
Code: |
-n
-XMP:Lens=Yashica ML 28mm f/2.8
-XMP:SerialNumber=A12019868
-EXIF:MaxApertureValue=2.8
-EXIF:FocalLength=28
-EXIF:FocalLengthIn35mmFormat=28
-EXIF:FNumber=4 |
FNumber is the only "variable". I usually always use the same f-value during a certain time or write down the used settings in a small notebook I always carry with me. All the ARG-files I have are stored in the same directory as the exiftool executable.
In windows, I add the following in the command line:
exiftool -@ ARGFILE RAWDIR
Where ARGFILE is the name of the ARG-file and RAWDIR is the directory that contains all the RAW-files I want to change. I change the RAW-files, but you off course do the same for jpegs or whatever.
In the command line of windows, I will give the following command (for example):
exiftool -@ yashica28.txt H:\RAW\2012FEB12\
And it will change all the files within that directory. You may want to change only one file:
exiftool -@ yashica28.txt H:\RAW\2012FEB12\DSC_7890.NEF
That is really all there is to it _________________ :::[ f o t o m a c h i . M X ]:::
:::[ F o T o M a C h i . C o M ]:::
:::[ M y . l e n s . c o l l e c t i o n ]:::
:::[ M a c h i g l a z k i . О п т и к . B l o g ]::: |
|
Back to top |
|
|
dani9batan
Joined: 19 Jan 2012 Posts: 218 Location: Madrid (Spain)
|
Posted: Thu Mar 01, 2012 1:37 pm Post subject: |
|
|
dani9batan wrote:
This is for Windows? I work on MAC
Thank you very much for your help fotomachi. _________________ Canon EOS 5D Mark II, Contax 167MT
Contax Distagon T* 2,8/28
Contax Planar T* 1,7/50 (x2)
Contax Planar T* 1,4/85
Contax Sonnar T* 2,8/135
|
|
Back to top |
|
|
fotomachi
Joined: 02 Feb 2008 Posts: 638 Location: Estados Unidos de las Esferas Ultraterrenales
|
Posted: Thu Mar 01, 2012 3:11 pm Post subject: |
|
|
fotomachi wrote:
dani9batan wrote: |
This is for Windows? I work on MAC
Thank you very much for your help fotomachi. |
On the website (http://www.sno.phy.queensu.ca/~phil/exiftool/) there is also an executable for MAC... Don't know how to do it for MAC though... _________________ :::[ f o t o m a c h i . M X ]:::
:::[ F o T o M a C h i . C o M ]:::
:::[ M y . l e n s . c o l l e c t i o n ]:::
:::[ M a c h i g l a z k i . О п т и к . B l o g ]::: |
|
Back to top |
|
|
std
Joined: 09 Feb 2010 Posts: 1826 Location: Bulgaria
|
Posted: Thu Mar 01, 2012 3:42 pm Post subject: |
|
|
std wrote:
Very nice trick.
Thanks for sharing. _________________ Stefan
My lens list:
SLR MD: Rokkor 1,7/50 Exakta: Kilfitt-Makro-Kilar E 3.5/4cm; CZJ 2/50 Pancolar;M42: CZJ 2.8/50 Tessar; Mir-1B 2.8/37; Jupiter-9 2/85 T-mount: Tamron 5.9/200; Tamron 6.9/300; Tamron 7.5/400 C-mount: Cosmicar 1.8/50 Y/S: Sun 3.5/38-90, Sun 4/70-210 RF Contax RF: Jupiter-8 2/50; Contax G:CZ 2,8/21 Biogon T; CZ 2,8/28 Biogon T; CZ 2/35 Planar T; CZ 2/45 Planar T; CZ 2,8/90 Sonnar T |
|
Back to top |
|
|
dani9batan
Joined: 19 Jan 2012 Posts: 218 Location: Madrid (Spain)
|
Posted: Thu Mar 01, 2012 3:51 pm Post subject: |
|
|
dani9batan wrote:
I am unable to get that, someone knows how to do it on Mac? _________________ Canon EOS 5D Mark II, Contax 167MT
Contax Distagon T* 2,8/28
Contax Planar T* 1,7/50 (x2)
Contax Planar T* 1,4/85
Contax Sonnar T* 2,8/135
|
|
Back to top |
|
|
marty
Joined: 09 Apr 2009 Posts: 767 Location: Italy
|
Posted: Sat Mar 03, 2012 9:52 am Post subject: |
|
|
marty wrote:
dani9batan wrote: |
I am unable to get that, someone knows how to do it on Mac? |
Hello, did you check this out: http://www.sno.phy.queensu.ca/~phil/exiftool/install.html?
The instructions seem detailed enough, more than this I can't tell since I'm no mac user.
Make sure you have "perl" installed.
Cheers, M. _________________ Canon FD
Bodies: AT-1, A-1, T-90
Lenses: nFD 20mm f2.8, 24 f2.8, 28 f2.8, 35 f2, FD 50 f1.8 S.C., 85 f1.8, 100 f2.8, 135 f2.8, 200 f4, 300 f4
|
|
Back to top |
|
|
dani9batan
Joined: 19 Jan 2012 Posts: 218 Location: Madrid (Spain)
|
Posted: Sun Mar 04, 2012 9:09 am Post subject: |
|
|
dani9batan wrote:
Thanks Marty, I'm going to try it _________________ Canon EOS 5D Mark II, Contax 167MT
Contax Distagon T* 2,8/28
Contax Planar T* 1,7/50 (x2)
Contax Planar T* 1,4/85
Contax Sonnar T* 2,8/135
|
|
Back to top |
|
|
dani9batan
Joined: 19 Jan 2012 Posts: 218 Location: Madrid (Spain)
|
Posted: Sun Mar 04, 2012 10:36 am Post subject: |
|
|
dani9batan wrote:
I got it! Thanks to everyone!
http://img833.imageshack.us/img833/5448/capturadepantalla201203z.jpg _________________ Canon EOS 5D Mark II, Contax 167MT
Contax Distagon T* 2,8/28
Contax Planar T* 1,7/50 (x2)
Contax Planar T* 1,4/85
Contax Sonnar T* 2,8/135
|
|
Back to top |
|
|
LGH
Joined: 31 Jan 2012 Posts: 46
|
Posted: Tue Mar 06, 2012 7:05 pm Post subject: |
|
|
LGH wrote:
Thanks photomachi for this informative post. I had been thinking about how I would go about adding lens information to my images.
However, the workflow that I ended up with looks a bit different from yours, mostly because I prefer to add the EXIF data once the images are imported. It is sometimes helpful to be able to look at the pictures in the grid view and select the ones you want to update.
I claim no originality in this, but I thought it would be helpful to others.
1. In the OSX Terminal application, either type the exiftool command line from memory or copy it from a text file, for example like this:
Code: |
exiftool -LensModel="Fujian 35mm f/1.7 CCTV" -FocalLength=35 -MaxApertureValue=1.7 -m -overwrite_original_in_place -P |
...Do not hit enter at this time. And whatever current directory you're in doesn't matter - the default (home directory) is fine.
2. In Lightroom's Library grid view, select the images you want to update.
3. Drag and drop the selected images onto the Terminal app. This will add the complete file names to the command line (recent versions of Windows cmd.exe should behave the same). Now hit enter to have exiftool work its magic on your files.
4. When done, go back to Lightroom, select Read metadata from files from the Metadata menu.
That's pretty much it. Lightroom should display your added EXIF data.
Also, it appears that my NEX-5N writes EXIF somewhat different other cameras I have used. I have to use "LensModel" instead of "Lens" in order for Lightroom to properly pick up and display the lens for some reason. Or it could just be that I'm now using Lightroom version 4, but I doubt it. _________________ Sony NEX-5N, Canon EOS 7D |
|
Back to top |
|
|
fotomachi
Joined: 02 Feb 2008 Posts: 638 Location: Estados Unidos de las Esferas Ultraterrenales
|
Posted: Wed Mar 07, 2012 7:42 am Post subject: |
|
|
fotomachi wrote:
Quote: |
Also, it appears that my NEX-5N writes EXIF somewhat different other cameras I have used. I have to use "LensModel" instead of "Lens" in order for Lightroom to properly pick up and display the lens for some reason. Or it could just be that I'm now using Lightroom version 4, but I doubt it. |
That may well be possible... I wrote these small ARG-files for a NEX-5 and a D700 and they work for those two cameras. There are often minor differences in EXIF between the camera models. For instance,
Code: |
-XMP:SerialNumber=A12019868 |
is displayed properly for all lenses when the NEX-5 was used, but in case of the D700, the serial number of my D700 camera is displayed. However, SerialNumber is written to the file and there is no interference between the lens and the camera serial number. _________________ :::[ f o t o m a c h i . M X ]:::
:::[ F o T o M a C h i . C o M ]:::
:::[ M y . l e n s . c o l l e c t i o n ]:::
:::[ M a c h i g l a z k i . О п т и к . B l o g ]::: |
|
Back to top |
|
|
fotomachi
Joined: 02 Feb 2008 Posts: 638 Location: Estados Unidos de las Esferas Ultraterrenales
|
Posted: Sun Mar 18, 2012 8:05 pm Post subject: |
|
|
fotomachi wrote:
I've updated to LR4 and guess what... it doesn't work anymore
After doing some reading, I changed the following parameter:
Code: |
-XMP:Lens=Nikon S.C Auto 50mm f/1.4 pre-Ai
|
to the following:
Code: |
-EXIF:LensModel=Nikon S.C Auto 50mm f/1.4 pre-Ai
|
And it works again (at least for Sony NEX-5 and LR4). _________________ :::[ f o t o m a c h i . M X ]:::
:::[ F o T o M a C h i . C o M ]:::
:::[ M y . l e n s . c o l l e c t i o n ]:::
:::[ M a c h i g l a z k i . О п т и к . B l o g ]::: |
|
Back to top |
|
|
GrahamNR17
Joined: 17 Jan 2009 Posts: 1855 Location: Norfolk, UK
Expire: 2012-09-06
|
Posted: Sun Mar 18, 2012 8:10 pm Post subject: |
|
|
GrahamNR17 wrote:
Good job I'm a patient man. Page two of this thread so far, and still none of it makes any sense to me |
|
Back to top |
|
|
fotomachi
Joined: 02 Feb 2008 Posts: 638 Location: Estados Unidos de las Esferas Ultraterrenales
|
Posted: Mon Mar 19, 2012 10:37 am Post subject: |
|
|
fotomachi wrote:
GrahamNR17 wrote: |
Good job I'm a patient man. Page two of this thread so far, and still none of it makes any sense to me |
Is it because it's not explained well enough? If that is the case, input to make it easier to do/understand is welcome off course. _________________ :::[ f o t o m a c h i . M X ]:::
:::[ F o T o M a C h i . C o M ]:::
:::[ M y . l e n s . c o l l e c t i o n ]:::
:::[ M a c h i g l a z k i . О п т и к . B l o g ]::: |
|
Back to top |
|
|
std
Joined: 09 Feb 2010 Posts: 1826 Location: Bulgaria
|
Posted: Mon Mar 19, 2012 11:08 am Post subject: |
|
|
std wrote:
I think that just adding tags with the name of the lens used in LR is kind of faster and easier to do. Those tags are also saved to Exif when you export from LR.
Exiftool is a command line tool and it's not so easy to manipulate from LR for individual photos. _________________ Stefan
My lens list:
SLR MD: Rokkor 1,7/50 Exakta: Kilfitt-Makro-Kilar E 3.5/4cm; CZJ 2/50 Pancolar;M42: CZJ 2.8/50 Tessar; Mir-1B 2.8/37; Jupiter-9 2/85 T-mount: Tamron 5.9/200; Tamron 6.9/300; Tamron 7.5/400 C-mount: Cosmicar 1.8/50 Y/S: Sun 3.5/38-90, Sun 4/70-210 RF Contax RF: Jupiter-8 2/50; Contax G:CZ 2,8/21 Biogon T; CZ 2,8/28 Biogon T; CZ 2/35 Planar T; CZ 2/45 Planar T; CZ 2,8/90 Sonnar T |
|
Back to top |
|
|
n6mod
Joined: 20 Oct 2008 Posts: 134 Location: Boulder Creek, CA, USA
|
Posted: Thu Mar 22, 2012 2:51 pm Post subject: |
|
|
n6mod wrote:
I did roughly the same thing a couple of years ago, thinking about processing a whole card's worth of images at a time.
The result is in https://github.com/zandr/LensTag. You give it a config file for the lens, optionally a GPS log, and a list of files (usually * in a directory) and it adds the tags.
I've recently dusted this off because of a brilliant suggestion. I've condensed the config files to the point where they'll fit in a QR code. Now, when I'm in the field shooting and switch lenses, I snap a pic of the QR code for that lens and go on my way.
I'm now working on the code to scan a directory of pictures looking for QR codes. It's a little bit tricky: I need to be sure I'm processing them in order by EXIF date, since file numbers can wrap around.
I also use an external GPS logger, so I'm working on a solution for synchronizing camera clocks as well. There are in fact iPhone and Android apps that show a QR code clock. |
|
Back to top |
|
|
peterqd
Joined: 28 Feb 2007 Posts: 7448 Location: near High Wycombe, UK
Expire: 2014-01-04
|
Posted: Thu Mar 22, 2012 3:05 pm Post subject: |
|
|
peterqd wrote:
GrahamNR17 wrote: |
Good job I'm a patient man. Page two of this thread so far, and still none of it makes any sense to me |
+1
Sigh - how quickly one gets left behind in this modern fast-moving technological world! _________________ Peter - Moderator |
|
Back to top |
|
|
fotomachi
Joined: 02 Feb 2008 Posts: 638 Location: Estados Unidos de las Esferas Ultraterrenales
|
Posted: Thu Mar 22, 2012 3:25 pm Post subject: |
|
|
fotomachi wrote:
n6mod wrote: |
I did roughly the same thing a couple of years ago, thinking about processing a whole card's worth of images at a time.
The result is in https://github.com/zandr/LensTag. You give it a config file for the lens, optionally a GPS log, and a list of files (usually * in a directory) and it adds the tags.
I've recently dusted this off because of a brilliant suggestion. I've condensed the config files to the point where they'll fit in a QR code. Now, when I'm in the field shooting and switch lenses, I snap a pic of the QR code for that lens and go on my way.
I'm now working on the code to scan a directory of pictures looking for QR codes. It's a little bit tricky: I need to be sure I'm processing them in order by EXIF date, since file numbers can wrap around.
I also use an external GPS logger, so I'm working on a solution for synchronizing camera clocks as well. There are in fact iPhone and Android apps that show a QR code clock. |
That actually is a brilliant suggestion.. !
It's something I'm going to dig out a bit deeper as well _________________ :::[ f o t o m a c h i . M X ]:::
:::[ F o T o M a C h i . C o M ]:::
:::[ M y . l e n s . c o l l e c t i o n ]:::
:::[ M a c h i g l a z k i . О п т и к . B l o g ]::: |
|
Back to top |
|
|
Orio
Joined: 24 Feb 2007 Posts: 29545 Location: West Emilia
Expire: 2012-12-04
|
Posted: Thu Mar 22, 2012 3:32 pm Post subject: |
|
|
Orio wrote:
peterqd wrote: |
GrahamNR17 wrote: |
Good job I'm a patient man. Page two of this thread so far, and still none of it makes any sense to me |
+1
Sigh - how quickly one gets left behind in this modern fast-moving technological world! |
Important things to understand in life:
Not-so-important things:
I'd say everything is allright _________________ Orio, Administrator
T*
NE CEDE MALIS AUDENTIOR ITO
Ferrania film is reborn! http://www.filmferrania.it/
Support the Ornano film chemicals company and help them survive!
http://forum.mflenses.com/ornano-chemical-products-t55525.html |
|
Back to top |
|
|
peterqd
Joined: 28 Feb 2007 Posts: 7448 Location: near High Wycombe, UK
Expire: 2014-01-04
|
Posted: Thu Mar 22, 2012 5:51 pm Post subject: |
|
|
peterqd wrote:
You cheered me up Orio! Everything is still all right with the world.
I like your style too, food above women. But where's the beer? _________________ Peter - Moderator |
|
Back to top |
|
|
GrahamNR17
Joined: 17 Jan 2009 Posts: 1855 Location: Norfolk, UK
Expire: 2012-09-06
|
Posted: Thu Mar 22, 2012 6:04 pm Post subject: |
|
|
GrahamNR17 wrote:
peterqd wrote: |
You cheered me up Orio! Everything is still all right with the world. |
+1
I shall, from this day forward, live my life by Orio's teachings |
|
Back to top |
|
|
|