Menu

#366 Video duration reported wrongly

Incorrect_result
closed-wont-fix
5
2009-04-16
2009-04-08
Dave Nicoll
No

Hi

I've got a problem with this video:
http://www.davenicoll.com/downloads/e7a2acc6-8e75-4c68-b87d-7579656d8e18

The latest build of mediainfo is wrongly reporting the duration as 6 minutes long, but it's only 1m 12s. It works fine in QuickTime and VLC. Could you please take a look?

Thanks

Discussion

  • Jerome Martinez

    Jerome Martinez - 2009-04-13
    • status: open --> pending-invalid
     
  • Jerome Martinez

    Jerome Martinez - 2009-04-13

    The link is broken (page not found)

     
  • Dave Nicoll

    Dave Nicoll - 2009-04-15
    • status: pending-invalid --> open-invalid
     
  • Jerome Martinez

    Jerome Martinez - 2009-04-16

    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.

     
  • Jerome Martinez

    Jerome Martinez - 2009-04-16
    • status: open-invalid --> closed-wont-fix
     
  • Dave Nicoll

    Dave Nicoll - 2009-04-18

    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?

     
  • Jerome Martinez

    Jerome Martinez - 2009-04-19

    > 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).

     

Log in to post a comment.

MongoDB Logo MongoDB