Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pixelmac

macrumors newbie
Original poster
Aug 28, 2006
5
0
Hello,

How can I batch convert videos and preserve creation dates.
I have a big collection of family video that I want to convert, but preserving the dates is crucial for sorting by date after.

Any ideas if the creation date can be transfered to the video EXIF of similar ?

Sincerely

Pixelmac
 

Menneisyys2

macrumors 603
Jun 7, 2011
5,997
1,101
Hello,

How can I batch convert videos and preserve creation dates.
I have a big collection of family video that I want to convert, but preserving the dates is crucial for sorting by date after.

Any ideas if the creation date can be transfered to the video EXIF of similar ?

Sincerely

Pixelmac

If you plan to use HandBrake and can compile its sources yourself, you'll want to read https://reviews.handbrake.fr/r/55/diff/1/ .. Unfortunately, there still isn't a "preserve original filedate" checkbox in the current HB version.

Also, for other tools, take a look at http://superuser.com/questions/4828...keeping-the-original-time-stamp-creatuib-date . I haven't myself checked out BulkFileChanger there - hope it knows what you need.
 

ytk

macrumors 6502
Jul 8, 2010
252
5
You can use the touch command from the Terminal to modify the creation date. The format of the command is:
Code:
touch -mt [[CC]YY]MMDDhhmm[.SS]]

So to set the creation date of the file to Jan. 24th, 1984 at 5:30PM, you'd use:
Code:
touch -mt 198401241730
Be careful, though—you can only set creation dates backwards, not forwards, so if you accidentally set them too early you won't be able to change them (without making a new copy of the file, anyway).

As for how to do it in batch? Well, you could write a shell script to do it. You might also have some luck with Automator. The exact method kind of depends on how you're naming your files as you convert them. Basically, you want to be able to match up the old files to the new files, then read the dates off the old files and apply them to the new files using touch.
 

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
If you want to preserve creation dates you might want to take a look at the -r option of the touch command.

From the touch man page :

NAME
touch -- change file access and modification times

SYNOPSIS
touch [-acfm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...

DESCRIPTION
The touch utility sets the modification and access times of files to the
current time of day. If the file doesn't exist, it is created with
default permissions.

The following options are available:

-r Use the access and modifications times from the specified file
instead of the current time of day.
Info : Applescript for matching creation date on two files
 
Last edited:

Menneisyys2

macrumors 603
Jun 7, 2011
5,997
1,101
If you plan to use HandBrake and can compile its sources yourself, you'll want to read https://reviews.handbrake.fr/r/55/diff/1/ .. Unfortunately, there still isn't a "preserve original filedate" checkbox in the current HB version.

Also, for other tools, take a look at http://superuser.com/questions/4828...keeping-the-original-time-stamp-creatuib-date . I haven't myself checked out BulkFileChanger there - hope it knows what you need.

I've just found a much easier way of this:

1, get HandBrakeBatch from http://www.osomac.com/apps/osx/handbrake-batch/

2, go to Preferences and enable the "Keep original file creation and modification dates" checkbox in the default "General" tab:

hbb-origfiledate.png


3, drag-and-drop your source files to the list

4, start converting.
 

Aragornii

macrumors 6502a
Jun 25, 2010
512
140
Is there any alternative to this now that HandBrakeBatch is not longer supported? I am trying to convert a bunch of old family videos that have codecs not supported by Photos and need to convert them, but manually resetting the dates would be nearly impossible for so many files.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.