VideoHelp Forum
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. I've got a series in MKV that uses ordered chapters/segment linking to keep the opening (OP) and endings (ED) as separate files from the episodes themselves, thereby "saving space" and making the whole thing a giant pain-in-the-y'know. I generally run everything through Handbrake for compatibility reasons, but Handbrake doesn't support segment linking at all and I only get the episode itself, not the opening and ending. It's not the end of the world, but it would be nice to get the whole episode in one file, so I can play it on anything.

    I've played around with various MKV unlinking tools, and I know my way around MKVtoolnix pretty well, but whenever I join the files together, the OP is totally destroyed. The file plays fine (including the ED, which is also originally separate), but for the OP any video player just gives totally corrupt video (green screen, random colors, etc). It also doesn't matter if the OP is right at the beginning of the video, or if it's a little bit after a cold open.

    Most of the unlinking tools I've used are all based in MKVmerge, and apparently MKVmerge doesn't like it when file properties that it's merging don't match. That's pretty much the crux of the problem. Not only is the OP encoded at a different bitrate then the rest of the files, it's also at a different frame-rate (24fps, vs the 23.976fps of the rest of the files) and who knows what else. The number of streams and metadata all match (small favours), but MKVmerge is clearly puking when it encounters this aberrant video. I tried resetting the framerate of the MKV container itself (with timecode correction), but still have the same thing happen, along with other little errors in MKVmerge.

    I'm pretty much at wit's end, but I was thinking that maybe some sort of frameserving or capture could help. The episodes play fine in video players for the most part, so there has to be some way to output and capture that stream, right? Especially since I'm re-encoding it in Handbrake (to MP4 with one audio/video stream and burnt-in subtitles) anyways, is there a way I can cut it out of the mix and use another program to do it all? I'm a total newbie at AVIsynth and that kind of stuff, but if someone could point me in the correct direction, it would be much appreciated.
    Last edited by secondsabre; 12th Apr 2017 at 19:33.
    Quote Quote  
  2. There are a few things you could try:
    A. use ffmpeg concat demuxer instead of mkvmerge to splice
    B. remux every part to TS using ffmpeg and then splice those
    C. splice them in AviSynth (open each part using e.g. ffms2, then use ++ to splice them). You can feed that into HandBrake using avfs.
    D. use mpv to re-encode. It can handle ordered chapters.
    E. if only the OP is different from the rest re-encode the OP to match the specs of the rest first

    One extra problem aside from changing fps (can be adapted in AviSynth using AssumeFPS()) are complex subtitles like ASS.
    Quote Quote  



Similar Threads

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