Edit QuickTime movie and track headers

3

3

I have files captured with a GoPro camera that was not properly set up with the correct time and date, leaving me with a set of .mp4 videos that have invalid timestamps in the headers.

Exiftool properly displays the headers as:

[..]
Create Date                     : 2012:01:03 14:09:17
Modify Date                     : 2012:01:03 14:09:17
[..]
Track Create Date               : 2012:01:03 14:09:17
Track Modify Date               : 2012:01:03 14:09:17
[..]
Media Create Date               : 2012:01:03 14:09:17
Media Modify Date               : 2012:01:03 14:09:17

And those correspond to the headers in the Apple QuickTime specification. However, the dates are wrong since the videos were shot in January 2013.

Unfortunately, exiftool cannot write MP4 headers, only read them, so I need a tool to be able to edit the timestamps on those headers. I've tried several programs and Python libraries with no luck, so I was wondering if someone knows of a program or library that would allow me to edit those.

Thanks!

introiboad

Posted 2013-03-17T15:17:27.787

Reputation: 182

Answers

1

I have found two ways to do this, but they both have the caveat of stripping out the camera specific metadata, which to me is unacceptable, so I am still searching. For those that don't care about this information, here are the solutions I found:

First, you can do it the janky way by changing your clock, opening the file in QT and then re-exporting it. Why there is no direct editable field for this without having to change the host clock time is beyond me.

Second, you can use ffmpeg in a non-transcoding way as such: ffmpeg -i infile.mov -acodec copy -vcodec copy -metadata creation_time='2004-08-06 13:00:00' -f mov outfile.mov

Comparing the exif data using exiftool will show that the camera specific tags were not copied. Even using -map_metadata 0:s:0 in ffmpeg will not solve this.

WarzauWynn

Posted 2013-03-17T15:17:27.787

Reputation: 56