ExifTool Forum

ExifTool => Newbies => Topic started by: steinarb on August 04, 2022, 10:26:17 AM

Title: Unable to set "create date" on one stubborn file
Post by: steinarb on August 04, 2022, 10:26:17 AM
I am in the process of migrating my cell phone pictures and movie clips from google photo to Telenor MinSky.

I used gphotos-sync (https://github.com/gilesknap/gphotos-sync) to pull the contents out of google photo.

And then I manually uploaded the monthly folders created by gphotos-sync, into Telenor MinSky.

Some images and movie clips ended up in the wrong month.

With a bit of experimentation I figured out that this was caused by a wrong "create date" in the exif date of the files.

So I used the command "exiftool "-CreateDate<FileModifyDate" -P <filename>" to fix the create date of the files that ended up in the wrong place.

And that worked for all images and all .mp4 file.

But one file, that for some reason is a .MPG file, fails:
Error: Not a valid MPG (looks more like a MOV) - Eirik 5.MPG
 0 image files updated
 1 files weren't updated due to errors

Just running exiftool gives back the metadata and reports "File Type: MP4".
So exiftool finds meaningful information in there.

Is there a way to force the change of "create date" in this file?

The file is attached.
Title: Re: Unable to set "create date" on one stubborn file
Post by: steinarb on August 04, 2022, 10:31:14 AM
Hm... I renamed the file name extension from .MPG to .mp4 and then the "exiftool "-CreateDate<FileModifyDate" -P <filename>" stopped giving the error message.

Also, just running exiftool reports an adjusted "create date".

Let's see if the reimport works...? Yes it did.  This time the imported image ended up in february 2016
Title: Re: Unable to set "create date" on one stubborn file
Post by: StarGeek on August 04, 2022, 12:39:59 PM
One thing to take note of is if you have some actual mpeg files, exiftool won't be able to write any data to them.  See the Supported File Types table (https://exiftool.org/#supported).