Video duration reported wrongly
A unified display of relevant technical and tag data for A/V files
Brought to you by:
guillaumeroques,
zenitram
The link is broken (page not found)
IIS isn't configured for extension-less files, sorry - my bad.
This works -
http://www.davenicoll.com/downloads/e7a2acc6-8e75-4c68-b87d-7579656d8e18.mp4
There is two places for duration in a .mp4:
- in the "tkhd" atom
- in the "mdhd" atom
VLC prefers to read tkhd, I prefer to read mdhd.
Unfortunatly, your mvhd seems to contains more stuff as what is in the tkhd atom
I ran some tests on my samples, and tkhd seems to be more often "broken" as mdhd, so I think it is better to keep MPEG-4 parser as is.
For your info, mdhd say:
3603 frames at 50 fps (20 ms each) --> 1mn 12s
1 frame during 5mn 4s (fixed frame?)
Total = 6mn 16s
I may change my mind if I have more files as this one from different users.
I've seen this several times over the past couple of months. It almost always occurs in files over a certain length - usually about 5 minutes is the minimum length.
If VLC reads the tkhd, how come that works for VLC and not MediaInfo?
> If VLC reads the tkhd, how come that works for VLC and not MediaInfo?
The MPEG-4 specs do NOT precise what to trust when there are incoherencies.
So everyone chooses as he wants!
Currently, I prefer to show all what is in the media details, rather than the track header.
This is a personal choice, 99.99% of the time durations are nearly same (mdhd has often a better precision), so no problems.
For your file, it is buggy: mdhd duration is not the same as tkhd duration, and MediaInfo shows it.
The software used to create this file should:
- remove the last frame (5mn 4s) of the mdia part
or
- adapt the tkhd header with the duration of the frame.
MediaInfo reports "incorect" data because the file is incorect, or show me in the specs the text saying tkhd is more trustable, and say me why there is the 5mn 4s frame in your file!
Note: the current goal of MediaInfo is to be precise for "valid" file, parsing "invalid" (no coherency) files is not the current priority (unless someone pay for this).