Hi. This is my first post on this forum so greetings to everyone.
I've been learning how to encode for the last 7 months but until this week had only worked with XviD to encode what I call economy sized (1000+1200 bitrate) AVI files.
However, I want to make a high quality encode of a video which is in 2 parts on two DVD disks that I want to merge into a single MKV file. I have saved both DVD's onto my hard drive as full copy VIDEO_TS vob folders to help me achieve this.
As I am new to using the x264 codec to make MKV's I searched around and followed the suggestion of encoding both parts separately, which I did using identical settings in Handbrake, and then trying to use the 'Append' function of MKVMerge to stitch them together. I used two small chapters from the DVD's as a test to save time.
Unfortunately, when I tried playing the finished file in VLC, after it got to the join the screen just went grey with just odd specs of the video showing through although the audio worked OK.
Since both parts from the two DVD's have yet to be encoded it would be better if I could encode and merge them in one operation. However, the only program I have found that can do that from two separate DVD sources is Wondershare Video Converter. The problem with that is the choice of encoding settings it offers is really poor compared to something like Handbrake.
What I need is any suggestions for a good encoding program that can achieve this in a single operation while offering me a better choice of settings to get a better quality end result.
Thanks for reading.
+ Reply to Thread
Results 1 to 10 of 10
Thread: Merge+Encode MKV
Maybe it's worth trying makemkv with the first disc then the second and try merging disc 2 with Disc 1 mkv. The file size will be the main movie x 2 .
Thanks so much for responding.
Actually that sounds like it could work. Make MKV can't open and encode both disks together in a single operation. However, as it's fast and produces MKV's which seem to retain the full quality of the DVD, it occurs to me I could then possibly use HB Batch Encoder to make a single MKV and be able to use all the setting options Handbrake offers me.
I shall test it out on one chapter from each disk and see if that works then post again to let you know the result.
Why use HB at all? It's only going to degrade the quality no matter what settings you use as it is re-encoding. MakeMKV doesn't re-encode so there is no loss of quality unless of course you want to reduce the file size and then you have to accept loss of quality. HDD space is dirt cheap these days so why waste hours re-encoding to a lesser quality?
MakeMKV seems to have worked for me, along with MKVMerge to join the two halves together.
As I said previously, I have used sample sized segments from both disks to try it out first and MKVMerge managed to get it right this time. I gave up on the HB Batch converter because it didn't offer me any easy option to make my own encoding settings with Handbrake.
As you say, encoding isn't essential for retaining the original DVD quality but in my case, although I still want something that still has fairly high quality I would rather choose my own CRF value and other encoding settings to get a reasonable quality while also conserving some hard disk space. As MakeMKV and MKVMerge are both very fast I can now create a single MKV very fast and then use Handbrake to apply my own settings to get the quality and file size I want.
Your suggestion to use MakeMKV has done the job though so thank you so much for replying.
Last edited by MarylinC; 3rd Apr 2014 at 05:16.
You could try vidcoder, it's based on the HB engine, a friend who does a lot of encoding swears by it over Handbrake for results. You can encode to either MKV or MP4. I don't bother compressing files anymore since I invested in a NAS, just like the sorcerer's apprentice the hard disk just keep multiplying!
Actually I do have another question about this project.
I noticed that the frame size of my test samples, being reported by MediaInfo, was the standard 720x576 from the DVD. Up to now I've only been used to encoding things from TV as XviD AVI's and I always input my own frame sizes. It confused me that the DVD has an aspect ratio of 16:9 so I did some further reading on the Handbrake site and read about the anamorphic storage method used on DVD's. That then threw up the question of which frame size to encode at.
The article is saying that the storage width of DVD's is 720 whereas the DVD I have, which is a European region 2 PAL version is actually displayed at 1024 wide. Now that I'm experimenting with high quality encoding and being able to choose between constant bitrate or CRF, the recommended settings brought the file size down much more than I expected and there was a very visible reduction of detail on screen.
I still use a bitrate calculator and always worked on the idea of achieving a QF value of 0.25 because my understanding has been that above that you just end up bloating the file size for no real noticeable gain in display quality on screen. That has worked fine for my economy sized AVI's where I just chose a suitable resolution and bitrate to achieve an acceptable picture quality and end up with a QF value between 0.2 and 0.25. When I worked out the right bitrate to achieve a QF of 0.25 where the frame width was 720 it came back around 1900 kbps which was actually about the same as using the recommended CRF value of 20 for the same width.
Ordinarily I would never use a bigger frame size than my source. However, since I know thanks to MediaInfo that the VOB files show the DVD as having a bitrate around 5600 kbps, and bearing in mind that the display size it uses is 1024 I am thinking that I ought to be OK encoding with a frame width of 1024 and then choosing my bitrate or CRF value based on that. I tested the idea on a sample and although the clarity wasn't as good as the original DVD it was definitely better than the one I encoded which was only 720 wide. The loss of picture quality then wouldn't be quite so dramatic and I would still be able to keep the file size about where I want it.
My question is am I making an error choosing a frame width above the 720 the DVD says it is or is it OK to go up to 1024 wide without simply blowing up the pixels?
x264 has a fairly recently added option called "stitchable". Whether the version of x264 Handbrake uses requires it I'm not sure, but I'm pretty sure you can't add it to the Handbrake commandline. It may be why you're having trouble appending the encoded files. I assume MKVmergeGUI offered some sort of warning at the time?
MeGUI added the option to it's x264 encoder configuration a fair while ago.
If you use Vidcoder and encode using "anamorphic none" it defaults to 1024x576 or 854x480 etc, so there's nothing wrong with it. I don't use anamorphic encoding myself as a couple of the media players in this house don't display it correctly (they assume all MKV/MP4 files have square pixels) so I always "resize up". There's no rules though. I've found for PAL I can usually resize to 960x540 without any loss of detail compared to 1024x576 and it helps reduce the file size a tad. It might depend on the sharpness of the resizer a little (I don't use Handbrake myself). If the video is interlaced, after de-interlacing you can often get away with a slightly lower resolution. It's personal preference. Is the video interlaced? De-interlacing can cause a reduction in quality which wouldn't be the encoder's fault.
If you encoded using a quality (CRF) value, then took the resulting bitrate and used it for a 2 pass encode, the 2 pass encode would be encoded in the same way. Unless you need a particular file size, I'd use CRF encoding instead.
CRF18 is roughly where the x264 encoder is considered to be transparent. Higher CRF values = lower quality. I use CRF18 and Tune Film for pretty much everything up to 720p. For 1080p I tend to use CRF20 to help keep the file sizes down. Even for DVDs though, CRF20 should still look pretty good.
If you re-encode the MKV you created after using MakeMKV and then appending the two with MKVMergeGUI you might end up with slightly out of sync audio after the middle point. You may, you may not. I'm not sure how good Handbrake/Vidcoder are at keeping audio sync if there's gaps in the audio stream, but if you do, there's ways to fix it.....
Thanks so much for this. There's loads of really useful stuff for me there.
When I tested my sample with the frame sizes I set of 1024x576 the finished video in handbrake came out at that size so I know it will produce DVD encodes at that size. From memory, I think I turned off anamorphic in Handbrake as you said with using VidCoder so they must both do the same on that score.
To be honest, I don't know how to say for sure if my DVD is interlaced or not but I don't think it is. Handbrake was pretty good with most things at telling me what the source setting of various things were so I'm pretty sure that it would have defaulted to interlaced (same as source) if it was.
Your tip of using CRF18 sounds pretty good to me so I shall probably use your recommendation from now on.
As for the audio sync issue, that sounds a little alarming to me. I have already worked out how to deal with both gradual and constant sync errors but I wouldn't have a clue what to do if the sync error started after a join between two videos. It hasn't happened so far though so I'll wait until it does and then figure out how to fix it.
At present I am trying Vidcoder out for the first time on three MP4 files which I am converting to x264 MKV with CRF20. They are all 60 minute SDTV episodes from a mini series I'd like to keep and it is giving me another chance to test the x264 encoding settings I found recommended from someone else on here. Having seen the result on the first episode I'm really delighted with it. It came out with a bitrate of just over 900 and the file size was only 446MB, whereas to get a good result with XviD I would have needed to use 1200 bitrate and had a file about 565MB, and yet the smaller MKV still looks a lot sharper on screen for a small file.
Anyway, I'm really grateful to you for all the suggestions. They are really helpful so thank you very much again.