DVD to H264 at full quality with handbrake?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
ajw798
Posts: 2
Joined: Fri Jan 09, 2009 9:20 am

DVD to H264 at full quality with handbrake?

Post by ajw798 » Sun Jan 11, 2009 1:24 pm

Hi,

I'm considering converting my entire dvd collection to a mp4/m4v format in order to access it from apple devices (macbook pro, apple tv etc..). When I tried encoding a VIDEO_TS folder on my hard drive with HandBrake at CQ100% with the univeral preset the time estimation was around 9hours!!! I'm obviously I'm doing something wrong (or maybe Handbrake isn't the appropriate tool for what I'm trying to achieve) so I was hoping that some of the more knowledgeable Handbrake users here could point me in the right direction. Hard drive space is not an issue for me and I would actually like to keep the dvds in thier original quality. I would also like to include soft subtitles which I believe is feasible since ATV v2.23.

Many Thanks,

Anthony

TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: DVD to H264 at full quality with handbrake?

Post by TedJ » Mon Jan 12, 2009 4:51 am

First things first, don't encode at 100% - you'll end up with an encode larger than the source DVD! 59-62% seems to be the sweet spot with the current release.

Unless you're planning on using your encodes on an iPod or iPhone, you'll get marginally better results from the dedicated Apple TV preset.

You haven't mentioned either the duration of your movie or the specifications of your computer, so a 9 hour encode doesn't mean much - H264 encoding is very CPU intensive, after all. On my MacBook Pro 2.4GHz, I average 10-12fps on encodes using the aTV preset so a 2 hour feature film takes me 4-5 hours to encode.

blueroom
Posts: 4
Joined: Sat Nov 29, 2008 3:13 pm

Re: DVD to H264 at full quality with handbrake?

Post by blueroom » Mon Jan 12, 2009 5:44 am

I've recently move from 2pass ABR 2500 encoding to tweaked (see other ATV threads) CQR 62% for my DVD collection. They look great on my 40" Samsung LCD and are quite small files (<2G 2hrs with DD5.1 passthrough) Is it the same quality as DVD, no but it's really hard to tell and like .AAC vs .WAV it's a matter of is it good enough for you.

ajw798
Posts: 2
Joined: Fri Jan 09, 2009 9:20 am

Re: DVD to H264 at full quality with handbrake?

Post by ajw798 » Mon Jan 12, 2009 10:33 am

I'm testing with a 1, 5hour long movie using a 2.5GHz Core 2 Duo with 3 Gb RAM.

eddyg
Veteran User
Posts: 798
Joined: Mon Apr 23, 2007 3:34 am

Re: DVD to H264 at full quality with handbrake?

Post by eddyg » Tue Jan 13, 2009 12:44 am

The AppleTV preset at 0.62 is basically the same as the DVD (as far as I can tell) - it's what I and other Developers are using.

Cheers, Ed.

johnslayer
Posts: 18
Joined: Sun Oct 19, 2008 4:58 pm

Re: DVD to H264 at full quality with handbrake?

Post by johnslayer » Tue Jan 13, 2009 7:32 am

eddyg wrote:The AppleTV preset at 0.62 is basically the same as the DVD (as far as I can tell) - it's what I and other Developers are using.

Cheers, Ed.
Would that go the same for Constant Quality Preset at 62% ? I am actually looking for an mkv with AC-3 sound. Or would you suggest just using the appletv preset and changing those two options? Basically, I am wondering if one of the devs can give an explanation (preferably something a little more in depth that what is on the wiki) as to what the goal and expected quality of the "High Profile" presets are? Much like the original poster, my main goal in using handbrake is keeping DVD quality and at least getting a somewhat smaller file ( I too have made the mistake of putting the CQ% so high the encode was larger than the original DVD). Your post, Ed, has been the closest to what I would consider a "definitive" answer that I have seen regarding DVD quality duplication.

I will be watching all of my encodes on a 1080p projector with a 12' screen, so quality is my main priority. NONE of them will be used on any devices other than my Linux/Windows HTPC running vlc or XBMC. I WON't be needing playback on appletv/iphone/ps3 etc. While hdd space is not a problem, as I mentioned above, I would at least like the files smaller than the original or I would just use the VOB's. So, I am wondering. The "Film" preset in the "High Profile" presets... the wiki just says that it is the preset for films. Is supposed to be the high quality 1:1 preset for films? Or is it a balance between file size and quality? Would I be better off using the Constant Quality preset then? I was using that at crf 17 but many of the encodes came out at over 4gb or larger than the original.

