VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Oct 2008
    Location
    Canada
    Search Comp PM
    I have an MKV movie with an AVC video stream, and an AC3 audio stream. The audio/video content should be 1 hour 52 minutes long, but all video players are detecting the video to be 14 hours, 58 minutes, and 16 seconds long. The video will play in VLC, but the timeline is distorted in length (which makes it difficult to click on the timeline to jump around the video).

    Here is some data retrieved using mkvinfo and MediaInfo on the original MKV file:

    Originally Posted by mkvinfo
    + Segment, size 4702820625
    |+ Segment information
    | + Timecode scale: 1000000
    | + Muxing application: libebml v0.7.7 + libmatroska v0.8.1
    | + Writing application: mkvmerge v2.2.0 ('Turn It On Again') built on Mar 4 2008 12:58:26
    | + Duration: 53898.524s (14:58:18.524000000)
    | + Date: Mon May 26 17:28:45 2008 UTC

    |+ Segment tracks
    | + A track
    | + Track type: video
    | + Timecode scale: 1.000000
    | + Codec ID: V_MPEG4/ISO/AVC
    | + CodecPrivate, length 169
    | + Default duration: 41.708ms (23.976 fps for a video track)
    Originally Posted by Mediainfo
    General / Container Stream # 1
    Play Time -> 14h 58mn
    Frame Rate -> 23.976 fps
    Total Frames -> 1292271

    Video Stream # 1
    Codec (Human Name) -> AVC
    Codec (FourCC) -> V_MPEG4/ISO/AVC
    Video Stream Length -> 14h 57mn 24s 625ms
    Video Stream BitRate -> 12.7 Kbps
    Video Stream BitRate (Nominal) -> 5 043 Kbps

    Audio Stream # 1
    Codec -> AC-3
    Codec (FourCC) -> A_AC3
    Audio Stream Length -> 14h 58mn 18s 524ms
    Audio Stream BitRate -> 640 Kbps
    I don't know how the length of MKV videos are determined by VLC. I considered that MKVs might directly store the file duration within the container itself, and that my MKV had become corrupted. To verify this, I demultiplexed the audio and video streams using mkvextract, then created a new MKV using mkvmerge. Sadly, the new MKV had the same, incorrect duration as the original one (14 hours or so).

    Rather than retrieving a stored value for file duration, mkvinfo and VLC may be calculating the file duration as: (frame count / frame rate). In this case, it would be (1292271 / 23.976) = 53,898.524 seconds, which is what mkvinfo reports. Since the frame rate of 23.976 is obviously correct, we have to look at the frame count: why is it 1,292,271? That's about ten times larger than what it should be.

    As a last ditch effort, I ran Mediainfo on the demultiplexed audio and video streams from the original file. Here are the relevant details:

    Originally Posted by Mediainfo: video.avc
    General / Container Stream # 1
    Video Codecs Used -> AVC
    File Format -> AVC
    Total File Size -> 3.88 GiB

    Video Stream # 1
    Codec (Human Name) -> AVC
    Codec Profile -> High@L5.1
    Frame Width -> 1 280 pixels
    Frame Height -> 532 pixels
    Frame Rate -> 23.976 fps
    Originally Posted by Mediainfo: audio.ac3
    General / Container Stream # 1
    Total Audio Streams for this File -> 1
    Audio Codecs Used -> AC3
    File Format -> AC-3
    Play Time -> 1h 50mn

    Audio Stream # 1
    Codec -> AC-3
    Audio Stream BitRate -> 640 Kbps
    Audio Stream BitRate Mode -> CBR
    There is no frame count or duration reported for the AVC (h.264) video file, but the AC3 stream has a roughly correct play time of 1 hou and 50 minutes. Does anyone have an explanation for this problem? For reference, I am using an OS X, but I can load Windows XP within VMware if it's necessary to resolve this frustrating hiccup.
    Quote Quote  
  2. I wonder, with a microsecond timecode scale, if you're seeing a numerical overflow.
    Quote Quote  
  3. Member
    Join Date
    Oct 2008
    Location
    Canada
    Search Comp PM
    I would be amazed if there's an overflow occurring. Here's data from another MKV of mine:

    Originally Posted by mkvinfo, file 2
    + Segment, size 8532891469
    |+ Segment information
    | + Timecode scale: 1000000
    | + Muxing application: libebml v0.7.7 + libmatroska v0.8.1
    | + Writing application: mkvmerge v2.0.2 ('You're My Flame') built on Feb 21 2007 23:40:55
    | + Duration: 7854.401s (02:10:54.401000000)

    |+ Segment tracks
    | + A track
    | + Track type: video
    | + Timecode scale: 1.000000
    | + Codec ID: V_MPEG4/ISO/AVC
    | + CodecPrivate, length 38
    | + Default duration: 41.708ms (23.976 fps for a video track)
    This file uses the same time codes as the first one, and has a longer run time, but it suffers from no duration reporting problems. Media info provides some additional data:

    Originally Posted by [url=https://www.videohelp.com/tools/MediaInfo
    MediaInfo[/url], file 2]
    General / Container Stream # 1
    Play Time -> 2h 10mn
    Total File Size -> 7.95 GiB

    Video Stream # 1
    Codec (Human Name) -> AVC
    Codec (FourCC) -> V_MPEG4/ISO/AVC
    Frame Rate -> 23.976 fps
    Total Frames -> 188317
    Video Stream Length -> 2h 10mn 46s 541ms
    Video Stream BitRate -> 7 698 Kbps
    Video Stream BitRate (Nominal) -> 8 048 Kbps

    Audio Stream # 1
    Codec -> AC-3
    Codec (FourCC) -> A_AC3
    Audio Stream Length -> 2h 10mn 54s 401ms
    Audio Stream BitRate -> 640 Kbps
    Here's something which is curious. The "Video Stream BitRate" on the first file is 12.7 Kbps, which is clearly wrong. Where is this value coming from? Is it a cause or effect of the duration problem? Anyone have any ideas?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!