Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.