encoding bluray to mkv - quality over file size.

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
pheare
Posts: 15
Joined: Tue Jul 29, 2008 1:24 am

encoding bluray to mkv - quality over file size.

Post by pheare »

Hi all,

Have used Handbrake to encode all of my dvds (300ish) to mp4 for my apple tv. Now I am changing gears and going the htpc and bluray route. I am looking to encode 1080p mkv's. I guess I have a couple of questions about handbrake settings and a couple that aren't really specific to handbrake (just trying to tap the knowledge here).

first off, non-handbrake related:

The video card (radeon hd 4650) I am going to be using supports hardware decode acceleration of H.264, VC-1, MPEG-1 and MPEG-2. My cpu is an old althon 64 3200+, Without the gpu decoding, I don't think my cpu will handle 1080p very well.

So, suppose I don't care about file size and I just did a 1:1 rip of my bluray (main movie) to mkv (using makemkv), I assume that if the bluray was MPEG-4 (which I believe most blurays are), will it still be MPEG-4 in the mkv container? Which would mean my card couldn't do the hardware decode??

Now, assuming I am correct in my assumption/logic above (I'd appreciate it if someone could confirm for me), to be safe I probably should use handbrake to encode to a H.264 mkv file. So:
1. If I rip my bluray to the computer using anydvd, can handbrake read the bluray file structure (the any dvd output) or do I need to get it into mkv first? I'd try it myself, but I don't have the bluray player yet.

2. I am not very concerned with file size, I just want the best quality possible. I believe I read in one of the posts here that constant quality at 55% is good for hd material. Is there any benefit to going higher than 55%? Any other settings I should tweak?

3. I believe I also read in an old post that handbrake doesn't support subtitles for bluray? Is this still the case. What about forced subtitles?

4. Are chapters supported with bluray?

Thanks a lot for any and all input.

Darren.
tadhgadams
Posts: 33
Joined: Sat Dec 12, 2009 2:30 am

Re: encoding bluray to mkv - quality over file size.

Post by tadhgadams »

1. It will read the AnyDVD output(m2ts files) with some exceptions. It won't be able to do VC-1 interlaced video.(The only discs that I've personally encountered like this are the Doctor Who Blu-ray) The only way I'm aware of handling that at the moment is with BD-Rebuilder in Windows.

2. I don't believe so.

3. It won't read the subtitles in the Blu-ray, you can add an external SRT to your encode though.

4. I don't believe so.

Also, I'm not sure how well encoding from Blu-ray will go for you if you're using an AMD 64 3200+. On my 3.06Ghz Core 2 Duo, I get about 10 frames per second.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: encoding bluray to mkv - quality over file size.

Post by mduell »

pheare wrote:2. I am not very concerned with file size, I just want the best quality possible.
So why bother reencoding at all? Just keep the AnyDVD rips around. Storage is cheap.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: encoding bluray to mkv - quality over file size.

Post by nightstrm »

2. I tend to use somewhere between 55%-57%.

Honestly, for what you want to do, I'd probably just use MakeMKV (I think its available for Windows) to repackage the Bluray m2ts into the MKV container without losing any quality and call it a day.
mkelley
Bright Spark User
Posts: 389
Joined: Fri Dec 25, 2009 2:00 am

Re: encoding bluray to mkv - quality over file size.

Post by mkelley »

Um, not trying to hijack this thread, but what if you ARE concerned about file size? What kind of reduction (if any) do we see from using the standard preset and 55% quality?

I'm essentially doing what this guy is doing, but I'd like to keep my files under 9GB (including the DTS or AC3 track passed through transparently). While disc space may be cheap, it ain't unlimited, and I can only attach one drive to my WDTV HD unit.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: encoding bluray to mkv - quality over file size.

Post by nightstrm »

mkelley wrote:Um, not trying to hijack this thread, but what if you ARE concerned about file size? What kind of reduction (if any) do we see from using the standard preset and 55% quality?

