Add date metadata to MP4 videos
As ever, notes to myself. I hope you appreciate this future me!
Photographs often contain EXIF metadata - really useful for finding out when a photo was taken. It turns out that you can add similar metadata to MP4 format videos.
Here's how to do it with ffmpeg
on Ubuntu Linux. The magic option is -metadata creation_time="2015-12-25T12:34:56"
Stick that in when you're encoding your video and it will be added to the new file.
The time should be in ISO8601.
If you have a video that you don't want to re-encode, you can do this.
ffmpeg -i original.mp4 -c copy -map 0 -metadata creation_time="2015-12-25T12:34:56" output.mp4
To check it has worked:
ffprobe -show_streams -show_format output.mp4
Should spit out a whole bunch of metadata, including
TAG:creation_time=2016-12-25T12:34:56.000000Z
Philip Stark says:
Terence Eden says: