Comparing x264 “RF” settings in Handbrake (examples)

Here, I’m taking a look at various RF settings in Handbrake, both in terms of visuals and filesize.


I started with encodes from the “24” DVD (Season 6, Episode 1). If you have the same DVD and are looking to reproduce this test, the following settings were used:

  • x264 Preset: very slow
  • x264 Tune: none
  • x264 Profile: high
  • x264 Level: 4.1
  • Strict Anamorphic
  • Defaults for everything else (Handbrake 0.9.9 on OSX)

I tested the following RF values (listed in Handbrake under “Constant Quality”:
0, 10, 18, 20, 22, 24, 26, 28, 30, 32



I’ll start with a few screenshots at different RF values. There’s a video below too, but it comes with a bit of a caveat so might not show everything well for you. Pictures should work for nearly everyone. Note that the first one (RF0) is for reference (lossless).

x264 Handbrake encode at RF 0
x264 Handbrake encode at RF 10
x264 Handbrake encode at RF 18
x264 Handbrake encode at RF 20
x264 Handbrake encode at RF 22
x264 Handbrake encode at RF 24
x264 Handbrake encode at RF 26
x264 Handbrake encode at RF 28
x264 Handbrake encode at RF 30
x264 Handbrake encode at RF 32

(click for larger images)


Worth noting that x264’s psychovisual enhancements (trellis, etc) do a pretty good job of keeping detail where you’d notice it (the face), at the expense of the stuff you normally wouldn’t notice while watching (like those background areas). Of course, this only goes so far – once the RF value is high enough, there’s no saving Jack’s facial features from the effects of compression!

For those interested, I’ve also got another page on this site that lets you compare x264 vs x265 vs VP8 vs VP9 (at various RF and bitrate settings).

A static image isn’t always great, so here’s the 35-second video showcasing the difference between these RF settings in “24”. Note that you must click the appropriate buttons to watch this at full-screen 1080p if you want to see the differences somewhat clearly:

Note that YouTube re-compresses videos – I kept it at full-quality as long as I could, but I suspect YouTube won’t be fine with serving up a 360MB video that only lasts 35 seconds, so we’re at the mercy of their encoder.



Now that you hopefully have an idea as to how each of the videos look, let’s see what each weighed in at for the full 43m8s episode. Note that these sizes ONLY apply to this episode of this source :


RF:0 – 6127.2MB (yes, 6.1GB)
RF:10 – 1925.2MB (yes, 1.9GB)
RF:18 – 355.6MB
RF:20 – 254.6MB
RF:22 – 197.3MB
RF:24 – 160.4MB
RF:26 – 136.1MB
RF:28 – 119.6MB
RF:30 – 107.5MB
RF:32 – 98.3MB





A few things you probably observed when comparing to RF:0 (the lossless version):

  • RF10 looks almost identical to RF0 in the images, but still results in a massive file size – quite possibly similar to the size of your source. At that point, you’re probably better off keeping your original source rather than trying to recode it.
  • RF18-20 are incredibly close in the images, and it’s pretty hard to tell the difference when it comes to watching the video. The reductions in file size here tend to be substantial though, almost 100MB smaller (28% savings) by going from RF18 to RF20.
  • RF22-24 is about the point where visual differences are starting to become noticeable, but typically not to the point where they’d stand out when you’re actually watching. You save under 40MB (19%) by dropping from RF22 to RF24 here.
  • RF26-32 is where noticeable degradation comes about. It’s a matter of how much you can tolerate at this point. You really start to lose a lot of quality for each bit of filesize you try saving. Dropping the RF value by 2 saves under 20MB (9-12%), and the video is noticeably worse.

All that said, be sure to draw your own conclusions. And if you’re new to encoding with Handbrake, hopefully this has helped you to get a better understanding of the Constant Quality setting and the effects of various RF values.