Académique Documents
Professionnel Documents
Culture Documents
com
Jishnu
mattgadient.com
Tech stuff, some fixes/solutions, and occasionally a passionate rant.
Home Hardware Encoding Webmaster OS Automotive Internet Riddles, Puzzles, Brain Teasers Miscellaneous
So Handbrake 0.9.9 has been out for a while now, and if youve looked through my previous multi-page guide that explained all the advanced settings in 0.9.6, Ive got some good news: Getting something that amounts to the best settings is a whole lot easier in v0.9.9. (yay!) The x264 presets are now in Handbrake, and 99% of the time, that should mean that you dont have to dabble in the x264 Advanced Options Panel. Though if you want/need to for whatever reason, the old rundown of Handbrake settings (0.9.6) guide should help explain all those options for you in great detail. Ill use some images this time around to help make things quick & easy. Well start at the more complicated part, and work backwards. But first -Encodes fast -High quality -Smallest file size possible Pick 2. The decisions you make during these sections will largely depend on which 2 you choose. Anyway, lets start at the highlighted area below.
Recent Comments
Jan on A best settings guide for Handbrake 0.9.9 Matt Gadient on Chevy Impala driver side power window not going up THE FIX DK on Chevy Impala driver side power window not going up THE FIX mal srdce on Jishnu a free WordPress theme based on Arjuna X Matt Gadient on A best settings guide for Handbrake 0.9.9 Jan on A best settings guide for Handbrake 0.9.9 Matt Gadient on Updating the Eyeglass Retailer Reviews retailers part 2 E. Hofmann on Updating the Eyeglass Retailer Reviews retailers part 2 Matt Gadient on Jishnu 1.0.8 released (bugfix) Gary on Jishnu 1.0.8 released (bugfix) Ron on A best settings guide for
Handbrake 0.9.9 Tweak on Civilization 5 From Archaemennid to Safavid achievement bug workaround multy7 on In-depth look at de-noising in Handbrake (with image/video examples) Doyle on How to replace bearings in the Whirlpool Duet WFW9200SQ02 washing machine david on A best settings guide for Handbrake 0.9.9
Recent Posts
In-depth look at de-noising in Handbrake (with image/video examples) Comparing x264 RF settings in Handbrake (examples) A best settings guide for Handbrake 0.9.9 Jishnu 1.0.8 released (bugfix) Replacing an oxygen sensor in a 1998 Honda Civic (how-to with pictures) Sony HDR-CX220 Handycam review not impressed with this camcorder 9 marbles and a weight balance which is the heaviest one? Updating the Eyeglass Retailer Reviews retailers part 2
First, a quick image to give you an idea as to what Constant Quality entails. (click for a larger image)
A best settings guide for Handbrake 0.9.9 - mattgadient.com targets a certain level of quality throughout your video(s). The advantage to Constant Quality is that your videos all tend to look consistent. The downside is that you dont know how large each video will be until the end. RF Sliding to the right (lower numbers) lead to better quality. Sliding to the left (higher numbers) result in lower quality, but lower filesizes too. If youve never used Constant Quality before, normally RF:20 is considered as a starting point for DVD encodes (and RF:22 for BluRay). Most people experiment to find an RF value that looks good enough to them at a file size they can handle, and use that RF value most of the time, deviating slightly when need be. RF examples Here are a couple screenshots taken at different RF settings (one at 20, and one at 30) to give you a very rough starting point (click for a larger view):
For a more in-depth look at RF values, check outComparing x264 RF settings in Handbrake (examples)for the full write-up. And an image to give you an idea as to what Average Bitrate entails (click for a larger image)
Average Bitrate Using this and a calculator, you can aim for a specific file size given a certain video length. Helpful if you wanted each of your movies to be exactly 700MB for example. Generally, use 2 pass encoding when using this option. Advantage to Average Bitrate is that you can effectively pre-determine your file size. The downside is that after you finish encoding, you might find out that the filesize you chose wasnt high enough, and your video looks like junk. Or maybe the file size was higher than it needed to be. kbps The higher this is, the larger the file will be (and thus, the higher the quality). Online bitrate calculators are the easiest way to do this.
A best settings guide for Handbrake 0.9.9 - mattgadient.com find values where the video looks good enough to you on the devices you play back from, at file sizes you find acceptable.
x264 Preset
As mentioned above, this has a different effect depending on whether you went with Constant Quality, or Average Bitrate. If you went with Constant Quality, your quality has already been decided. Changing this wont affect the quality any further (if you wanted higher quality, move the RF slider more to the right). Going with slower settings here will find ways to fit that quality into a lower file size. Going with faster settings will result in a larger file size. Either way, it should look the same. If you went with Average Bitrate, your file size has already been decided. Changing this wont affect the file size any further. Going with slower settings here will try to pack more quality into that file size youve chosen. Going with faster settings here will result in less quality. Details: This is where the time tradeoff comes into play. The veryslow preset is about the most hard-core anyone should typically get, and it can take a long time even on a quick machine. This is one of those areas where youll have to experiment on your machine and find something reasonable. Keep in mind that there are diminishing returns as you get slower. Compared to veryslow, the placebo setting takes forever and a day. At the very least, itll usually add a few hours, if not days, depending on your source and computer. Even worse, you might not even notice the visual difference (its called placebo for a reason). On the other hand, the difference between ultrafast and medium (skipping superfast, veryfast, faster, and fast) might only be a few minutes and will often give a quite noticeable difference. Finally, when on the quest for quality, keep in mind that days of encode time is no substitute for simply choosing a better Constant Quality or higher Average Bitrate. Slow settings will let you get more bang-for-your-buck, but its not going to work miracles. Sure, a 350MB TV show encoded at really slow settings will look better than the same 350MB TV show encoded at fast settings. But a 600MB encode of the same TV show will trounce both of them even if it was done at really fast settings.
x264 Tune
In general, these focus on shifting bits between detailed & flat areas, depending on the setting. To be honest, you dont have to really understand what they do other people have done the grunt work figuring them out, so theyre whittled down to pretty simple one size fits all settings. None This is like the old Handbrake presets. Nothing inherently wrong with it. Its something of a middle-road setting. Film For TV/Movies/Film and 3D animation (Pixar movies for example) Animation For 2D animation (Mikey Mouse, Simpsons, etc) Grain For very grainy movies/shows. For example, movies like 300 or Saving Private Ryan (the beach scene). Note that this tries to KEEP the grain, which uses a boatload of bitrate, and tends to result in higher file sizes when using Constant Quality (if youre using Avg Bitrate, make sure youre using a high bitrate, or overall quality will suffer.). Stillimage For still images (slideshow/pictures). PSNR/SSIM Generally for testing/comparative purposes. These stand for peak signal to noise ratio and structural similarity. x264 has some enhancements that improve the image as you would see it (robbing detail from places you wouldnt notice it anyway, and putting that detail where you would notice it). These settings disable those, so that the image is more technically correct so that a computer can compare the video with the source to see how accurate/identical it is. Zerolatency Meant for fast encoding with quick streaming. Short version: Film, Animation, and Grain are what you probably want to use most of the time (perhaps None as well). The others are for pretty edge cases that most people dont have to worry about.
A best settings guide for Handbrake 0.9.9 - mattgadient.com WD TV Play & TV Live : High Profile, Level 4.1 BluRay devices (those which will read from a USB hard drive for example) should normally support High/Level 4.1, but are often somewhat picky and have a tendency to complain about being too complex. I havent actually bothered to try determining the exact cause, but if you run into this issue, you can try entering bluray-compat=1 in the Additional Options window (note that your file size may increase somewhat). If that doesnt work, try Main profile or a lower level. Samsung & Nokia dont list profiles on their spec sheets for phones/tablets. Probably safe to assume at least Level 4.0 on their devices that record in 1080p. Roku, Boxee Box, Netgear NeoTV dont list profiles on their spec sheets for media streamers. Probably safe to assume at least Level 3.1 for 720p devices and Level 4.1 for 1080p. youll have to do your own digging for devices from other manufacturers. Short version here is that for devices which are a couple generations old, Main Profile, Level 3.0 is usually supported. Almost every current-generation device supports High Profile, Level 4.1. Thus, you probably dont want to exceed Level 4.1. If you go any higher, your video probably wont play, or will play-with-glitches on any current smartphones, tablets, etc. Note that some slower computers which lack hardware playback support may also struggle to smoothly play back videos encoded at very high levels. Enough with the complicated/hard stuff. Now the easier bits.
A best settings guide for Handbrake 0.9.9 - mattgadient.com Short version: Same as Source and Variable unless you have a solid reason for forcing something else.
SIZE Anamorphic Unless youre doing some manual resizing, youre usually best to use Strict. I cant think of a lot of reasons to use Loose unless youre resizing the video resolution (loose makes it fairly easy). Custom is beyond the scope of this writeup, but allows you to do a bit of manipulation, including changing the aspect ratio if you have a desire to smush/stretch things. Dont use None unless you know what youre doing. SIZE Cropping Use Automatic. That way, it wont waste space trying to save any black bars (your device will add black bars if necessary). On the other hand, if you want black bars manually saved as part of the video stream, feel free to set it to none and change the values to all 0 s. Hitting the Preview button is usually a good idea if youre trying to tweak here. Next, if you click the Filters button
FILTERS Detelecine Setting to Default is a good idea. If your source is telecined, itll detelecine automatically. If its not, it wont. Set-and-forget. FILTERS Decomb Setting to Default is a good idea here too. If your source is interlaced, itll automatically deinterlace it. If not, it wont. Just like the above. Set-and-forget. You normally dont want to use Deinterlace unless decomb is giving you problems or you have one of those oddball situations where you want to manually set it for some other reason. FILTERS Denoise Usually, keep this off. A couple exceptions: Turn it on if you have noise/grain in your source you want to get rid of. Turn it on if you want to reduce your filesize slightly (or improve overall quality) at the expense of softening your image some. Turn it on and use a CUSTOM value if youre trying to get rid of dancing dots. UPDATE: I put together a new denoise write-up with video and images if youre interested in de-noise settings. FILTERS Deblock Off. Its supposed to get rid of blockiness but in my experience it ends up blurring everything a crazy amount that makes the video hard to watch. On the plus side, it pretty much destroys noise/grain in the process.
A best settings guide for Handbrake 0.9.9 - mattgadient.com For Audio Settings , Subtitles, and Advanced Settings , nothings really changed so rather than re-write it all, I suggest reading the old writeup for version 0.9.6 if you need further details on those options. That about sums it up. As a quick note, Ive really generalized a fair bit especially when it comes to the Constant Quality vs Average Bitrate part. But hopefully this has given you enough of an understanding that youre comfortable using the new system.
Encoding
none
Comments (13)
#1 | Written by Anon about 2 months ago.
Leave a comment
Reply
So no more Advanced settings. Good. Can you explain one thing to me: Why is it that sometimes the encodes will go really fast but the next time they go really slow? I was ripping a cartoon DVD (using your settings) and one disc did roughly 1 minute per episode (5 minute episodes), but the next disc took roughly 10 minutes per episode. I dont get it.
#2 | Written by Matt Gadient about 2 months ago. Reply
Anon: To be honest, a 10x increase in encode time is fairly tough to explain for: Similar content (same series, etc), at Identical durations, at Identical resolutions (in other words, one wasnt a DVD and the other a BluRay), at Identical Handbrake settings Were you encoding directly from the DVD, or did you copy the DVD to the computer first (and encode from the ISO, MKV, etc)? If it was directly from the DVD, sometimes read issues or varied copy protection methods on certain discs can
A best settings guide for Handbrake 0.9.9 - mattgadient.com throw a wrench into things. A good practice is usually to rip the DVD to the computer first and encode it from there. Beyond that, if everything in the list above holds true, short of some other odd issue like a computer overheating and throttling, Im not sure. Episodes with a lot of fairly static scenes tend to go quicker (youll notice in movies that the end credits tend to encode rather quickly), but that wouldnt justify a 10x difference in overall encode time.
#3 | Written by Anon about 2 months ago. Reply
Thank you for your reply, Matt. - Similar content (same series, etc) Yes (for what its worth, Batfink cartoon DVD). - Identical durations Episodes are around 4:30. - Identical resolutions (in other words, one wasnt a DVD and the other a BluRay) They are all DVDs. - Identical Handbrake settings Yes. Although, do the settings reset when you continue the encoding process the next time? Because I had the episodes in queue, and then resumed where I had left off. I first made a copy of the discs to my HDD (DVDFab created VIDEO & AUDIO_TS folders). From there I selected the folder in Handbrake and encoded them episode per episode. I hope this helps.
#4 | Written by Matt Gadient about 2 months ago. Reply
Anon: Nothing sticks out that would explain it. As for the settings, they do generally persist correctly when bulk-adding in the MacGUI at least (with the exceptions of Audio , Subtitle, and items in Picture Settings). If you exit Handbrake, I believe the next time you open it, you have to reenter your settings again though for any new items you add to the queue old/existing ones in the queue should remember usually saving your settings to a profile helps make things a little quicker the next time you use it.
A best settings guide for Handbrake 0.9.9 - mattgadient.com You could try checking the log files to make sure the same x264 settings were applied. To do so, open up the Activity Window in Handbrake (from the menu bar), and right-click anywhere in that activity window and choose to open the log file directory. Youll see all the logs show up open up the ones for those 2 videos compare the section under encoder: H.264 (x264) (if you find the file hard to navigate, choose Edit/Find and type in H.264 to jump to the correct area). Alternately, since your stuff encoded pretty quickly, you could just try encoding those 2 again, but 1 at a time (verifying the settings for both) to see if theres any difference. If those settings were indeed the same, Im sure theres an explanation of some sort, but Im out of ideas (sorry!).
#5 | Written by Anon about 2 months ago.
Matt, I just checked the log files. It says H.264. Anyway, I was hoping TV episodes would go fast, too. Turns out it takes roughly 2 and a half hours to encode just one episode (doing this on my laptop) using your settings. Ugh. Thanks for the help anyway!
#6 | Written by Matt Gadient about 2 months ago.
Anon: The options listed just below the H.264 part in the log file are the ones I was referring to. For example, using the x264 presets, youd see something like veryslow. Using the advanced options, youd see something like ref=6:trellis=2:etc. If you get the situation where 1 episode encodes really fast and the next from the same series/disc goes really slow, making sure those settings were the same in the log files can help to rule that out. As for the 2.5 hour encodes, assuming youre using the x264 presets, just try bumping the slider to a faster setting until you get a time frame youre comfortable with. Note that before going off and encoding
A best settings guide for Handbrake 0.9.9 - mattgadient.com hundreds of videos, it can help to do a few test encodes on the same episode, using different presets. Compare the file sizes afterwards (if using Constant Quality) and see if the time tradeoff is worth it to you. If using Average Bitrate instead of Constant Quality, compare the quality of the videos afterwards, and again, weigh it against the time it took. Good luck.
Reply
Reply
Great Website Matt. I recently came back and checked out your other sections and articles-lots of great information. But I have to say your HB information is some of the best currently on the web. Excellent. For me, Id like to see a discussion about using handbrake for some of the Media Streamers on the market (WD Live, Popcorn Houreven some of the smart TVs). Also, how about some downloadable presets that can be further tweaked; for instance something for general MP4 archive or using a streaming box (there seem to be a lot of Apple/Mac stuff and YouTube uploading). Thanks for the website
Reply
Amazing content, thanks so much! Rare to find info this good or complete even in the official documentation!! It helped heaps and I learned a lot too. Cheers!
Reply
Finally. Someone who actually explains how some of these settings actually work. Ive been reading the wiki and only get half answers. Thanks so much for takin the time to write this up. Extremely helpful.
Re.: Video menu x264 Preset First of all I fully agree with the other comments GREAT website; easy to understand and very helpful. Im using Handbrake only to be able to tranfer my many Dvds to my newly bought Synology NAS. Im a normal user og Dvds enjoying films for what they are: entertainment. I not a DVD/film geek or nerd interested in the finer points and technical sides of transcoding a DVD. Still Im interested in the best possible quality and highest possible speed of trancoding. I understand thres a trade off. As far as I read your guide, I should be perfectly safe qualitywise using Handbrakes standard H.264 (x264) Video Codec, and should only use the settings under the Advanced menu if I for some reason should alter my status from an ordinary viewer of film to a geeek/nerd being very interested in the intricate and finer points of trancoding a DVD or is this an overstatement? One thing, though. Im slightly bewildered with regard to x264 preset under the Video menu. You write that if one uses Constant Quality, which I do, any setting under x264 preset wont make a bit of difference qualitywise. Quality depends on the RF setting. However, you then continue to elaborate on the differences between ultra fast, medium and placebo settings without having stated whether these diffences only apply to the Avg. Bitrate setting, to the Constant Quality setting or to both settings. Likewise I not quiet sure whether your description of Details apply only to Avg. Bitrate setting, to the Constant Quality setting or to both settings. If I choose x264 Preset, which I do, why not use Ultrafast rather than f.ex. Very Slow and get the same output quality? Slower x264 preset like medium gives me a larger output file than when I use very fast? Why should I choose a transcoding that is slower and at the same time gives me a larger MP4 file? .or am I completely missing your point? Thanks in advance Jan
Jan, As to the presets vs advanced settings panel, its mainly a matter of the presets doing a great job of getting you the most bang-for-your-buck. The x264 devs put them together theyre quite good when it comes to bumping up the important stuff as the slider moves along. Being as easy as shifting a slider to swap between these settings is an added bonus. The way you stated it is fairly accurate too. There are a few situations where using the Advanced settings to fine tune something can make sense, but most of them are edge cases or used by people who are looking for something very specific. On to the speed settings (ultrafast, medium, placebo, etc), they affect both avg bitrate (slower settings tend to increase quality) and CQ (slower settings tend to reduce file size). As to the question of why you wouldnt use ultrafast instead of very slow, if using CQ, the output quality would certainly be similar, but the file size using ultrafast would usually be a lot larger. Hope some of that helps.
Reply
Many thanks for your answer. Most helpful. Im not only transcoding my Dvds to be able to play the films on my PC or iPad. I have also bought a Synology NAS server which through WLAN is linked to my state-of-the-art Loewe TV (a german brand which f.ex can play both the MP4 and MKV formats). When trancoding my Dvds Im using the following Handbrake settings based on your excellent guide: Format: MP4 Picture: Anamorrphic is set to Strict. Cropping is set to Automatic. Display size is by default: 1024 x 576. Rest is unaltered. Filters: Default; Default; Off; Off and grayscale is also Off Video: H.264 (x264) and not the advance menu Variable Framerate Constant Quality 19 x264 preset at Medium H.264 Profile: High H.264 Level: 4.1 Subtitles: Burned In Danish subtitles Chapters: Ive checked the create chapter markers checkbox.
A best settings guide for Handbrake 0.9.9 - mattgadient.com It seems to do the trick!
Leave a Comment
Your email address will not be published.
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Subscribe to comments
Leave Comment
<< Jishnu 1.0.8 released (bugfix) Comparing x264 "RF" settings in Handbrake (examples) >>