Date Taken for most file formats

Started by alansoft, December 26, 2015, 07:27:16 AM

Previous topic - Next topic

alansoft

Hi,

I am building a tool to rename my photos and videos using the Date Taken based on the ExifTool output. However, on different cameras and file formats, that value is stored in different tags. Also, I want the time to be in the local time zone where they were taken (and not in UTC for example).

I have pictures from iPhone, Samsung Android phone, Canon point and shoot and DSLR cameras, Sony camera and noticed some discrepancies.

Currently I am taking the first one of these tags for JPEGs: "Date Acquired", "Date/Time Original", "File Modification Date/Time"

And the first one of these tags for Video files: "Date/Time Original", "Media Create Date", "Create Date"

Screenshots from iPhones are saved in PNG and have no usable tag as far as I could see.

Do you agree with my logic above or can you please suggest a better approach to this problem?

Thank you so much!
Alan

PS: Thanks to Phil, without his tool I wouldn't be able to do this at all! I intend to share my code once completed. It's a fun project!



StarGeek

#1
Here's where I attempted to document some of the details where Windows grabs it's metadata.  I hadn't come across "DateAcquired" before so I'll add it in when I get a chance to test it.

Edit:  I just noticed that "DateAcquired" was in my original test and isn't read as a Date Taken by Windows.  But I also now realize that you weren't necessarily referring to Windows when you say Date Taken.
* 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).

Phil Harvey

For both JPEGs and videos, I would have thought that CreateDate was the most consistent.

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

alansoft

Thanks for the responses. After some more research I found the following:
1. Create Date is not always present. Date/Time Original is still more common.
2. iPhone MOV files have Create Date as UTC and Creation Date as local time zone.
3. Some cameras or maybe some app or even Windows seem to have Date Acquired sometimes and it looks incorrect! See example below.
Modify Date   2011.04.17 13:39:54
Date/Time Original   2011.04.17 13:39:54
Create Date   2011.04.17 13:39:54
GPS Date Stamp   2011:04:17
Date Acquired   2011.06.11 16:38:30
GPS Date/Time   2011.04.17 18:31:03

4. Could not find any date attribute in PNG files (at least not in iPhone sceen shots.

This is my new tags
1) For Photos: "Date/Time Original", "Create Date", "Modify Date"
2) For Videos: "Date/Time Original", "Creation Date", "Media Create Date", "Create Date"

Thank you,
Alan

Phil Harvey

If your QuickTime files are in UTC, use the -api quicktimeutc option to treat these values properly.

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