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?
+ Reply to Thread
Results 1 to 2 of 2
-
-
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.
Similar Threads
-
Trying to cut MKV video, I get corrupt video
By Wilykit in forum EditingReplies: 2Last Post: 29th Nov 2017, 02:12 -
MKV not playable on LG BD370 for MKVMerge unknown issue
By klode in forum Video ConversionReplies: 7Last Post: 20th Feb 2015, 08:15 -
M4V to MKV (MKVMerge) = Broken Videos
By newoski in forum Newbie / General discussionsReplies: 1Last Post: 21st Feb 2014, 03:27 -
mkvmerge MPEG-TS to mkv - wrong duration
By bruchmann in forum Video ConversionReplies: 21Last Post: 13th Feb 2014, 07:12 -
Cut H.264 using mkvmerge
By Artyom in forum EditingReplies: 8Last Post: 31st Jan 2014, 10:37