Results 1 to 6 of 6

Thread: Howto repair an invalid video duration

  1. #1

    Question Howto repair an invalid video duration

    Certainly an offtopic post, but I hope someone can help anyway. I have a mkv video file with an invalid duration. VLC player and Mezzmo show a duration of "124051:44:17". In this case I usually repair this with

    mkclean --remux --optimize --timecodescale 1000000 file.mkv file-repaired.mkv

    But this time I still got this mkclean message:

    "Impossible to remux, the TimecodeScale may be too low, try --timecodescale 1000000"

    I tried higher values, but still no luck. Any further ideas how to repair the timescale?

  2. #2
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    11,642

    Default

    You could try ffmpeg.exe (you can download it yourself, or use the one we install into your Mezzmo program folder). Try a command line like:

    ffmpeg.exe -i <inputfile>.mkv -vcodec copy -acodec copy <outputfile>.mkv

    See http://ffmpeg.org/ffmpeg.html for more command line options.

    Mezzmo Android: Install it on your tablet, smartphone, Android TV or Amazon Fire to browse and stream files from your Mezzmo library to all your devices. Full details at http://www.conceiva.com/products/mez...mo_android.asp
    Mezzmo for Kodi Add-on: Install it into Kodi to stream files from your Mezzmo library directly in Kodi. Full details at http://www.mezzmo.com/wiki/doku.php?...odi_user_guide
    Mezzmo for Roku App: Install it onto your Roku to stream files from your Mezzmo library. Full details at http://www.mezzmo.com/wiki/doku.php?...oku_user_guide
    Wiki: User Guides & Reference Manual at http://www.mezzmo.com/wiki
    Facebook: http://www.facebook.com/Mezzmo.DLNA.Server
    Twitter: https://twitter.com/conceiva_mezzmo
    Web: http://www.mezzmo.com

  3. #3

    Default

    I tried ffmpeg, but the remuxed file is only 1.7 GB (instead of 8 GB) and has a duration of 37min (should be somewhere > 90min). So I guess there is something wrong with my mkv file. I also tried the "-timecode" parameter of ffmpeg to set a new timecode, but that doesn't changed anything. I checked the mkv file with mkvalidator and it says

    The timescode of cluster #xyz is not incrementing (may be intentional)"

    Here is a the part of the mkvalidator sourcecode:

    ClusterTimecode = MATROSKA_ClusterTimecode((matroska_cluster*)*Clust er);
    if (ClusterTimecode==INVALID_TIMECODE_T)
    Result |= OutputError(0xC1,T("The Cluster at %") TPRId64 T(" has no timecode"),EL_Pos(*Cluster));
    else if (ClusterTime!=INVALID_TIMECODE_T && ClusterTime >= ClusterTimecode)
    OutputWarning(0xC2,T("The timecode of the Cluster at %") TPRId64 T(" is not incrementing (may be intentional)"),EL_Pos(*Cluster));
    ClusterTime = ClusterTimecode;

    But I don't know anything about the filestructure of mkv files and how to repair them. Any further ideas?

  4. #4
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    11,642

    Default

    Looks like your MKV is quite badly encoded. You may not be able to repair it. Can you create it again from the original source or re-download another video of the movie / tv show/ etc.?

    Mezzmo Android: Install it on your tablet, smartphone, Android TV or Amazon Fire to browse and stream files from your Mezzmo library to all your devices. Full details at http://www.conceiva.com/products/mez...mo_android.asp
    Mezzmo for Kodi Add-on: Install it into Kodi to stream files from your Mezzmo library directly in Kodi. Full details at http://www.mezzmo.com/wiki/doku.php?...odi_user_guide
    Mezzmo for Roku App: Install it onto your Roku to stream files from your Mezzmo library. Full details at http://www.mezzmo.com/wiki/doku.php?...oku_user_guide
    Wiki: User Guides & Reference Manual at http://www.mezzmo.com/wiki
    Facebook: http://www.facebook.com/Mezzmo.DLNA.Server
    Twitter: https://twitter.com/conceiva_mezzmo
    Web: http://www.mezzmo.com

  5. #5

    Default

    Did some more reserach. The orginal file is a .ts file, which is as far as I know another container format. I always remux my movies with mkvtoolnix (mmg) to delete foreign audio stream just to save space. The duration of the .ts file is correct and I can stream it to my Samsung incl. FF/REW. After remuxing with mkvtoolnix and the option --clusters-in-meta-seek the audio stream and duration is broken. So I guess mmg doesn't remux it correctly. Perhaps, a later version of mkvtoolnix can do it better. Until that I keep my .ts file.

  6. #6
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    11,642

    Default

    A .ts file is an MPEG-TS video file and is generally an excellent container format for streaming, so I would suggest you keep it.

    Mezzmo Android: Install it on your tablet, smartphone, Android TV or Amazon Fire to browse and stream files from your Mezzmo library to all your devices. Full details at http://www.conceiva.com/products/mez...mo_android.asp
    Mezzmo for Kodi Add-on: Install it into Kodi to stream files from your Mezzmo library directly in Kodi. Full details at http://www.mezzmo.com/wiki/doku.php?...odi_user_guide
    Mezzmo for Roku App: Install it onto your Roku to stream files from your Mezzmo library. Full details at http://www.mezzmo.com/wiki/doku.php?...oku_user_guide
    Wiki: User Guides & Reference Manual at http://www.mezzmo.com/wiki
    Facebook: http://www.facebook.com/Mezzmo.DLNA.Server
    Twitter: https://twitter.com/conceiva_mezzmo
    Web: http://www.mezzmo.com

Similar Threads

  1. Invalid File Error
    By sunny5055 in forum Mezzmo Questions and Support
    Replies: 12
    Last Post: 10-20-2013, 12:22 PM
  2. Howto use Windows with VLC as DLNA player?
    By Hogi in forum Mezzmo Questions and Support
    Replies: 1
    Last Post: 05-17-2013, 09:42 AM
  3. Some .mkvs show no duration and stop playing after 10 minutes.
    By mcutugno in forum Mezzmo Questions and Support
    Replies: 3
    Last Post: 06-27-2011, 10:11 AM
  4. Invalid and inefficient vfw-avi packed B frames detected
    By zamana in forum Mezzmo Questions and Support
    Replies: 1
    Last Post: 03-15-2011, 05:06 PM
  5. Howto Codecs
    By MetZ in forum Mezzmo Questions and Support
    Replies: 3
    Last Post: 03-11-2008, 12:08 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •