summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-03-15 15:45:16 +0000
committerjstebbins <[email protected]>2015-03-15 15:45:16 +0000
commit98d550749c62814c5434958d74b09d8ca2f68893 (patch)
tree23aa095291e4a1a8ac6b51256986ff7782aa1763 /libhb
parentfcd75a3674899737cee290e3d8b6eeaec192a5ce (diff)
muxavformat: add "creation_time" metadata
Tags mp4 files with current time. This was previously done by mp4v2 for us. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6991 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/muxavformat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
index fb6326d1d..d54200e1a 100644
--- a/libhb/muxavformat.c
+++ b/libhb/muxavformat.c
@@ -913,6 +913,11 @@ static int avformatInit( hb_mux_object_t * m )
snprintf(tool_string, sizeof(tool_string), "HandBrake %s %i",
HB_PROJECT_VERSION, HB_PROJECT_BUILD);
av_dict_set(&m->oc->metadata, "encoding_tool", tool_string, 0);
+ time_t now = time(NULL);
+ struct tm * now_utc = gmtime(&now);
+ char now_8601[24];
+ strftime(now_8601, sizeof(now_8601), "%Y-%m-%dT%H:%M:%SZ", now_utc);
+ av_dict_set(&m->oc->metadata, "creation_time", now_8601, 0);
ret = avformat_write_header(m->oc, &av_opts);
if( ret < 0 )