Joining multi disc files for processing with HB

Random chit-chat and anything that doesn't belong elsewhere
Post Reply
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Joining multi disc files for processing with HB

Post by Smithcraft »

Hello there!

I figured I'd write up something that will hopefully help people with joining multiple files for processing as a single file with Handbrake. Just to note - I tried to pick tools to do this that are mostly cross platform. MakeMKV, mkvmerge, tsMuxeR, and finally Handbrake are all as far as I know available for Linux, OS X, and Windows in some state or another.

I started with MakeMKV to rip the files from the discs. In this case I will use the DVDs for The Bridge On The River Kwai, and Das Boot(the 293 minute version).

I'll start with Kwai because both of the parts of the movie are on the same disc, which is pretty odd to me, but there you go...

First we start with selecting what we want for the file from MakeMKV's selection screen. Just as a side note, the Kwai disc is full of annoying DRM. To make MakeMKV somewhat less annoying I enabled AnyDVD HD for the drive that had Kwai in it. This may have contributed to the issues noticed farther down, as MakeMKV prefers to strip the DRM it's own badself. Well, at least on Blurays it does.
Image

After MakeMKV has done it's thing, and in this case since both of the segments are on the same disc you don't have to swap discs to make the MKVs, I fired up mkvmerge GUI. Add the first file.
Image

Click on append to add the next part of the file so that the data comes after the first, or prior, part.
Image

Now click on Start muxing to get the ball rolling.
Image

Eventually your computer will finish with muxing the files and you should see something like this:
Image

Now fire up VLC to see if everything is ok. Jump around and check the audio sync to make sure it's ok, or at least not off by a noticeable amount of time. In this case the audio and video sync was totally fubared. The video was playing at the indicated 29.97fps and the audio was playing at it's designated rate, which was somewhere in the neighborhood of 24fps. Needless to say with the video ending at just under two hours and ten minutes and the audio playing out for the full two hours and fortytwo minutes was not a good thing.

In the mkvmerge GUI, on the main screen select the video component, and then at the bottom of the screen where it has the three tabs, select the tab for Format specific options, and in the FPS field select one of the options. Most likely if the video is finishing up earlier than the audio, you have the video at 29.97fps, and will wanna pick something a bit slower. Typically you will want either 24fps or 24/1001(23.97)fps. Start muxing again, and sample the file to see if the A/V sync is any better. In this case it was closer but was noticeably off. So I muxed it again at another fps. Wonderfully enough for this write up, it was still off! :oops:

I sampled the A/V sync on the original two files and found it was fine so something was going wrong.

I fired up tsMuxeR. TsMuxeR doesn't have an append, but it has a join which is what you want. Now, you could just demux, or separate all the components, and then remux them with mkvmerge, but I figured I look to see if there might have been an issue with mkvmerge and the two files(like an unnoticed audio offset) by just selecting TS muxing for the output. This resulted in a file that had good A/V sync, but was kinda choppy on panning scenes. Still not what I want, but perhaps more fiddling about will get it right. Also, for some reason, VLC didn't have any idea of the total time for the .ts file or the current playback time. I fed this file into Handbrake to make sure that Handbrake would see total time and all that good stuff. I didn't process as I have the BD in the stack to be processed. Therefore I'm not sure if the output would still be choppy on the panning scenes or not.

Now I went back and went though the whole process again with the Das Boot DVDs.

After MakeMKV finished with the ripping, I muxed the two files with mkvmerge, and checked the A/V sync. This time it was fine! Also the subtitles lined up fine up to the end of the movie, so this one is a keeper! At least until it comes out on Bluray. However it looks like Ishtar is more important than Das Boot so I guess I'll be waiting a while for this one... :roll:

There are other ways of doing this, with one way being that you concatenate the VOBs into one great big VOB. However, if you mess up the sequence of VOBs you'll end up with a segment out of sequence in your encode. Also, when I've tried that(the Criterion Seven Samurai reissue) it striped the metadata from the tracks, so I didn't know which audio track was what, so I didn't know which track should have been the primary track and then the secondary audio track, and finally the commentary track.

Hopefully this helps out. If anyone has more problems or perhaps more information, let me know, and I'll try to update this.

SC

ps - Admins/Mods, I wasn't sure if this was the right section to put this, since I hope it's not platform specific, or if this should just go on in the Multiple DVD to single TS thread.
Post Reply