CRF tab (constant rate factor on x264, x265 and libvpx) (2023)

What is the constant interest factor?

The Constant Rate Factor (CRF) is the default setting for quality (and rate control) for thex264mix265Encoder and is also available forlibvpx. For x264 and x265, you can set values ​​between 0 and 51, where lower values ​​would result in better quality at the expense of larger file sizes. Higher values ​​mean more compression, but eventually you will notice a drop in quality.

For x264, reasonable values ​​are between 18 and 28. The default value is 23, so you can use that as a starting point.

Come onffmpeg, would be like this:

ffmpeg -i entrada.mp4 -c:v libx264 -crf 23 salida.mp4

For x265, the default CRF is 28:

ffmpeg -i entrada.mp4 -c:v libx265 -crf 28 salida.mp4
(Video) D202: How To: Fine-Tuning Your Adaptive Encoding Groups With Objective Quality Metrics

There is no default value for libvpx and the CRF can be between 0 and 63. 31 is recommended for 1080p HD videos:

If you are not sure which CRF to use, start with the default and change it according to your subjective impression of the output. Is the quality good enough? NO? Then set a lower CRF. Is the file size too big? Choose a higher CRF. A change of ±6 should result in about half or double the file size, although results may vary.

You should mainly use CRF encoding for offline file storage to get the most optimal encodings. For other applications,other speed control modesare recommended When streaming video, for example, CRF can be used in a constrained/restricted mode to avoid bitrate spikes.

CRF tab (constant rate factor on x264, x265 and libvpx) (1)

What bitrates do I get?

To provide an estimate of the expected bitrates for clips with different resolutions, here is a figure showing the average bitrate in Mbps for four one-minute video clips of different encoding complexity, encoded with x264 and different CRF values:

CRF tab (constant rate factor on x264, x265 and libvpx) (2)

(Video) What is Bit Rate? Video Quality and File Size? Explained

As you can see, the maximum rate can vary between 10 and 25 Mbps for 2160p encoding at CRF 23. For other CRFs and resolutions, the rates will vary accordingly. You can clearly see the logarithmic relationship between CRF and bitrate.

CRF versus constant QP

CRF is a "constant quality" coding mode, as opposed to constant bit rate (CBR). Normally you would get consistent quality by compressing each image of the same type by the same amount, i.e. discarding the same (relative) amount of information. In technological terminology, it keeps a QP (quantization parameter) constant. The quantization parameter defines how much information to discard from a given block of pixels (a macroblock). This usually results in an extremely variable bitrate throughout the stream.

Constant Rate Factor is a bit more sophisticated. It compresses different frames by different amounts, thus varying the QP as needed to maintain a specific level ofI got itQuality. This is done taking movement into account. A constant QP encoding at QP=18 remains independent of the frame at QP=18 (there is a small offset for different frame types, but here it is negligible). For example, the constant speed factor at CRF = 18 increases the QP to 20 for highly moving frames (more compressed) and reduces it to 16 for less moving parts of the sequence. Basically this will change the bitrate allocation over time.

For example, here is a figure (from another post of mine) showing how the bitrate changes for two video clips encoded at different levels (17, 23) with constant QP or CRF:

CRF tab (constant rate factor on x264, x265 and libvpx) (3)

The CRF line is always lower than the CQP line; This means that the encoder can save bits while maintaining perceptual quality, while CQP wastes quite a bit of memory. This effect is quite pronounced in the first music video, for example.

Why is exercise so important?

The human eye perceives more detail in stationary objects than in moving objects. Because of this, a video encoder can apply more compression (remove more detail) when things are moving and apply less compression (retain more detail) when things are still.

Simply put, this is because your visual system becomes "distracted" by everything that's going on and you don't have the image on screen long enough to see the increased compression. Slightly more technically speaking, high motion "masks" the presence of compression artifacts such as crashes. On the other hand, if a frame doesn't have much movement, you have (just) more time to look at the image and there's nothing to distract you or mask artifacts, so you want the frame to be as uncompressed as possible . With little movement, compression artifacts become more obvious (visually recognizable) and therefore more distracting.

(Video) Christian Feldmann - The Hypothetical Reference Decoder. Or: vbv-bitrate is not bitrate

You might be wondering if consistent QP isn't actually better quality in the end. No, the perceived quality is the same, but you're essentially wasting space by squeezing less into areas you won't really notice.

In practice, many people always use CRF for one-pass encryption, arguing that there is no reason to use CQP. Another good argument for using CRF is that it is the default rate control mode chosen by x264 and x265 developers.

