5 Replies Latest reply on Nov 9, 2014 2:59 PM by dcollett.seattle

    EXIF Dates - how to add/change using exiv2 . . . is there a better way?

    dcollett.seattle

      Hi, everyone!

       

      INTRO: I'm new to Lightroom. I've gone through a few books and lots of tutorial courses on lynda and youtube, so I feel quite comfortable with LR 5's import process. This post and question is a pre-import/organizational issue.

       

      I have more than 30,000 old, digitized (scanned) photos dating back to the 1950s. Obviously, most of were taken with old, analog cameras. These are now organized into folders by date.

       

       

      GOAL: I want to import these photos into LR and be able to find them by metadata dates (Capture Date & Time).

       

       

      PROBLEM: Obviously, old scanned (or even more recent manipulated) photos often don't have the correct EXIF creation date info. Even worse, many (or most) of these old images don't even have an EXIF date field!

       

       

      WHAT I'VE LEARNED: Using exiv2 filename or evix2 -pt filename immediately shows whether there is or is not date info for the photo. If there isn't, exiv2 -pt filename shows nothing. If there is an EXIF date field, it will be shown.

       

      For all these images with no date field, if I import them into Lightroom, there of course is no date info that shows up in the Metadata panel (under Default or EXIF), nor can you change the date (because the field isn't even there).

       

      If exiv2 -pt filename DOES show the Exif.Image.DateTime field, then in Lightroom, you will see the Capture Time and Capture Date fields, and you will see an icon to the right of those dates that allows you to change that date.

       

      If exiv2 -pt filename DOES NOT show this Exif.Image.DateTime field, you can ADD this field by using the command line:

      exiv2 -M"set Exif.Image.DateTime Ascii 1965:01:25 15:45:00" filename (or whatever your date/time is).

       

      Now if you import this image into LR, you will find the Capture Time and Capture Date fields under the Metadata > Default panel...AND you can edit them if needed. That is, the above exiv2 -M command added the EXIF date field that LR needs in order to search by date.

       

       

       

      WHAT'S MY POINT, AND WHAT'S MY QUESTION? I have no problem using exiv2 to add/change an EXIF creation DateTime field one folder at a time prior to importing them into LR. This will enable me to search on those date fields**.

       

      My question is this: Is there an easier method?

       

      Surely there must be tens (hundreds?) of thousands of "older" photographers like myself who have troves of old photos that have incorrect EXIF creation date fields, or missing the date field entirely (in which case, as I stated above, cannot be added/edited using LR, PS, FileMultiTool, Graphic Converter, etc.).

       

      I realize that I could look at images based on the folder names or file names, or I could enter dates into tags, but such methods of finding images are not nearly as convenient as using Metadata. Therefore, if I know that an image was taken in June 1962, then I'd like the EXIF metadata to have this info so that I can search on it. To have no EXIF date field or to have a date field that is incorrect is useless.

       

       

      I'D LOVE YOUR COMMENTS! If there is an easier or better way, I'd love for you to help! There are so many experienced photographers on this forum, and more than likely many of them have old photos with incorrect or missing EXIF date fields that they've brought into LR.

       

       

      THANKS! I'll really appreciate any and all help you can offer.

       

      David

       

       

      ** there are other EXIF date fields that can be changed using exiv2: Exif.Photo.DateTimeOriginal, Exif.Photo.DateTimeDigitized, etc. But the principal date that LR uses to search for files is the one described above.



      P.S. I've also tried jhead -ds1965:01:25 filename (or whatever your date is) to change the date. This works ONLY IF there is already an EXIF date field present. If not, jhead will report an error and not create one. exiv2 -M will create the field.


        • 1. Re: EXIF Dates - how to add/change using exiv2 . . . is there a better way?
          johnrellis Most Valuable Participant

          The LR command Metadata > Edit Capture Time lets you change the capture time of photos even if they don't currently have a capture time.  So you don't need to set the capture time with an external program.

           

          Unfortunately, the command doesn't let you change a batch of photos all to the same date/time -- it always shifts the current date/times of the batch by the same amount.  If you want to set the batch to have exactly the same date/time (which is common when working with scanned pics), then there are at least two plugins that let you do that: Capture Time To Exif and Exif Meta (free).

           

          Note that  the field EXIF:DateTime is intended to be the last time that a software application changed the pic.  If not other metadata date/time fields exist, LR will use that field for its capture time. But the standard metadata fields for representing capture time are EXIF:DateTimeOriginal  and XMP:DateCreated -- LR will use these for its capture time if they are present.

          • 2. Re: EXIF Dates - how to add/change using exiv2 . . . is there a better way?
            dcollett.seattle Level 1

            John,

             

            Thanks very much for your help! I had tried the plugin, exiv2, exiftool, and LR's Metadata menu option only on a single photo.

             

            You are 100% correct about LR's menu option assigning different times! Thank you for pointing this out.

             

            When I set the date and time for about 10 photos, LR's menu option assigned (seemingly random!) times to all of them. Why would LR do this? I can perhaps see offsetting each photo by 1 second (00, 01, 02,...), but simply assigning random times makes no sense at all. At least in the tests I just did, LR didn't shift the time by the same amount, but assigned totally (random?) times to every photo.

             

            Another problem that I found with the LR menu item is that it failed to change the date/time at all for several of the images I selected! The Capture Time To Exif plugin, exiv2, and exiftool had no problem at all with the same photos.

             

            I also looked at the ExifMeta by Rob Cole that you mentioned. It looks very powerful (and is free), but much more complex than what I need at this point.

             

            Therefore, I purchased the Capture Time To Exif plugin, and it works great on multiple photos.

             

            ---

             

            I now have good methods to change the date for multiple images:

             

            1. Prior to import: exiv2 or exiftool

             

            2. After import: John's Capture Time To Exif plugin

             

             

            Thank you again for your help!

            This brings me one step closer to importing my photos in a logical method.

             

            David

            • 3. Re: EXIF Dates - how to add/change using exiv2 . . . is there a better way?
              johnrellis Most Valuable Participant

              When I set the date and time for about 10 photos, LR's menu option assigned (seemingly random!) times to all of them. Why would LR do this? I can perhaps see offsetting each photo by 1 second (00, 01, 02,...), but simply assigning random times makes no sense at all. At least in the tests I just did, LR didn't shift the time by the same amount, but assigned totally (random?) times to every photo.

              Normally, when you change the capture time of multiple photos, LR shifts each photo by the difference between the time you enter and the time of the most selected photo.

               

              I suspect you're tripping over a known LR bug with scanned photos that have EXIF:DateTime but not EXIF:DateTimeOriginal.  In that case, LR shows one date/time under the thumbnail but uses another for its internal capture time.  In this situation, things can get very confusing.  The best way to clean this up is to make sure all your photos have EXIF:DateTimeOriginal before importing.

              • 4. Re: EXIF Dates - how to add/change using exiv2 . . . is there a better way?
                johnrellis Most Valuable Participant

                Hit Submit too early: The best way to clean this up is to make sure all your photos have EXIF:DateTimeOriginal before importing, or to explicitly set capture time with the LR Edit Capture Command or one of the plugins.

                • 5. Re: EXIF Dates - how to add/change using exiv2 . . . is there a better way?
                  dcollett.seattle Level 1

                  Hi, John. Thanks again for your help.

                   

                  I think you are exactly correct what the LR menu item is doing. The plugin or using exiv2 or exiftool eliminates that problem. In fact, using the exiftool -AllDates.. method, all 3 dates are created/set to exactly the time you specify, regardless of the number of images you select.

                   

                  At any rate, I purchased the LR plugin (for 10 euros), so now I can use it after I've imported images, or use exiv2/exiftool prior to import.

                   

                  It would be nice if Adobe fixed this issue and gave us some options to set dates for any number of photos easily (whether the photos had or didn't have certain date fields already).

                   

                  David