I'm essentially doing what this guy is doing, but I'd like to keep my files under 9GB (including the DTS or AC3 track passed through transparently). While disc space may be cheap, it ain't unlimited, and I can only attach one drive to my WDTV HD unit.
Not sure what the standard preset means, but my encodes using AppleTV preset (with 1280 width) are typically 2-4GB in size and look pretty good on my AppleTV. I am doing some experiments at lower RF values now, but I don't expect the files to double in size because of it.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: encoding bluray to mkv - quality over file size.

Post by mduell »

pheare wrote:So, suppose I don't care about file size and I just did a 1:1 rip of my bluray (main movie) to mkv (using makemkv), I assume that if the bluray was MPEG-4 (which I believe most blurays are), will it still be MPEG-4 in the mkv container? Which would mean my card couldn't do the hardware decode??
Blurays all use VC-1, MPEG2, or H.264 for the video codec.
keylay
Posts: 11
Joined: Tue Jan 12, 2010 8:22 pm

Re: encoding bluray to mkv - quality over file size.

Post by keylay »

Hi some quick questions on this topic.

1. If your using the apple TV preset that makes the BRRip no longer 1080p right?

2. What is the best preset to use if you want to keep 720p or 1080p but also encode the blue ray to mkv h264 file?

3. is there a blue ray ripping thread i should read? I have about 30 blue rays i want to rip and i have a few of them ripped to my HD so i need a tutorial of sorts.

Thanks guys,
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: encoding bluray to mkv - quality over file size.

Post by mduell »

keylay wrote:Hi some quick questions on this topic.

1. If your using the apple TV preset that makes the BRRip no longer 1080p right?

2. What is the best preset to use if you want to keep 720p or 1080p but also encode the blue ray to mkv h264 file?

3. is there a blue ray ripping thread i should read? I have about 30 blue rays i want to rip and i have a few of them ripped to my HD so i need a tutorial of sorts.

Thanks guys,
1) Yes, Apple TV can't handle 1080 content.

2) High profile.

3) Several.
Deleted User 11865

Re: encoding bluray to mkv - quality over file size.

Post by Deleted User 11865 »

DonnaGarmon wrote:And watching blue rays at 55% quality almost seems pointless.
What's even more pointless is making statements like this without understanding what the percentage scale represents. 1080p Blu-Ray encoded at RF 23 ("55% quality") is not going to look nearly as bad as the DVD.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: encoding bluray to mkv - quality over file size.

Post by mduell »

"55%" quality is nearly indistinguishable from the original Blu-ray; way better than DVD.
jdm
Posts: 21
Joined: Sat Jul 25, 2009 6:24 pm

Re: encoding bluray to mkv - quality over file size.

Post by jdm »

mduell wrote:"55%" quality is nearly indistinguishable from the original Blu-ray; way better than DVD.
I disagree. I think it varies from person to person and disk to disk. I've done tests with multiple movies and gotten the opinions of everyone in my family. At an RF of 22 we find the movies all lack detail and depth. It is very easy to distinguish between the original and the copy. I do my conversions with Constant Quality RF set to 18. The files are a little bigger, but we like the results better.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: encoding bluray to mkv - quality over file size.

Post by mduell »

jdm wrote:
mduell wrote:"55%" quality is nearly indistinguishable from the original Blu-ray; way better than DVD.
I disagree. I think it varies from person to person and disk to disk. I've done tests with multiple movies and gotten the opinions of everyone in my family. At an RF of 22 we find the movies all lack detail and depth. It is very easy to distinguish between the original and the copy. I do my conversions with Constant Quality RF set to 18. The files are a little bigger, but we like the results better.
"Nearly indistinguishable" means... distinguishable. I can see the difference, I just don't care as much as I care about the ~35% filesize savings between 22 and 18.

Are you doing full resolution encodes from Blu-ray?
JLW
Posts: 27
Joined: Tue Sep 22, 2009 9:05 am

Re: encoding bluray to mkv - quality over file size.

Post by JLW »

Thanks to a whole lot of help on here I decided on RF:22 for my MKV Blu-Ray encodes at 1080p (for my WDTV ver.2) and RF:23 for my 720p MP4 rips (for the PS3 and XBOX 360 where the files absolutely have to be under 4gb).