What about video quality metrics?

If you only had simple ways to compare the quality of video streams (e.g. based on a per-frame signal-to-noise ratio, PSNR) measurement, you could look at a CRF encoding and say that they were of lower quality is. Quality than the CQP variant. But if you're human, subjectively, the CRF copy looks the same or better than the CQP version. Compress the parts where you see more detail less and the parts where you see less detail more. This means that while the objectively measured average quality of the PSNR decreases slightly, theperceptiblethe video quality increases.

This is also another argument against using simple metrics such asPSNRÖSSIMto assess the quality of the video: they cannot take into account perceptual effects such as movement because they only look at individual frames. More perception-based metrics, such asVQMÖVMAFare better options for assessing video degradation.

How are quality and bitrate related?

Not all video clips are "easy" to compress. Smooth gradients with little motion compress easily, while high motion and high spatial detail require more than one encoder. When I say "easy" or "difficult" I mean that an easy font has a better perceived quality than a hard-to-code font at the same bit rate.

CRF fixes this problem: For different videos, different CRF levels result in different bitrates. (In fact, you can't reliably estimate the resulting bitrate for any given CRF unless you know more about that source, vizwhat is youtube doing.)

For example, if you set CRF 23, you might get 1500 kbps for one source but only 1000 kbps for the other. They should look qualitatively the same. With CRF you're saying, "Use whatever bitrate you need to get the most detail". It's not a 1 to 1 thing.

Bitmovin's cloud encryption servicealso uses CRFto estimate the complexity of a clip before encoding.

(Video) HOW TO: Evaluating Your H.264 Encoder

Note that if your CRF is too high, for example if you use a CRF of 30, you will see a block on the high drive because the bitrate is just too low in those parts. The encoder uses a QP of (for example) 32 for the most complex parts, which is a very strong quantizer. As mentioned at the beginning, select the CRF based on the desired quality level.

Why are you still watching Blocky stuff on TV or cable?

Why are cable or satellite broadcasts blocked? Or even online video streams? The problem is that they use a very low bitrate for some parts of the video. In streaming in particular, the stream is at a constant bit rate that does not allow variations to adapt to the level of motion. So these TV streams get blocked because the complex things they show require more bits than the broadcaster provides. They just say "keep as much detail as possible, never exceed that high bitrate no matter how messy things get".

Nowadays, streaming is being made a little smarter. YouTube or Netflix use 2 or even 3 pass algorithms, in the latter a CRF encoding for a given source determines the best bitrate to encode your stream in 2 passes. You can ensure that a sufficient bit rate is reserved for complex scenes without exceeding your bandwidth.

CanLearn more about frequency control modesin another post of mine.

Portions of this guide were originally copied from the Handbrake wiki. However, the content there has been removed. It also appeared briefly on Wikipedia, but was removed because it relied on only one source: Handbrake Wiki. This is an attempt to salvage the information and add something here and there. I don't know if the content has an original copyright or not. If so, please let me know.


  • April 2019 - Please add a picture in the expected rates.
  • March 2018 - Minor updates and clarifications.
  • Apr 2017 - Added image from another article to clarify concept.
  • February 2017 - I rewrote this article in light of some recent developments. I also tried to make it more snappy.


What is the CRF scale for x264? ›

The Constant Rate Factor (CRF) is the default quality setting for the x264 encoder. You can set the values between 0 and 51, where lower values would result in better quality (at the expense of higher file sizes). Sane values are between 18 and 28. The default for x264 is 23, so you can use this as a starting point.

What is the CRF range for h265? ›

In H. 264 and H. 265, CRF ranges from 0 to 51 (like the QP). 23 is a good default for x264, and 28 is the default for x265.

What is CRF constant rate factor? ›

Constant rate factor (CRF) is an encoding mode that adjusts the file data rate up or down to achieve a selected quality level rather than a specific data rate. CRF values range from 0 to 51, with lower numbers delivering higher quality scores. Multiple codecs support CRF, including x264, x265, and VP9.

What does CRF mean for bitrate? ›

Constant Rate Factor (CRF) Encoding

With CBR and VBR you choose a target bitrate and the encoder adjusts quality to meet that bitrate.

What CRF value should I use? ›

Choose a CRF value

The range of the CRF scale is 0–51, where 0 is lossless (for 8 bit only, for 10 bit use -qp 0), 23 is the default, and 51 is worst quality possible. A lower value generally leads to higher quality, and a subjectively sane range is 17–28.

Should CRF be high or low? ›

Choose a higher CRF. A change of ±6 should result in about half/double the file size, although your results might vary. You should use CRF encoding primarly for offline file storage, in order to achieve the most optimal encodes.

What is the default CRF for h265 ffmpeg? ›

The default is 28, and it should visually correspond to libx264 video at CRF 23, but result in about half the file size. CRF works just like in x264, so choose the highest value that provides an acceptable quality.

What's the difference between a CRF250R and a CRF 250 Rx? ›

The off-road competition-focused CRF250RX shares all of the same technical changes as the CRF250R but boasts dedicated suspension settings for improved compliance, model-specific ECU mapping, a 2.1-gallon resin fuel tank, 18-inch rear wheel, plastic hand guards, and an aluminum kickstand.

Which is better H 265 or H 265? ›

In a nutshell, H. 265+ can save approximate 50% bitrate than H. 265, which means it can lower bandwidth and storage consumption further.

What is CRF in video encoding? ›

The Constant Rate Factor or CRF is an option available in the libx264 encoder to set our desired output quality. It enables us to specify a target value that maps to a specific quality by adjusting the bitrates automatically based on the input video.

What does CRF mean in OBS? ›

CRF – constant rate factor, ensures constant quality, 15 – 25, 23 default (Recommended for recording) CBR – constant bitrate, good for streaming (twitch), however, waste of bandwidth. ABR – average bitrate, quick and dirty encodes, not the best quality. VBR – variable bitrate.

What is RF constant quality? ›

Constant quality RF value ranges from 51 to 0. The lower the RF value, the higher the quality. RF 51 means fast encoding while extremely low quality. RF 0 means badly slow encoding while lossless compression.

What should I set CRF to OBS? ›

Similar to how CQP gives you a range of 0 to 30, with the lower numbers being better quality, CRF ranges from 0 to 51, with around 17 to 24 being considered 'good quality'.

Which bitrate mode is best? ›

Bit Rate Mode
  • Insane: The best possible encoding quality. This preset has a constant bit rate of 320 kbps, which is equivalent to 2.4 MB per minute. ...
  • Extreme: Extremely high quality. ...
  • Standard: Very good quality encoding.
  • Medium: Good sound quality suitable for casual listening or portable devices.
Dec 27, 2022

Should I use constant bitrate or? ›

CBR is preferred in many streaming situations because it has been the standard in online video streaming for some time. Since it is so popular in the live streaming industry, constant bitrate is the most compatible option.

Which is better 1080p x265 or x264? ›

Here's a snapshot: x265 and libvpx demonstrate superior compression performance compared to x264, with bitrate savings reaching up to 50% especially at the higher resolutions. x265 outperforms libvpx for almost all resolutions and quality metrics, but the performance gap narrows (or even reverses) at 1080p.

Is x265 constant quality? ›

Constant Quality is a kind of x264 and x265 encoding mode to adjust the rate up and down to achieve the visual quality level rather than the specific data rate.

Should I use CRF or CBR for recording? ›

You should never use CBR for local recordings. CQP/CRF is the way to go, even if it means the output files may be rather large, they'll be a good quality capture.

What is x264 constant quality mode? ›

Constant Quality is a kind of x264 and x265 encoding mode to adjust the rate up and down to achieve the visual quality level rather than the specific data rate.

Is CRF a diagnosis? ›

Chronic renal failure is diagnosed by the observation of a combination of symptoms, physical examination and elevated blood urea nitrogen (BUN) and creatinine (Cr) levels that are persistently present over at least 3 months.

What is the constant quantizer for h264? ›

H. 264 uses a quantizer scale between 0 and 52. The default quantizer value is 26. If you are targeting for a certain level of quality and don't care much about the final file size, then you might consider using the QP mode.

Which format is better 264 or 265? ›

265 is newer and more advanced than H. 264 in several ways. H. 265 (also called HEVC, or High Efficiency Video Coding) allows for further reduced file size, and therefore reduced required bandwidth, of your live video streams.

Which is better for editing H264 or H265? ›

265 is better for video editing, as it has more efficient data compression. In other words, you can more significantly reduce the file size for import and export.

Which H264 profile should I use? ›

High Profile

H. 264 High Profile is the most efficient and powerful profile in the H. 264 family, and is the primary profile for broadcast and disc storage, particularly for HDTV and Bluray disc storage formats.

Is CRF 250 discontinued? ›

In 2021 it was replaced by Honda CRF300L. The engine was replaced to be compliant with EURO 5 emissions standard.

How much HP does a CRF 250 make? ›

With 37.6 hp and 18.1 pound-feet of torque, as measured on our in-house dyno, the '22 CRF250R produces 1.4 hp less at peak and 0.7 pound-feet of torque less at peak than the '21 model. However, the new-generation bike's engine is better on the track, which, at the end of the day, is what matters most.

Are Honda CRF 250 reliable? ›

The Honda CRF250 Rally is reliable, easy to maintain and service, has decent off-road ability and comes in at an affordable price. It's heavy for its power delivery and on-road ability is limited.

Why is h265 not popular? ›

265 was hindering the adoption and as a result primary browsers have no support at all (e.g. Chrome, Firefox) or only partial support (Edge). Due to this, many content providers have stuck with h. 264 because at least they know it will always play.

What is the best bitrate for 4K h265? ›

According to the folks at Boxcast, broadcasting 4K in AVC requires a bandwidth of 32 Mbps. Broadcasting the same 4K in HEVC requires 15 Mbps.

Is h265 more CPU intensive? ›

H. 265 is assumed to be more CPU intensive than H. 264 with better compression results. Its main “competitor” in WebRTC is VP9.

What video encoding should I use? ›

Today, the most common and best video codec is H. 264. Just about every device in existence supports this protocol and it's common for use with online video. However, there are several other codecs available, including MPEG-2, HEVC, VP9, Quicktime, and WMV.

What is the optimal bitrate for h264? ›

For 4K @ 30fps h. 264, the recommended target average bitrate is ~45 Mbps, and for HEVC, it is ~22.5 Mbps.

What preset for x264 encoder? ›

If you are using x264 Encoder:

Keyframe Interval: 2. CPU Usage Preset: For games with high movement (FPS, Sports games, etc.), choose Fast to VeryFast. For games that are slower or with minimal movement (Card games, etc.), choose Medium.

What encoder preset should I use? ›

Change the encoder preset

By default, OBS uses the best open-source video encoding library – x264. It has several presets that set the CPU usage and the video quality of your output to optimally balance between these two. The default preset is called “veryfast” and, in most cases, it does provide the best balance.

What is the best bitrate for streaming OBS? ›

However, you should up your audio bitrate settings to 192-320 kbps for better audio quality. We recommend downloading OBS Lua, which is an OBS-specific bitrate calculator. That'll help you find the best OBS settings for your streaming needs.

What recording format should I use OBS? ›

Some of the most popular recording formats include FLV, MP4, and MKV. Ultimately, it's up to you to decide which format works best for you. Just ensure that you choose a format compatible with your obs software. Otherwise, you may run into trouble when trying to playback your recordings.

What quality Rf values should I use for x264? ›

x264 Recommended Quality RF Values

(Min: 625MB/h Max:1,503MB/hr) High Definition (e.g Blurays 720/1080) Use an RF value of 22 +/- 1 Since HD sources are typically quality, you can get away with a slightly higher RF value than SD content without any perceived difference in quality.

What happens if Rf value is high? ›

The stronger a compound is bound to the adsorbent , the slower it moves up the TLC plate. Non-polar compounds move up the plate most rapidly (higher Rf value), whereas polar substances travel up the TLC plate slowly or not at all (lower Rf value).

What causes a high Rf value? ›

A higher level of rheumatoid factor in your blood is closely associated with autoimmune disease, particularly rheumatoid arthritis. But a number of other diseases and conditions can raise rheumatoid factor levels, including: Cancer. Chronic infections.

What is the best bitrate for 1080p 60fps? ›

What's the best video bitrate for 1080p broadcasts? For 1080p videos, the ideal bitrate ranges from 3,500 to 6,000 Kbps. If you're using a standard frame rate (30fps), aim for the lower end of the range, between 3,500 and 5,000 Kbps. If you have a high frame rate (60fps), aim for a bitrate of 4,500 to 6,000 Kbps.

What should I set process priority to OBS? ›

If you must run additional programs while you are using OBS, you should increase the Process Priority option in OBS to Above Normal or High. In the Advanced settings section, you can set process priority in OBS to take priority over other applications in use on your computer.

How do I enable CFR on OBS? ›

New Member

go to OBS settings >> output >> recording >> advanced >> and add 'force-cfr=1' to the custom muxer.

What bitrate do most streamers use? ›

Recommended bitrate range of 3,000 to 6,000 Kbps for video. Recommended audio bitrate is up to 128 Kbps. Maximum resolution is 1080p, with 60 frames reproduced per second.

Does increasing bitrate improve quality? ›

As one might expect, a higher bitrate improves the quality of a video. Higher bitrate correlates with higher image quality, while lower bitrate results in a lower quality. Twitch streamers want to strive for a higher bitrate, as it means that their stream's video quality will be better.

What bitrate for 4K streaming? ›

For 4K HDR (High Dynamic Range), this can be between 44-56 Mbps for frame rates between 24-30fps and 66-85 Mbps for frame rates between 48-60fps. Now that will be how your maximum bitrate turns out, your target bitrate for a 4K video should be set to up to 90% of the maximum bitrate.

What is the difference between constant rate factor and average bitrate? ›

With the average bitrate, you control the size of the output file but give up control over the video's quality. Constant quality mode does the opposite; you specify a quality level and HandBrake adjusts the bitrate (that is, the size) to meet it.

Does reducing bitrate reduce quality? ›

Lower bit rates can mean lower quality, but smaller file sizes per second of video. The upshot is that you can have the same video in a smaller file size, but the quality won't be as high.

What are the presets for x264? ›

x264 has several CPU presets, in increasing order from low CPU usage to high CPU usage: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo.

What is a good bitrate for x264? ›

1. OVP-Specific Setting Requirements
VIDEO CODECH.264 (x264 may work)
4 more rows
Dec 13, 2022

What is the best rate control method for OBS? ›

Make sure the rate control is set to CBR. As for the bitrate, the optimal value depends on your upload speed and hardware. If you want to stream in 1080p 60 FPS on Twitch, set the bitrate to 6000 Kbps. In case of lower resolutions and frames per second, the Twitch guideline recommends a bitrate of around 4500 Kbps.

How do I optimize OBS x264? ›

If you are using x264 Encoder:
  1. Rate Control: CBR.
  2. Bitrate: Max 6,500 Kbps if you are a non-partnered Twitch streamer. ...
  3. Keyframe Interval: 2.
  4. CPU Usage Preset: For games with high movement (FPS, Sports games, etc.), choose Fast to VeryFast. ...
  5. Profile: High.
  6. Tune: None.
Feb 18, 2021

What is the best encoder preset? ›

Change the encoder preset

By default, OBS uses the best open-source video encoding library – x264. It has several presets that set the CPU usage and the video quality of your output to optimally balance between these two. The default preset is called “veryfast” and, in most cases, it does provide the best balance.

Which is better x264 or h265? ›

265 is newer and more advanced than H. 264 in several ways. H. 265 (also called HEVC, or High Efficiency Video Coding) allows for further reduced file size, and therefore reduced required bandwidth, of your live video streams.

What is the best CPU preset? ›

The video encoder, x264, has a number of "presets" that will change your video quality and CPU usage accordingly. The OBS default is veryfast, which for the majority of cases is the best balance between CPU usage and video quality.

What is a good bitrate for 1080p h265? ›

Technical warning: Good quality 1080P video occurs when you take a series of 1080P photos and convert them into a video at a compression rate of no lower than 5Mbps in bitrate (when encoded by H. 264) or 2.5Mbps (at H. 265).

What happens if bitrate is too high? ›

What happens if my bitrate is too high? High bitrate means higher quality video, but it also means your video file will be much larger. The larger the file, the more likely it is that your viewers may experience buffering issues.

What bitrate should I use for h265? ›

The recommended bitrate for H. 265 is 2500 kbps for 480p videos, 5000 kbps for 720p videos, and 8000 kbps for 1080p videos.

What is CRF video quality? ›

CRF is a bitrate-control setting, and sets a constant ratefactor. This is closely related to constant quantizer encoding, though CRF mode generally achieves better compression than constant Q encoding by reducing the quantizer quality on "less important" frames.


1. TUE3. How to Fine-Tune Your Encoding with Objective Quality Metrics
(Streaming Media)
2. How Fast is H.265/HEVC Software Encoding on ARM CPUs (iPhone/Android) With FFmpeg?
3. HOW TO: Producing and Distributing HEVC
(Streaming Media)
4. Best OBS Recording Settings
(Kevin Stratvert)
5. How to Shrink a Bluray Rip while Preserving the Quality using Handbrake
(RDs RC Reviews)
6. D102: How To: H.265: Living Up to the Hype as the Successor to H.264
(Streaming Media)


Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated: 27/06/2023

Views: 6135

Rating: 4.7 / 5 (77 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.