Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question

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 -acodec copy -vcodec copy -metadata creation_time='2004-08-06 13:00:00' -f 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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .