[FFmpeg-trac] #1471(undetermined:new): The creation time in Android video is reported incorrectly.
FFmpeg
trac at avcodec.org
Wed Jun 20 23:16:58 CEST 2012
#1471: The creation time in Android video is reported incorrectly.
-------------------------------------+-------------------------------------
Reporter: andreasg | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
The reported creation time for video taken with a Nexus Galaxy phone
(Android 4.0.2) is off by 66 years. As far as I can tell, this is due to
the fact that the start of the epoch is assumed to be Jan 1, 1904 while
the phone reports it as Jan 1, 1970.
In libformat/mov.c in function mov_read_mvhd, the version is 0 and the
32-bit creation time is 1340225911. In function
mov_metadata_creation_time, the difference between the two epochs is
subtracted from the time.
It is possible that the Android video just doesn't correctly encode the
time but I still want to report this issue.
How to reproduce:
{{{
% ffprobe VID_20120620_135828.mp4
ffprobe version N-40739-ge556121 Copyright (c) 2007-2012 the FFmpeg
developers
built on May 16 2012 11:07:59 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2)
configuration:
libavutil 51. 53.100 / 51. 53.100
libavcodec 54. 21.101 / 54. 21.101
libavformat 54. 5.100 / 54. 5.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 74.100 / 2. 74.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 11.100 / 0. 11.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20120620_135828.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
creation_time : 1946-06-20 20:58:31
Duration: 00:00:02.24, start: 0.000000, bitrate: 9159 kb/s
Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p,
1280x720, 8460 kb/s, SAR 65536:65536 DAR 16:9, 29.75 fps, 30 tbr, 90k tbn,
180k tbc
Metadata:
creation_time : 1946-06-20 20:58:31
handler_name : VideoHandle
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, s16,
96 kb/s
Metadata:
creation_time : 1946-06-20 20:58:31
handler_name : SoundHandle
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1471>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list