[FFmpeg-user] creation_time tag cannot be set before 1970-01-01 with ffmpeg

Marton Balint cus at passwd.hu
Sat Apr 8 21:40:51 EEST 2023



On Thu, 6 Apr 2023, Bernd Dürrer wrote:

> Hi,
>  I use twonky as DLNA server that provides the year from the 
> creation_time metadata tag of MP4 files to DLNA clients. Therefore, I 
> use ffmpeg to set creation_time to the date when the content of the MP4 
> video was created. This works fine for dates starting at January 1st 
> 1970. For earlier dates (e.g. ffmpeg -i input.mp4 -map_metadata 0 
> -metadata creation_time="1965-01-01 12:00:00" -codec copy output.mp4), 
> though the date is correctly displayed during the copy process, 
> afterwards ffprobe yields a future date (in the example, ffprobe 
> output.mp4 displays creation_time as 2036-01-01T23:59:59.000000Z). 
> According to ISO/IEC 14496-12, clause 8.2, "creation_time is an integer 
> that declares the creation time of the presentation (in seconds since 
> midnight, Jan. 1, 1904, in UTC time)", so dates before 1970 should be 
> possible.
>
> It seems to be an Unix epoch issue. Will this be amended in a future 
> release of ffmpeg? Is anybody aware of another metadata editor that may 
> set creation_time to dates earlier than 1970?

This is indeed a bug, I sent a patch for this issue to ffmpeg-devel, 
libavformat/ffprobe not parsing correctly creation dates before 1970 for 
MOV/MP4 files.

Regards,
Marton


More information about the ffmpeg-user mailing list