I am wondering these same questions about the Animation and Television presets as well. I am planning on taking all of my Anime and TV shows on DVD and converting them with handbrake. I was planning on using the Animation and Televsion presets respectively. What exactly are the benefits of one over the other? What are the expected outcomes of each? As with Films, I want to keep the original audio and maintain as close to 1:1 quality. So would the Animation preset accomplish this for all of my Gurran Laggan Dvd's? Or should I bump up the bitrate more?

I understand that things like encoding time and file size/compressability vary depending on complexity of source and how clean the source is. So, in a perfect world you would change your settings for each and every movie accordingly. Those things aside, can one of the devs tell me what settings I should use to get:
1. DVD quality Movies, h.264/MKV AC-3 sound
2. DVD quality Anime, h.264/MKV AC-3 sound
3. DVD quality TV Shows, h.264/MKV AC-3 sound


You are the experts. I am obviously not. I have been experimenting and changing, comparing and analyzing for days and I still don't know if I've got it quite right. I just need one of the experts to give me some definitive settings and I will run with them. Sorry for the rambling, it has been a long day. Cheers and thanks again for such an amazing app :wink:

Jay Ell
Posts: 1
Joined: Tue Jan 06, 2009 11:16 am

Re: DVD to H264 at full quality with handbrake?

Post by Jay Ell » Wed Jan 14, 2009 2:08 pm

I too am using HB to encode my entire back catalogue of DVDs, and thus far have amassed just shy of 1tb for around 400 feature DVDs using the ATV setting. I can tell you this, the quality difference is not noticable at all as far as i'm concerned.. and i'm displaying onto 60" plaz. The only diff that I have noticed is that the sound is a "little" quieter than what you'd get from a DVD, but nothing that the volume button can't sort.
My machine is the latest iMac, and it's taking around 1hr for a 1.5hr movie. Typically averaging mid 30's fps during the encode.

johnslayer
Posts: 18
Joined: Sun Oct 19, 2008 4:58 pm

Re: DVD to H264 at full quality with handbrake?

Post by johnslayer » Wed Jan 14, 2009 5:00 pm

Jay Ell,
Thanks for the response. You are using AAC sound correct? Are you running them on an Appletv or some other device for playback. I have heard great things about the ATV setting, but what I wonder is this. Since I am not going to be playing back my encodes on ANY apple products, would that still be the best preset for me to use? As mentioned above, it would appear that the High Profile Film or CQ setting would be what I am looking for but I don't know for sure. Or should I just use the appletv one and make the modifications to fit my needs.

What I am really looking for is an endorsement from the Devs like Ed's above. They are the experts and I trust their opinions as they have obviously spent far more time working with this than I have. I would assume (or at least hope) that some of the Devs have a similar goal to mine, ( 1:1 Quality backups, h.264/MKV, AC-3 sound,) and would be willing to share settings they use to achieve these goals for each, Movies, Tv Shows, and Anime. I am looking for some settings that will reproduce this quality of encode every time (obviously excluding a horribly dirty source or other unavoidable occurances) and NOT be larger than the original. As it is the settings I have been using which I though would be perfect for my needs go over or very close to the original size about 1 out of 3 times so I end up doing a lot of re-encoding. Encoding time is not really an issue either, as I can queue a bunch and let it run.

Yep, that is what I am after. Developer endorsements. I trust their judgment and they have obviously put in countless hours of tinkering with this application. I don't really understand the inner workings well enough to know which settings to nudge up/down and how that will effect the final product. They have a far greater grasp of which things can be improved by sacrificing encoding time (which is fine) and which things will only make a marginal (read un-noticable) difference but make the file huge. Thanks again for this great app :wink:

trelm249
Posts: 27
Joined: Wed Jul 09, 2008 2:59 pm

Re: DVD to H264 at full quality with handbrake?

Post by trelm249 » Wed Jan 14, 2009 6:12 pm

Johnslayer

for your goals, the film and tv presets are appropriate. The only modification that you may want to do is change from average bit rate to constant quality. A setting of .62 would meet your goal more than likely. Try it and see what you think.

eddyg
Veteran User
Posts: 798
Joined: Mon Apr 23, 2007 3:34 am

Re: DVD to H264 at full quality with handbrake?

Post by eddyg » Wed Jan 14, 2009 7:13 pm

johnslayer wrote: What I am really looking for is an endorsement from the Devs like Ed's above.
Mine are for the ATV, so I am limited by that playback device.

However that won't affect the quality of the playback, just that the ATV will require more bits to encode at that quality than other systems that support more advanced compression techniques (e.g. CABAC).

So I would definitely choose 62% quality as your base, I know that others choose 59, but myself and I believe dynaflash use 62% and are happy with the outcome regarding DVD quality transparency.

Where you go from there with the settings is just going to decrease the filesize for maintaining that quality, iPod can't do B frames so its files are really big for that quality, ATV can so they are smaller, computers can do CABAC and so the file size is smaller again.

Sometimes you'll come across a film with a lot of grain, those don't compress very well and it is hard to maintain the quality without bloating the file size. If you really want to keep the file size down then add some smoothing, or go average bitrate. Personally I live with the bloated file - if the director wanted grain, then I want grain, I don't want to smooth it out.

For Audio choose AC3 or DTS pass through (you may need the SVN version for DTS pass-through).

Cheers, Ed.

johnslayer
Posts: 18
Joined: Sun Oct 19, 2008 4:58 pm

Re: DVD to H264 at full quality with handbrake?

Post by johnslayer » Wed Jan 14, 2009 7:44 pm

So you are saying like treml, that since I am NOT using it on ATV and I will be using it on an HTPC that I should go with Film for movies, Tv shows=tv, and Anime=anime settings with AC-3 passthrough at 62%? Would you suggest Film or Constant Q for Movies? What are the main differences between the two? It looks like constant quality has deblocking and film has more B-Frames. What exactly would each do differently? I assume that each settings is geared towards that specific input type so I would want to use different settings for different source instead of using say, Film for everything?
Last edited by johnslayer on Wed Jan 14, 2009 7:54 pm, edited 1 time in total.

dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: DVD to H264 at full quality with handbrake?

Post by dynaflash » Wed Jan 14, 2009 7:47 pm

eddyg wrote:but myself and I believe dynaflash use 62% and are happy with the outcome regarding DVD quality transparency.
Yup, I have tried 63% but the curve goes up quite a bit after 62 for visual quality vs file size. Of course it varies from source to source. 62% is awfully nice though. I can personally see a pretty good difference between 59% and 62% tbh. I also use cabac though as ed mentions, it only decreases the file size per quality. It looks the same as with cabac off.

dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: DVD to H264 at full quality with handbrake?

Post by dynaflash » Wed Jan 14, 2009 7:49 pm

Oh, and if your looking for a one setting for all I suggest using Same as Source for framerate and in picture settings turn on Detelecine and Decomb and of course loose anamorphic, that should take care of 99% of your sources very well.

johnslayer
Posts: 18
Joined: Sun Oct 19, 2008 4:58 pm

Re: DVD to H264 at full quality with handbrake?

Post by johnslayer » Wed Jan 14, 2009 7:58 pm

Thanks Dynaflash,
You said you use Cabac? With which preset? Eddyg said it won't work on Appletv. I am not looking for one preset that will work for all types of content. I am looking for one preset each for three different types of content that will work 99% of the time. Hope that clarifies my jibberish. That being said what do you think of the setttings I mentioned above?

Also, I searched the SVN and didn't see DTS passthrough. That is pretty awesome, I have been waiting for that! If it really is in, I will definitely compile my own build. Cheers and thanks again!

dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: DVD to H264 at full quality with handbrake?

Post by dynaflash » Wed Jan 14, 2009 8:47 pm

johnslayer wrote:You said you use Cabac? With which preset? Eddyg said it won't work on Appletv.
So says ed ;)
johnslayer wrote:I am not looking for one preset that will work for all types of content. I am looking for one preset each for three different types of content that will work 99% of the time.
What I quoted above is what I personally (and in fact do) use. Is it optimal for all three ? Thats chasing a ghost imho. But its what I use if I don't want to futz with each source (which is most of the time). Is it a "Developer Endorsement" ? No. Its just what I use and has proven effective on both my atv as well as my laptop. That and $4.50 US will get you a cup of coffee ( if your lucky ).
Last edited by dynaflash on Wed Jan 14, 2009 8:48 pm, edited 1 time in total.
Reason: realized there are two "f"'s in coffee

BlackWolf
Posts: 14
Joined: Fri Jan 09, 2009 10:06 pm

Re: DVD to H264 at full quality with handbrake?

Post by BlackWolf » Wed Jan 14, 2009 8:55 pm

hi,
I wanted to create a new thread but I guess my post fits into this one really well:
Like a lot of people here I want to digitalize my dvd collection.
So, if I undestood it right, it's best to use the film preset and switch to CQ .62? Correct me if I'm wrong here.
I'm wondering about a few other things though:

1) Will it make any difference in quality if I change vom mkv to avi or mp4? I never used mkv and would rather use a more common format. I tested a lot the past few days and I think mp4 produces better results than avi, so I would like to go with mp4. Does it matter? I'm just gonna play those files on my pc anyways I guess, maybe re-code some of them for my iphone if I ever need some on there.

2) Should I use 2-pass? I read that some people don't recommend it, but it is checked for the film preset

3) When I undestood the tooltip of the "motion estimate range" correctly, it's always a good idea to turn that to 64, isn't it?

4) should I always check detelecine and decomb, or are there some sort of movies where this souldn't be checked?

5) Anything else to know if you mainly watch horror movies? They are dark most of the times, so it's especially important to me to have very good quality in those scenes. I especially hate the blocking you often get in darker scenes. so any tip on this would be awesome.

would be so nice if you could answer one or more of my questions so I can finally get to encoding :-)

thanks

johnslayer
Posts: 18
Joined: Sun Oct 19, 2008 4:58 pm

Re: DVD to H264 at full quality with handbrake?

Post by johnslayer » Wed Jan 14, 2009 9:25 pm

Ok, here is what I am going to try. I am going to use film with deblocking set to -2,-1 (borrowed from constant quality) at 62% Does that sound about right? For the TV and Anime I am going to use their respective presets and only change them to 62% Anyone see any flaws with this?

Edit: Didn't see Blackwolf's post


@Blackwolf

If you use 62% it will only be one pass. I am not sure about ME 64. I have never actually seen it that high and none of the other presets have anything other than 16. As for detelecine and deinterlace, they will ONLY be used if the film requires them to be. So, you can turn them on and leave them on all the time and if they are needed they will be put to use, if not, they will have no impact on your encode. Hope that helps.

dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: DVD to H264 at full quality with handbrake?

Post by dynaflash » Thu Jan 15, 2009 3:46 am

johnslayer wrote:As for detelecine and deinterlace, they will ONLY be used if the film requires them to be.
Negative, Deinterlace is used all of the time, Decomb will just affect those frames that need it. Do not deinterlace a progressive source unless you want to slow down your encode and lose quality.

... and no, both eddyg and I are saying to start with the appletv preset. But, the others should work too.

johnslayer
Posts: 18
Joined: Sun Oct 19, 2008 4:58 pm

Re: DVD to H264 at full quality with handbrake?

Post by johnslayer » Thu Jan 15, 2009 4:10 am

oops, yeah that is what I meant. Detelicine and Decomb. Sorry about that one :D

BlackWolf
Posts: 14
Joined: Fri Jan 09, 2009 10:06 pm

Re: DVD to H264 at full quality with handbrake?

Post by BlackWolf » Thu Jan 15, 2009 9:59 pm

I think something strange is going on: I encoded the same movie with a lot of different settings in handbrake over the last week, and no matter what I select, I always get the same results as long as I choose options that give me roughly the same filesize in the end. So as long as I'm going with around 60% CQ, or 1500MB target size or 1800kbps or something like that (so that my movie ends up with around 1500MB or more), the movie always looks the same. I even tried stuff like deblocking -6, -6 or reference frames 16 but it looks exactly the same as when I choose the standard values for these options. is this normal? is the movie simply as good as it will ever get? or is there something wrong with my setup? I also tried encoding on the mac -> same result. so I GUESS the movie is simply as good as it will get but I would like to hear from you guys. I thought at least deblocking -6, -6 would give me SOME difference compared to deblocking 0,0 but it didn't.

is this normal?

thanks

TheZa
Posts: 6
Joined: Tue Dec 09, 2008 5:57 pm

Re: DVD to H264 at full quality with handbrake?

Post by TheZa » Thu Jan 22, 2009 6:17 pm

Maybe this should be under the settings topic, but I'll post it here.

I'm using a Western Digital TV to view on a 32" LCD 720p (or 1080i). Sometimes I'll watch it on the iMac. I haven't noticed any decernable improvement over the Normal setting to MP4, anamorphic to loose, detelecline on, decomb to default. I've tried the Apple TV preset, I've tried constant quality at various percentages, I've tried bumping up the kbps as high as 2,500 (Normal default is 1,500) - no better to my eyes. And it all looks at least as good as the DVD (better even?). Maybe if you have a larger TV, but for me, I see no reason to use anything but the Normal setting, which creates an MP4 that is pretty versatile in what it played on.

i69
Posts: 4
Joined: Tue Dec 09, 2008 6:16 am

Re: DVD to H264 at full quality with handbrake?

Post by i69 » Sun Jan 25, 2009 1:14 am

Just wanted to chime in for another vote for using the AppleTV settings @ 62CQ. Using a recent high quality (DVD9) DVD source movie, I did screen captures in VLC, and then various CQ settings from the high 50s to the high 60s. I then compared them side by side to the original DVD screen capture. I could definitely see a subtle difference with 59CQ, but higher then 62CQ became extremely difficult to see any differences in the images compared to the original DVD screen capture. I then put it to the test switching between my DVD player and identical samples at various CQ settings. On a 42" plasma, I really can't tell the difference between the DVD and 62CQ on the ATV.

Zoolook
Posts: 12
Joined: Sun Jan 25, 2009 2:39 pm

Re: DVD to H264 at full quality with handbrake?

Post by Zoolook » Sun Jan 25, 2009 2:52 pm

I've been using Handbrake for a few years, but this is my first post.

I think the CQ is far too sensitive, with the only realistic range being between 55% and 65%, and there being quite a significant difference between, say, 60% and 63%.

I encoded the first season of Arrested Development at 59%, giving me 22 minute episodes at between 190mb and 210mb, more or less 1200 kbps to 1300kbps. The quality on a 36" 1080i TV is indistinguishable from the original DVD. In fact, the picture is slightly sharper as my DVD player doesn't have HDMI (I watch my encodes on Apple TV).

I also just encoded Downfall at 63% (the film is 2 hours 35 mins) and it created a 3.63GB file, with a bit rate of 3334kbps (853x478). The film is pretty grainy, with lots of dark scenes, and the encode does well. I am not so concerned about the file size, as the bit-rate, because Apple TV is supposed to limit 848x480 movies to 3,000kbps (although that doesn't seem to be a hard limit, as Downfall works fine).

I also encoded Season 1 of Battlestar Galactica @ 62%, and it creates 2600kbps files (I encoded the Pilot @ 2500, and there is no difference in quality).

My point is, that it would be good to have a greater range and a bit more control over the ceiling bit-rate here, and also to have a bit more meaning around the 'percentage', so that you never end up with larger files than the original. Being able to specify a constant quality, with a bit-rate ceiling, would be very useful if you want the maximum efficiency, but still be able to playback from an iPod.

dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: DVD to H264 at full quality with handbrake?

Post by dynaflash » Tue Jan 27, 2009 9:22 pm

Zoolook wrote:Being able to specify a constant quality, with a bit-rate ceiling, would be very useful if you want the maximum efficiency, but still be able to playback from an iPod.
google "VIdeo Buffer Verifier" or "VBV".

enigmakv
Posts: 1
Joined: Thu Jan 29, 2009 4:01 am

Re: DVD to H264 at full quality with handbrake?

Post by enigmakv » Thu Jan 29, 2009 4:28 am

This thread has a lot of good info, but I am left with many questions...

All Mac household.

When I pull HD shows off my Tivo, I use Toast 8 to convert them to .mov files with the same resolution and audio settings as the original and downconverted to 30fps if necessary. This results in a file that is about the same size as the original .tivo file. Then I use Quicktime to edit out commercials and re-save as a .mov file. This results in my "master" copy. I then use Handbrake to encode it to my heart's (and device's) content and only doing one H.264 encode in the process.

1. Is this a valid procedure or is it overkill?

2. How can I duplicate this "mastering" procedure with DVDs and Handbrake?

I don't like clutter, so my physical DVDs are all in storage. I have saved all my DVDs to a network hard drive. I can use Frontrow on the macs to browse and play the VIDEO-TS folders flawlessly. Unfortunately, I cannot find any way to play them on my 50" Plasma tv. I bought an AppleTV hoping to do just that, but it doesn't play VIDOEO-TS folders!!!

Since over time, my needs, equipment and preferences change it has been nice having the original ripped DVDs to go back and extract from.

3. I am looking for a setting in Handbrake that preserves the best possible copy of the DVD movie that I can use as a "master" instead of the VIDEO-TS folders. This master will be used occasionally to re-extract in various resolutions and formats depending on my needs and will replace the video-ts folders completely (in the same or less space).

4. If this "master" is compressed in H.264, what happens if I later come in to convert it to say Xbox format again with H.264 encoding? Can you perform H.264 on a file that has already had H.264 done to it? If so, does this affect final quality of the re-rip?

5. If the audio of the original is say 144kbps and Handbrake defaults to 160kbps, does this actually do anything to increase the quality?

I will probably have more questions as I ponder this thought process. Thanks for any info.

Post Reply