From 98d550749c62814c5434958d74b09d8ca2f68893 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Sun, 15 Mar 2015 15:45:16 +0000 Subject: [PATCH] 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 --- libhb/muxavformat.c | 5 +++++ 1 file changed, 5 insertions(+) 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 ) -- 2.40.0