Help with ExifTool <-> Photos.app

Does anyone have experience using exiftool?

I’m running in to an issue where I execute a command along the lines of

exiftool '-AllDates=2003:06:01 00:00:00' -filemodifydate='2003:06:01 00:00:00' ${avi/.AVI/.mp4}

and everything looks good. Finder reports the created date exactly how I want. But, when I import into the Photos app, It says the year the photo was taken is 187276

Exiftool Dump
ExifTool Version Number         : 12.00
File Name                       : 101_0190.mp4
Directory                       : 2003/2003_06_01
File Size                       : 12 MB
File Modification Date/Time     : 2003:06:01 00:00:00-04:00
File Access Date/Time           : 2003:06:01 00:00:00-04:00
File Inode Change Date/Time     : 2020:07:06 16:31:59-04:00
File Permissions                : rw-r--r--
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4 v2 [ISO 14496-14]
Minor Version                   : 0.2.0
Compatible Brands               : isom, iso2, avc1, mp41
Movie Header Version            : 0
Time Scale                      : 1000
Duration                        : 14.30 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                   : 4
Track Header Version            : 0
Track Create Date               : 2020:07:04 20:46:43
Track Modify Date               : 2020:07:04 20:46:43
Track ID                        : 1
Track Duration                  : 14.07 s
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 1920
Image Height                    : 1080
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : avc1
Source Image Width              : 1920
Source Image Height             : 1080
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Pixel Aspect Ratio              : 1:1
Video Frame Rate                : 15
Audio Format                    : mp4a
Track 2 Name                    : Mono
Track 2 Title                   : Mono
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2020:07:04 20:46:43
Media Modify Date               : 2020:07:04 20:46:43
Media Time Scale                : 32000
Media Duration                  : 14.06 s
Media Language Code             : und
Handler Description             : Mono
Balance                         : 0
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 32000
Track 3 Name                    : Mono
Track 3 Title                   : Mono
Handler Type                    : Metadata
Handler Vendor ID               : Apple
Encoder                         : HandBrake 1.3.3 2020061400
XMP Toolkit                     : Image::ExifTool 11.85
Date/Time Original              : 2003:06:01 00:00:00
Create Date                     : 2003:06:01 00:00:00
Modify Date                     : 2003:06:01 00:00:00
Media Data Size                 : 12207562
Media Data Offset               : 11700
Image Size                      : 1920x1080
Megapixels                      : 2.1
Avg Bitrate                     : 6.83 Mbps
Rotation                        : 0

I just tried this with a single jpg file and it worked just as expected.

What are you expecting this part of your command to expand to: ${avi/.AVI/.mp4}

It’s part of a longer script where I’m converting .avi files to mp4. The ${avi/.AVI/.mp4} is the bash variable $avi (which holds the filename) and replaces .AVI with .mp4. I had no issues with jpegs. But mp4’s is where I’m seeing issues.

I figured it out. Turns out metadata is not editable on mp4 files with exiftool. Used ffmpeg to convert to .mov and it worked like a charm!

Dang, I thought maybe you had stumbled onto the secret behind time travel!

1 Like