The 720p rips look very good, but the 1080p rips look fantastic!
jdm
Posts: 21
Joined: Sat Jul 25, 2009 6:24 pm

Re: encoding bluray to mkv - quality over file size.

Post by jdm »

mduell wrote: Are you doing full resolution encodes from Blu-ray?
I am. I keep the resolutions as is, and have Anamorphic set to Strict.

Handbrake does an amazing job. With the RF set to 18 the picture still looks deep and detailed, yet HB is still able to shrink a movie like Wall-e from 20g to under 4.
mkelley
Bright Spark User
Posts: 389
Joined: Fri Dec 25, 2009 2:00 am

Re: encoding bluray to mkv - quality over file size.

Post by mkelley »

I agree with mduell -- I use 22 for all my br encodes and even on my 9' HD projection screen I can see little or no difference in quality.

I'm not trying to get into a flame war here -- you can do what you want -- but independent studies have shown pretty conclusively that people often see what they want to see. When BR first came out they did A/B tests with standard DVDs and almost half of the time people picked the wrong picture as the "better" one (this was using upscaling BR DVD players). Obviously the picture, the encode and the person are all variables in this, but it convinced me of one thing -- there is no absolute.

Since I have over 400 films encoded (about half in BR) space does become an issue of sorts. But FAR more important is sound -- if you aren't encoding with HD sound then your precious image is pretty worthless, because most people CAN tell the difference between a non HD sound track and an HD one. I would suggest that it's much more important to encode at 22 and then mux the HD track in (which you obviously aren't doing, as Wall-E's HD track alone adds about 2GB to the encode -- and on a good surround system it blows away the compressed version).
jdm
Posts: 21
Joined: Sat Jul 25, 2009 6:24 pm

Re: encoding bluray to mkv - quality over file size.

Post by jdm »

mkelley wrote: I would suggest that it's much more important to encode at 22 and then mux the HD track in (which you obviously aren't doing, as Wall-E's HD track alone adds about 2GB to the encode -- and on a good surround system it blows away the compressed version).
You are correct, my receiver is old and doesn't do the newer HD audio formats. So I just keep the AC3 or DTS cores.

I think people really need to experiment with their encodes and choose the settings that work best for them, depending on their goals.
mkelley
Bright Spark User
Posts: 389
Joined: Fri Dec 25, 2009 2:00 am

Re: encoding bluray to mkv - quality over file size.

Post by mkelley »

Yep, that's really what it's all about, getting something that you're happy with. Luckily HB is flexible enough (particularly combined with other tools like tsMuxer and ffmpeg) to do just about anything in the world you need to do.

I'm really having fun with the new snapshot -- I have some Olympic recordings that I wanted to edit and was going to ffmpeg them after HB got through, but now I can encode only parts of them (and then ffmpeg them all together, which is a whole lot easier).
creamyhorror
Enlightened
Posts: 134
Joined: Mon Jan 04, 2010 2:00 pm

Re: encoding bluray to mkv - quality over file size.

Post by creamyhorror »

jdm wrote: Handbrake does an amazing job. With the RF set to 18 the picture still looks deep and detailed, yet HB is still able to shrink a movie like Wall-e from 20g to under 4.
I feel compelled to mention that x264 is responsible for this wonder, not Handbrake, and that you'd get the same results with mostly any x264 frontend.
m2k10
Posts: 25
Joined: Sun Feb 07, 2010 1:04 am

Re: encoding bluray to mkv - quality over file size.

Post by m2k10 »

I think it is obvious and reasonable to say that there is not one specific method or setting which everyone will agree on as the best option for encoding blu-ray or otherwise, as everyone has a different opinion and level of perception as to what is good and bad.

I suffer from being a perfectionist, I never achieve perfection, but I always strive to attain the best quality encode at not unreasonably large file sizes.

I am still experimenting with what I think are the best settings for my own requirements but so far have had good results with the following settings.

RF = 15, Full 1080p resolution, True HD Sound Passthru (AC3 / DTS), Reference Frames = 3, Subpixel Motion Estimation = 7, No Fast-P-Skip = On

