• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Lightroom change la date de capture au moment de l'enregistrement de mots clés

Explorer ,
May 28, 2021 May 28, 2021

Copy link to clipboard

Copied

Salut la communauté, j'ai bien vu les posts les plus proches de cette présente question mais je n'ai toujours pas de solution adaptée aux gros volumes à traiter.

 

J'utilise Lightroom pour taguer mes photos, ce qui me permet de les retrouver plus efficacement par la suite soit dans Windows, soit dans Moments (Synology), etc.

L'intérêt est donc que les mots clés soient enregistrés dans le champs correspondant de chaque photo.

Lorsque je demande à Lightroom d'enregistrer les changements, il enregistre les mots clés mais remplace aussi la date de capture par la date du jour.

Il existe des outils qui permettent de modifier la date mais lorsque l'on a des miliers de photos à des dates et heures différentes, cette solution n'est tout simplement pas adaptée.

 

Comment faire pour n'enregistrer que les métadonnées modifiées et non la date de capture qui n'a jamais été modifiée ?

Il n'est pas question ici d'export de nouveaux fichiers mais bien d'écriture dans les fichiers originaux.

 

Au plaisir de vous lire.

Views

887

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 07, 2021 Jun 07, 2021

"It's fortunate that each picture is properly named as follows : aaaammdd_hhmmss.jpg (for instance : 20210607_175459.jpg) So I need to find a script that writes the date/time from the name to the capture date."

 

One approach doesn't require programming: Export as a text file a list of all the file paths using the Any Filter, List View, or LR/Transporter plugins. 

 

1. Select all the photos and do Metadata > Save Metadata To File.

 

2. Use a text editor with regular expressions or Excel (if you're an

...

Votes

Translate

Translate
LEGEND ,
May 28, 2021 May 28, 2021

Copy link to clipboard

Copied

Please state clearly if you are using Lightroom or Lightroom Classic, and the version NUMBER.

 

Please state clearly your operating system version NUMBER.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 28, 2021 May 28, 2021

Copy link to clipboard

Copied

Thank you for your answer @dj_paige

I'm using Lightroom Classic v.10.2 and Windows 10 v.19.09

Still this issue is the sams whatever version I'm using (earlier versions of Lightroom Classic and Windows 7)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 28, 2021 May 28, 2021

Copy link to clipboard

Copied

In Windows 10, I see RAW files have not had their creation date changed when I add metadata via Lightroom. For JPGs, the creation date changes, but there is another field in Windows Explorer named "Date Taken", it doesn't show by default but it can be turned on, which does not change when you update the metadata.

 

I am curious, however, why this is an issue. In Lightroom Classic, the capture date does not change when you add metadata, and so photos are always searchable by capture date. In my opinion, I think all searching for photos should be done in Lightroom Classic, and so the issue goes away.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 28, 2021 May 28, 2021

Copy link to clipboard

Copied

Google Translation: "Lightroom changes capture date when saving keywords. 

 

Hi community, I saw the posts closest to this question, but I still don't have a suitable solution for large volumes to process.

 

I use Lightroom to tag my photos, which allows me to find them more efficiently afterwards either in Windows, or in Moments (Synology), etc.

The advantage is therefore that the keywords are recorded in the corresponding field of each photo.

When I ask Lightroom to save the changes, it saves the keywords but also replaces the capture date with today's date.

There are tools that allow you to change the date but when you have thousands of photos at different dates and times, this solution is simply not suitable.

 

How to save only the modified metadata and not the capture date which has never been modified?

There is no question here of exporting new files but of writing to the original files."

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 28, 2021 May 28, 2021

Copy link to clipboard

Copied

It sounds like these photos are missing capture dates stored in their metadata. There are many reasons a photo may be missing a capture date, including: It came from a scanne or an old digital camera, or it was downloaded from an online service that stripped metadata from the photo.

 

When LR imports a photo that is missing capture date in its metadata, LR uses as its capture date the file's date-modified field that is maintained by the operating system.  The file's date-modified changes whenever any app changes the file for whatever reason.  When the date-modified changes, LR immediately notices and sets the photo's capture date in the catalog to that new date-modified.  (This is a horrible product design, but Adobe has never cared about supporting metadata of photos coming from other than modern digital cameras.)

 

So when you change the photo's keywords and then do Metadata > Save Metadata To File (or if you have set the option Catalog Settings > Metadata > Automatically Write Changes Into XMP), LR updates the photo's file with the new keywords and the operating system changes the file's date-modified to "now".  LR notices that and immediately changes the capture date recorded in the catalog to "now".

 

To work around this:

 

1. Make a backup of your catalog (better, make two backups).  LR doesn't let you undo changes to capture date.

 

2. Uncheck the option Catalog Settings > Metadata > Automatically Write Changes Into XMP.

 

3. Select all photos and do Metadata > Edit Capture Time. Immediately click Change All. 

 

These steps record the capture date currently displayed by LR for each photo into the photo's EXIF metadata (where digital cameras record it). Going forward, any changes to the photo won't cause the capture date to change.  Note that step 3 DOES NOT change all the photos to have the same date.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 31, 2021 May 31, 2021

Copy link to clipboard

Copied

Thank you for your answer @johnrellis 

I will follow your advice and run some tests. Then I'll come with updates on this issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 07, 2021 Jun 07, 2021

Copy link to clipboard

Copied

I ran a fews tests checking the before-after for each picture properties and I come back to give feedback.

Since the Edit Capture Time is initially set to "Adjust to a specified date and time", for step 3, I would add :

"Select all photos and do Metadata > Edit Capture Time > Change to file's creation date. Immediately click Change All."

 

Now my problem stays the same because the creation time isn't the right one. It tends to be the time when the OS wrote the file on the hard drive. (Creation time and Modified time are allways the same. Shame)

 

It's fortunate that each picture is properly named as follows : aaaammdd_hhmmss.jpg (for instance : 20210607_175459.jpg)

 

So I need to find a script that writes the date/time from the name to the capture date. This stays my quest and I'm still grateful to this community for having helped me around Lightroom.

Still if someone has it in Python or whatever, please let me know and I'll buy you a beer 😉

 

Best regards,

Laurent

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 07, 2021 Jun 07, 2021

Copy link to clipboard

Copied

'Since the Edit Capture Time is initially set to "Adjust to a specified date and time", for step 3, I would add :

"Select all photos and do Metadata > Edit Capture Time > Change to file's creation date. Immediately click Change All."'

 

When the photos are missing capture dates on import and the file-created date is the same as the file-modified date for each of the photos, then Adjust To A Specified Date And Time and Change To File's Creation Date have the same effect.  This is because LR sets the initial catalog capture date of these photos to the file-modified date (which is the same as the file-created date in this case). 

 

(Note that Adjust To A Specified Date And Time does not set all the photos to have the same date -- as the command explains, it shifts all the photos' capture dates by the amount that the most-selected photo is adjusted.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 07, 2021 Jun 07, 2021

Copy link to clipboard

Copied

"It's fortunate that each picture is properly named as follows : aaaammdd_hhmmss.jpg (for instance : 20210607_175459.jpg) So I need to find a script that writes the date/time from the name to the capture date."

 

One approach doesn't require programming: Export as a text file a list of all the file paths using the Any Filter, List View, or LR/Transporter plugins. 

 

1. Select all the photos and do Metadata > Save Metadata To File.

 

2. Use a text editor with regular expressions or Excel (if you're an Excel junky) to transform that list to a list of shell commands invoking the free Exiftool utility to set the files' EXIF:DateTimeOriginal field. E.g. given this line in the text file:

 

/users/john/pictures/20210607_175459.jpg

 

the text editor or Excel formula transforms it to this line:

 

exiftool -exif:datetimeoriginal="2021:06:07 17:54:59" "/users/john/pictures/20210607_175459.jpg"

 

3. Run that shell script / batch file.

 

4. With all the photos selected, do Metadata > Read Metadata From File.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 08, 2021 Jun 08, 2021

Copy link to clipboard

Copied

Thankyou again @johnrellis for this great tip. I'm an Excel/vba junky so I may develop the right program that can :

  1. Check if the capture date is the same between capture date and file name (It happens sometimes)
  2. Fix each empty capture date

 

Then I can upload the excel file so that anyone can use it.

I wonder if I check this thread as solved, I may not be able to do so, right ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

Hi @johnrellis 

I come back to give some feedback on the process.

I exported metadata using AnyFilter but as many of these plugins, the result doesn't keep the western european accents in the paths of the photos.

So now I only use a .bat file to extract what I need the way I need. Here is the process:

 

1_Lister.bat

chcp 65001 > null
exiftool -csv -m -r -L "-exif:datetimeoriginal" "-filemodifydate" %* > C:\Path\2_Listing.csv
pause

 

I drag and drop a folder containing many subfolders and pictures on this .bat file, then it creates/erases the following file:

2_Listing.csv

Which contains:

  • paths_with_accents\filenames.ext,
  • Capture date
  • Modified date.

 

Then I open my new automated best friend:

3_ListingToScript.xlsx

It imports the list from above .csv file,

then splits and filters data into columns:

  • Path,
  • File,
  • Capture date,
  • Modified date,
  • File name,
  • Extension,
  • Whether the file name is a date or not,
  • Date extracted from file name,
  • Time extracted from file name,
  • Date extracted from DateTimeOriginal (capture time),
  • Time extracted from DateTimeOriginal (capture time),
  • Whether the capture time is missing,
  • Delta between File name and capture time (can be relevant),
  • ExifTool batch command line (only if needed)

 

Then the ExifTool batch command lines are pasted on the following .bat file:

 

4_Script.bat

chcp 65001 > null
exiftool -exif:datetimeoriginal="2018:07:16 20:47:57 " "//server/homes/Path/20180716_204757.jpg
exiftool -exif:datetimeoriginal="2018:03:02 04:54:30 " "//server/homes/Path/20180302_045430.jpg
exiftool -exif:datetimeoriginal="2019:12:28 12:07:02 " "//server/homes/Path/20191228_120702.jpg

...

pause

 

I got 1981 lines at the first time.

Then I ran the 4_Script.bat and it did the job..

..sort of, I still need to fix a few date syntaxe bugs.

 

Best regards,

Laurent.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2021 Jul 02, 2021

Copy link to clipboard

Copied

Thanks for the update on your process -- that will help others.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2021 Jul 02, 2021

Copy link to clipboard

Copied

The problem with disappearing accented characters is an Excel issue. LR and LR plugins represent characters using Unicode UTF-8, and the Any Filter plugin writes CSV files in UTF-8. By default Windows Excel (but not Mac Excel) opens such files using some legacy character encoding.  See this thread for how to open UTF-8 CSV files in Excel. I forgot to warn you about this issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2021 Jul 02, 2021

Copy link to clipboard

Copied

LATEST

Oops, here's the thread I referenced: https: // stackoverflow .com / a /6 488070 . (Remove the spaces in the link -- the stupid forum software doesn't let me post the actual link.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines