S.O.S - Having issues with OneDrive and detecting the correct dates

Started by terikid874, April 16, 2023, 02:44:52 PM

Previous topic - Next topic

terikid874

Hello all,

First of all this is an amazing tool and I appreciate the support which looks to be provided on this forum by a very active team and developer.

I am migrating my photos and videos from Google Photos to Microsoft OneDrive.
I used Google Takeout, which downloaded my files along with an associated json file.

My example issue is that I have 2 .mp4 files, along with 2 .json files:
  • VID_20190829_194443.mp4 (2019)
  • VID_20190829_194443.mp4.json
  • VID-20220109-WA0010.mp4 (2022)
  • VID-20220109-WA0010.mp4.json

Prior to running Exiftool, both files in OneDrive Photos, were showing as today's date rather than the relevant date when the videos were taken (2019 and 2022).

I then ran the Exiftool, and one of the files (from 2022) showed correctly in OneDrive under the correct year, but the other file did not, and from what I can see, they both have the same information in the .JSON file so I am puzzled as to why one worked and not the other.

Commands I have ran:
  • C:\Windows\exiftool.exe -r -d %s -tagsfromfile "%d/%F.json" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" "-createdate<PhotoTakenTimeTimestamp" "-modifydate<PhotoTakenTimeTimestamp" "-MediaCreateDate<PhotoTakenTimeTimestamp" "-MediaModifyDate<PhotoTakenTimeTimestamp" -ext mp4 -overwrite_original "C:\OneDrive\<FILE>.mp4"
  • C:\Windows\exiftool.exe -r -d %s -tagsfromfile "%d/%F.json" "-AllDates<PhotoTakenTimeTimestamp" -ext mp4 -overwrite_original "C:\OneDrive\<FILE>.mp4"
  • C:\Windows\exiftool.exe -wm w -r -d %s -tagsfromfile "%d/%F.json" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" "-createdate<PhotoTakenTimeTimestamp" "-modifydate<PhotoTakenTimeTimestamp" "-MediaCreateDate<PhotoTakenTimeTimestamp" "-MediaModifyDate<PhotoTakenTimeTimestamp" -ext mp4 -overwrite_original "C:\OneDrive\<FILE>.mp4"
  • C:\Windows\exiftool.exe -wm w -r -d %s -tagsfromfile "%d/%F.json" "-AllDates<PhotoTakenTimeTimestamp" -ext mp4 -overwrite_original "C:\OneDrive\<FILE>.mp4"

The -wm w I think I read was to set the tage even if the tag didn't exist?

Next I then compared the two files' exif data. (Edited to include additional info which I saw which was was asked on another threat as part of troubleshooting). The left is incorrect and the right is correct in OneDrive Photos.
Screenshot 2023-04-16 202030.jpg

Looking in OneDrive, the photo which is correct has a "Taken" property, whereas the one with the incorrect date doesn't, but I cannot find what this "Taken" property is from on the photo. I think this is probably the issue.
Screenshot 2023-04-16 185831.jpg

Any advice is appreciated.


Phil Harvey

I can't speak for what metadata OneDrive recognizes, but you asked about the -wm w option.  This constrains ExifTool to write only existing tags.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: terikid874 on April 16, 2023, 02:44:52 PMI am migrating my photos and videos from Google Photos to Microsoft OneDrive.
I used Google Takeout, which downloaded my files along with an associated json file.

Did you add any data on the Google website?  Unless you did, you have no need of the json files.  Google does not strip away any metadata from the files.  If you copy data from the json files, you are overwriting the original data.

QuotePrior to running Exiftool, both files in OneDrive Photos, were showing as today's date rather than the relevant date when the videos were taken (2019 and 2022).

This was almost certainly the file system time stamp.  To see the actual date/time that is in the file, you need to look at the "Date Taken" for images and "Media Created" for videos.

QuoteI then ran the Exiftool, and one of the files (from 2022) showed correctly in OneDrive under the correct year, but the other file did not, and from what I can see, they both have the same information in the .JSON file so I am puzzled as to why one worked and not the other.

This points even more to the fact that you are looking at the file system time stamps, not the embedded metadata.

QuoteThe -wm w I think I read was to set the tage even if the tag didn't exist?

To only create new tags, you would want to use -wm cg

QuoteLooking in OneDrive, the photo which is correct has a "Taken" property, whereas the one with the incorrect date doesn't, but I cannot find what this "Taken" property is from on the photo. I think this is probably the issue.

See this post to see what tags Windows reads to fill the various Properties->Details.  I would think that OneDrive should be similar.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).