VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. Member
    Join Date
    Aug 2018
    Location
    Phoenix
    Search Comp PM
    Hello again all,

    I am working on a project that requires me to cut out some sections of an h264 movie. Last time I was on the forums I learned the important lesson about cutting on IDR frames. So I have been very careful about this. I extracted the raw stream, ran it through FrameCounter to find the IDR frames, and selected my cut points accordingly. If I was cutting the file up into multiple parts (e.g.,--split parts-frames: -xxx,-xxx,-xxx), this worked flawlessly. I could play each 'to-be-discarded' file, and I could even join non-continuous segments together without issue. Another look through FrameCounter verified that they each started on an IDR frame. But...when I tried to get mkvmerge to just discard the unwanted parts and keep the remainder (e.g., --split parts-frames: -xxx,+xxx-xxx,+xxx-xxx,....), the join points are funky, as if they weren't cutting/joining on IDR frames.

    So, being resourceful, I decided to just cut and append, since that seemed to work before. So I cut the film into several sections and then joined the parts I needed. This worked for most of the files, but on two files I encountered a Matroska error (not at join points), leading me to believe maybe my source file is corrupted.

    "Warning: input.mkv: Error in the Matroska file structure at position xxxxx. Resyncing to the next level 1 element.
    Warning: The last timestamp processed before the error was encountered was: xxxxxx.
    Warning: Resyncing successful at position xxxxx.
    Warning: The first cluster timestamp after the resync is xxxx."

    As I said I got these for 2 of the 9 files, and they were not at join points. When I try and play the merged file, it plays fine up until the timestamp of the error, at which point audio completely cuts out and I can't seek to prior the error, and the movie duration is off.

    Joining any of the other component files is fine. It's just these two files that bring up this error. I'm guessing the underlying files are corrupt somehow. Strangely, they play just fine by themselves, so I think it must be an error that is only brought to light when mkvmerge is trying to append (and thus timing info is messed with?).

    So my questions are: is there I reason I could cut but not discard? And if my underlying file is corrupt, is there a program that might be able to fix it? Or do I need to try and get another copy of the source?
    Quote Quote  
  2. Member
    Join Date
    Aug 2018
    Location
    Phoenix
    Search Comp PM
    So more testing....

    I can confirm the underlying mkv has errors in those two sections. Watching them independently and I do find the playback suffers at the timestamps indicated in the mkvmerge output. Still doesn't explain why I could cut and append but could not just discard the sections. For now, I will work on repairing/replacing the corrupted files.
    Quote Quote  



Similar Threads