Photos Video Date and Time Mystery

Photos don't recognise the correct date and time a video was shot. Below I describe all the facts I have and what I have done to try to fix this, with no luck I should add. I appreciate every help I can get.


Video don't always have dates for when they were shot. I have some really, really old 3GP files and a bunch of other MOV, AVI and other video files from my brother, his father in law, etc, from a variety of cameras. Some have OriginalDate, some have no date at all - except from when the video file was copied last... For the latter I understand Photos can't possibly know when the video was taken. But it should be able to read and understand the Original Date if there exist one somewhere in the file.


For example I have this AVI video file. I can see in "A Better Finder Attributes Ver 6" (and Phil Harveys great ExifTools) that there is an OriginalDate of Sep 9, 2009, at 16.33 (4.33 p.m.) and when importing it to Photos (Version 3.0 on MacOS 10.13.6) it's listed as August 1, 2018. That is today. I changed, with "A better Finder Attributes", the CreationDate and later the ChangedDate to the exact same as OriginalDate (Sep 9, 2009). But still Photos think the video was shot on August 1, 2018. I deleted the Created and Changed dates on the file and did it again. Still the same problem.


According to ExifTools all dates are set to Sep 9, 2009, except for "File Access Date/Time" (atime) and "File Inode Change Date/Time" (ctime) that are today's date. Which is curious also since I copied the files to my drive yesterday (Aug 31, 2018).


Without getting lost in the complexity of all this, I was hoping Photos would be able to read the data that obviously is in the file somewhere (since ExifTool can see it) and acknowledge the OriginalDate of Sep 9, 2009. But it does not. That is very, very strange and annoying. I do not wish to manually edit the real date and time on every single image in Photos, it would take hours and days for my +1000 videos...


Side note: The camera information "FinePix F100fd" is also in the ExifTool data, but Photos does not recognise this either.



ExifTool Data:

Kip-MacBook-Pro:!A Kip$ exiftool 159.AVI

ExifTool Version Number : 11.08

File Name : 159.AVI

Directory : .

File Size : 95 MB

File Modification Date/Time : 2009:09:22 16:31:28+02:00

File Access Date/Time : 2018:08:01 17:50:22+02:00

File Inode Change Date/Time : 2018:08:01 17:32:16+02:00

File Permissions : rwxr-xr-x

File Type : AVI

File Type Extension : avi

MIME Type : video/x-msvideo

Frame Rate : 30

Max Data Rate : 1139 kB/s

Frame Count : 2580

Stream Count : 2

Stream Type : Video

Video Codec : mjpg

Video Frame Rate : 30

Video Frame Count : 2580

Sample Size : Variable

BMP Version : Windows V3

Image Width : 640

Image Height : 480

Planes : 1

Bit Depth : 24

Compression : MJPG

Image Length : 921600

Pixels Per Meter X : 0

Pixels Per Meter Y : 0

Num Colors : Use BitDepth

Num Important Colors : All

Make : FUJIFILM

Camera Model Name : FinePix F100fd

Modify Date : 2009:09:22 16:31:28

Thumbnail Offset : 738

Thumbnail Length : 9061

Copyright :

Date/Time Original : 2009:09:22 16:31:28

Create Date : 2009:09:22 16:31:28

Version : 0130

Internal Serial Number : FC A4105131 592D31373032 2008:03:24 A4F3304312EC

Quality : NORMAL

Sharpness : 0 (normal)

White Balance : Auto

Fuji Flash Mode : Off

Flash Exposure Comp : 0

Macro : Off

Focus Mode : Auto

Slow Sync : Off

Picture Mode : Auto

Auto Bracketing : Off

Blur Warning : None

Focus Warning : Good

Exposure Warning : Good

Stream Name : FUJIFILM AVI STREAM 0100

Audio Codec :

Audio Sample Rate : 11024

Audio Sample Count : 948064

Encoding : Microsoft PCM

Num Channels : 1

Sample Rate : 11024

Avg Bytes Per Sec : 11024

Bits Per Sample : 8

Duration : 0:01:25

Image Size : 640x480

Megapixels : 0.307

Thumbnail Image : (Binary data 9061 bytes, use -b option to extract)

Kip-MacBook-Pro:!A Kip$

MacBook Pro, macOS High Sierra (10.13.6), Macbook Pro 13" Late 2011, 2.4GHz

Posted on Aug 1, 2018 9:43 AM

Reply

Similar questions

