View Single Post
Old 21st January 2019, 04:08   #5  |  Link
Travillion
Registered User
 
Join Date: Aug 2018
Posts: 8
Quote:
Originally Posted by hubblec4 View Post
Hey Travillion and welcome to Doom9

Mkvmerge and cutting works and sometimes not, this is depend from some things. I have many experience with this topic and the issue comes often by the audio.
Yes you can cut on video IDR frames but an audio frame is in Matroska not so easy to handle and often there are audio data which have a longer duration as the video.
Use MediaInfo for a quick overview about the durations. There is a global file duration and each video and audio track has a duration.
In MKVToolNix(MTX) info tool you get a better info about the durations.

After combine and/or cutting(with auto-merge) the file plays fine or not and some players can handle such files like MPC-HC(but not always).

If I understand you right you want cut out 3 small sections?!
56075-56195 : frame 56076 until 56194 should discard -> 118 frames
77926-77950 : -> 22 frames
80223-80343 : -> 118 frames

You could use Ordered Chapters instead of cutting. This will work perfect because you have IDR frames at the right place.
Chapter 1: Start time 00000 -> End time 56075
Chapter 2: Start time 56195 -> End time 77926
Chapter 3: Start time 77950 -> End time 80223
Chapter 4: Start time 80343 -> End time last frame(+frame duration)

The frames must be changed to a timestamp!
Hmmm... interesting ideas Hubble4c. Your diagnosis and recommended solution make sense. I also wonder, though, if my source file is corrupt.

Since I seemed to be able to cut and join fine, just not discard, I decided to use that approach. I cut the file at each desired IDR break point and then appended the cuts, omitting the unwanted sections. This worked great for most of it, except I encountered an error with two of the files (not at join points).
"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 file, it plays fine up until the timestamp of the error, at which point audio completely cuts out and you 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?).
Travillion is offline   Reply With Quote