This results in file sizes of between 8gb and 12.5gb on average depending on the length of movie and other varying factors, which is about a third or less of the original file size, which I find very acceptable.

I always opt for quality over file size, and given the size of storage mediums nowadays file size is becoming less and less important to most people. For example, terabyte hdd's are common place now, and based on an average file size of 10gb per movie, I can store 100 movies on a hdd, when I setup a raid array I can have a comprehensive movie collection, connected directly to my HDTV's around the home, for little expense.
mkelley
Bright Spark User
Posts: 389
Joined: Fri Dec 25, 2009 2:00 am

Re: encoding bluray to mkv - quality over file size.

Post by mkelley »

Just so you understand, you are NOT "passing through" True HD in Handbrake when you select the AC3 or DTS passthrough option. HB will extract the compressed DTS or AC3 track out of the HD track, but it ain't HD and it doesn't sound nearly as good.

The only way I know to get HD sound is to remux the HD output with the HD track afterwards and to put into a container that supports HD (mkv does not -- I use ts). It will add at least 2GB to your encodes (but to me the sound is worth it).
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: encoding bluray to mkv - quality over file size.

Post by mduell »

m2k10 wrote:I think it is obvious and reasonable to say that there is not one specific method or setting which everyone will agree on as the best option for encoding blu-ray or otherwise, as everyone has a different opinion and level of perception as to what is good and bad.
Agreed.
m2k10 wrote:RF = 15, Full 1080p resolution, True HD Sound Passthru (AC3 / DTS), Reference Frames = 3, Subpixel Motion Estimation = 7, No Fast-P-Skip = On
Can you see a difference in a blind comparison between clips at RF 15 and RF 19? I'm curious, but skeptical.
Also as the other poster notes you're losing the HD audio with HB.
m2k10 wrote:This results in file sizes of between 8gb and 12.5gb on average depending on the length of movie and other varying factors, which is about a third or less of the original file size, which I find very acceptable.

I always opt for quality over file size, and given the size of storage mediums nowadays file size is becoming less and less important to most people. For example, terabyte hdd's are common place now, and based on an average file size of 10gb per movie, I can store 100 movies on a hdd, when I setup a raid array I can have a comprehensive movie collection, connected directly to my HDTV's around the home, for little expense.
For the extra dollar why not just keep the Blu-ray rip on disk and skip reencoding?
m2k10
Posts: 25
Joined: Sun Feb 07, 2010 1:04 am

Re: encoding bluray to mkv - quality over file size.

Post by m2k10 »

I am pretty new to handbrake, but I only rip the TrueHD audio source when using MakeMKV, so there are no compressed audio sources HB can use other than the TrueHD one.

Does HB or MakeMKV compress the TrueHD sound source?
Last edited by m2k10 on Tue Mar 09, 2010 12:26 am, edited 1 time in total.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: encoding bluray to mkv - quality over file size.

Post by nightstrm »

m2k10 wrote:I am pretty new to handbrake, but I only rip the TrueHD audio source when using MakeMKV, so there are no compressed audio sources HB can use other than the TrueHD one.

Does HB compress the TrueHD sound source?
TrueHD soundtracks have a 640kbps AC3 5.1 core embedded within them; this is what Handbrake uses when selecting AC3 passthru or downmixing.

As for what RF to use, I typically use RF20 with VBV for my Bluray encodes... I'll be the first to admit that these values are a little higher than I was using (typically RF 22), I've found that I can continue to use one preset for all of my encodes (Bluray, HDDVD, DVD) and still produce files that stream smoothly to my AppleTVs at the cost of a few hundred MB or so.

And what's a few hundred MB per encode when you have a 4TB NAS array at your disposal? 8)
m2k10
Posts: 25
Joined: Sun Feb 07, 2010 1:04 am

Re: encoding bluray to mkv - quality over file size.

Post by m2k10 »

Ok, thanks for the info, I did not realise that.

What is VBV and what apps on the mac can I use to overcome this, mkelley said to use the TS container, as HB does not support TS yet, I am unsure how to do this?
Post Reply