1 reply

Aug 2, 2018 10:57 AM in response to Mediakip

As said in the below linked article, for some reason Photos seems to acknowledge more meta from a ".mov" than from a ".avi", so there is a great script in the end of the article used to change the container of a video file, without re-encoding the actual content (which would then lose quality) and transfer some of the meta (can add more with more code) to the new ".mov" file. Just wanted to give a shoutout to @jay.a.h for his great code at the end of this article!


AVI videos always get date/time of import as timestamp


Important! In the code the "exiftool" command has to be "/usr/local/bin/exiftool" and the "ffmpeg" needs the same "/usr/local/bin/ffmpeg", as it is in my code below. This important detail got from Phil Harvey, the author of ExifTool. Since my test AVI video don't have a "CreateDate", which was in @jay.a.h's original code, I changed it to "OriginalDateTime", but this can vary from camera maker, model and year. You will also need to edit the camera model settings. I will now start adding other metadata and camera models and test my way forward. I have about a thousand videos from 10 or so different cameras from various people...


More important – as said by the author @jay.a.h: "To run the script you need two freeware tools installed on your Mac: 1. exiftool and 2. ffmpeg. To make the script work for your camera model(s) you need to change the string(s) after the case statement to the model of your camera and maybe adjust the convertOptions. In the example script the camera models are named EX-FH100 and FinePix F601 ZOOM (Please notice that blanks have to be preceded by a "\") After the conversion an additional Quicktime file should be in the same directory as your original AVI. The Quicktime file has the extension ".mov". If you like you can put the script in an Automator service and call it with a right click on the AVI file."


To install ExifTool (simple install): https://www.sno.phy.queensu.ca/~phil/exiftool/install.html#OSX

To install FFmpeg easy you need to install HomeBrew: https://brew.sh/

To install FFmpeg with HomeBrew: https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/wiki/Installing-ffmpeg-on-Ma c-OS-X


I use the script in an Automator shell script, with settings "The service receives marked FILES OR FOLDERS in FINDER" with shell "bin/bash" and Pass input "as argument". Sorry about images being in Swedish.


Exhausted yet? Well, with a little knowledge of code and computers you should be able to do it. I am novice coder doing the simplest of css, html, terminal/cmd and such and managed to succeed.


User uploaded file


The code

#Script starts with the next line

#!/bin/bash

if [ $# -eq 0 ]

then

echo "Converts an AVI video file to a MOV (QuickTime) video file. Transfers metadata for OriginalDate, Make and Model from the source file."

echo "usage: $0 filename(s)"

fi


for fullpath in "$@"

do

# Strip longest match of */ from start

filename="${fullpath##*/}"


# Substring from 0 thru pos of filename

dir="${fullpath:0:${#fullpath} - ${#filename}}"


# Strip shortest match of . plus at least one non-dot char from end

base="${filename%.[^.]*}"


# Substring from len of base thru end

ext="${filename:${#base} + 1}"


# If we have an extension and no base, it's really the base

if [[ -z "$base" && -n "$ext" ]]; then

base=".$ext"

ext=""

fi

echo -e "$fullpath:\n\tdir = \"$dir\"\n\tbase = \"$base\"\n\text = \"$ext\""

# Get tags from source file

originalDateTag=$(/usr/local/bin/exiftool -d '%Y-%m-%d %H:%M:%S' -p '$DateTimeOriginal' "$fullpath")

makeTag=$(/usr/local/bin/exiftool -p '$make' "$fullpath")

modelTag=$(/usr/local/bin/exiftool -p '$model' "$fullpath")

echo -e "$fullpath --> $outFullpath\n\toriginalDate: $originalDateTag\n\tMake: $makeTag\n\tModel: $modelTag"

# Set remux options according to camera model

case $modelTag in

EX-FH100)

convertOptions="-c:v copy -q:a 0"

outFullpath="$dir$base.mov"

;;

FinePix\ F100fd)

convertOptions="-c:v mjpeg -q:v 0 -q:a 0"

outFullpath="$dir$base.mov"

;;

*)

echo "No EX-FH100 or FinePix F100fd input file found"

exit 1

esac

# Convert movie

/usr/local/bin/ffmpeg -i "$fullpath" $convertOptions -metadata "make=$makeTag" -metadata "model=$modelTag" -metadata "creation_time=$originalDateTag""$outFullpath"

done

# Script ended theline before this line

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Photos Video Date and Time Mystery

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.