Amazon Photos MP4 video metadata

Started by velezericn, March 24, 2023, 08:16:14 PM

Previous topic - Next topic

velezericn

ok so i have a file that i'm putting the utc into the createdate tag for the mp4 and it displays correct on windows (see pic)

exiftool "-overwrite_original" "-CreateDate=2020:07:07 18:03:51" "C:/Users/Eric/Downloads/yeehaw/2020-07-07 18-03-51 UTC.mp4"

mp4_properties.png[/attach]]mp4_properties.png

here's results from exiftool

C:\Users\Eric>exiftool "C:\Users\Eric\Downloads\yeehaw\2020-07-07 18-03-51 UTC.mp4"
ExifTool Version Number        : 12.55
File Name                      : 2020-07-07 18-03-51 UTC.mp4
Directory                      : C:/Users/Eric/Downloads/yeehaw
File Size                      : 5.2 MB
File Modification Date/Time    : 2023:03:24 19:31:31-04:00
File Access Date/Time          : 2023:03:24 20:08:26-04:00
File Creation Date/Time        : 2023:03:24 19:25:10-04:00
File Permissions                : -rw-rw-rw-
File Type                      : MP4
File Type Extension            : mp4
MIME Type                      : video/mp4
Major Brand                    : MP4 v2 [ISO 14496-14]
Minor Version                  : 0.0.1
Compatible Brands              : isom, mp41, mp42
Movie Header Version            : 0
Modify Date                    : 2020:07:07 18:03:23
Time Scale                      : 44100
Duration                        : 9.77 s
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                    : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                  : 3
Track Header Version            : 0
Track Create Date              : 2020:07:07 18:03:23
Track Modify Date              : 2020:07:07 18:03:23
Track ID                        : 1
Track Duration                  : 9.77 s
Track Layer                    : 0
Track Volume                    : 0.00%
Image Width                    : 1280
Image Height                    : 720
Graphics Mode                  : srcCopy
Op Color                        : 0 0 0
Compressor ID                  : hvc1
Source Image Width              : 1280
Source Image Height            : 720
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                      : 24
Color Profiles                  : nclx
Color Primaries                : BT.709
Transfer Characteristics        : BT.709
Matrix Coefficients            : BT.601
Video Frame Rate                : 29.807
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date              : 2020:07:07 18:03:23
Media Modify Date              : 2020:07:07 18:03:23
Media Time Scale                : 44100
Media Duration                  : 9.82 s
Media Language Code            : und
Handler Type                    : Audio Track
Handler Description            : Core Media Audio
Balance                        : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample          : 16
Audio Sample Rate              : 44100
XMP Toolkit                    : Image::ExifTool 12.55
Create Date                    : 2020:07:07 18:03:51
Media Data Size                : 5226467
Media Data Offset              : 10847
Image Size                      : 1280x720
Megapixels                      : 0.922
Avg Bitrate                    : 4.28 Mbps
Rotation                        : 90

and it shows this on amazon photos which is incorrect

amazon_photos.png[/attach]]amazon_photos.png

photos (.jpgs) display correctly. i store the local time in DateTimeOriginal (first i put in the utc and then subtract 5) and this seems to work

i'm confused why .mp4 isn't working correctly. i should be giving it it the utc and it adjusts on windows and displays the correct time but i'm confused why amazon photos is changing the time. do i have to specify a time zone and still give it the utc to solve this problem?

i downloaded the same thing i uploaded from amazon photos and it shows the correcct time (2:03). so maybe amazon photos is utc time and thats why it shows 6 instead of 2?

Phil Harvey

The problem isn't Amazon, it's the poorly designed standard that resulted in an inconsistent interpretation of this metadata.  The standard specified that the date/times should be UTC, but many early devices didn't know the time zone so they had no other choice but to store local time.  This resulted in video files with inconsistent date/time values.  It looks like Windows and Amazon are just taking different tracks.  You can add the ExifTool -api quicktimeutc option to see what the date/times look like on your system when interpreted as UTC values.

Another complication is that Amazon may not know your time zone, or that they are using the local time zone where their servers are located.

If you want the date/time displayed correctly by Amazon, you may have to set it incorrectly for Windows.  It might be that you can't have it both ways unless you get lucky and they are reading different tags.  You could try setting all of the date/time tags to different values using ExifTool then you would be able to tell which one(s) Windows and Amazon are using.

- 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 ($).

velezericn

when i use -api quicktimeutc option it gets set to 6:03 pm in windows and 10:03pm on amazon photos. is there an easy way to set all the date/time tags to the utc with exiftool? i care more about windows being right than amazon photos but if both can be correct that would be optimal.

Phil Harvey

I think you just answered your own question.  Use -api quicktimeutc when writing CreateDate for Windows compatibility.

This goes for any other QuickTime date/time tags which are stored as integers.  See the QuickTime tags for a complete list.

- 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 ($).

StarGeek

Wow, my quick test shows that Google Photos is all messed up when it comes to properly reading date/time tags in an mp4.

My test file has a lot of date/time tags filled out.  In this test, Google read the CreationDate tag, though I'm pretty sure it will read the CreateDate tag if that's the only one filled out

If the GPSCoordinates tag exists in the file, that will be used to determine the time zone regardless of any other time zone data in the file.  If I recall, this also happens with images.

After removing the GPS data, Google read and displayed the CreationDate tag, except it ignored the time zone that was part of the tag.  The tag was set to "2001:10:10 10:10:10-07:00" and Google displayed "October 10, 2001, 3:10 AM".  In other words, it adjusted the time by the time zone, which it's not supposed to do for CreationDate.

So, unless you include a correct GPSCoordinates tag, you can't really depend upon Google showing the correct timestamp.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype