What is the constant rate factor?
Constant Rate Factor (CRF) is the default setting for quality (and rate control) for thex264mix265encoder, and it 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 you will eventually notice a reduction in quality.
For x264, reasonable values are between 18 and 28. The default is 23, so you can use that as a starting point.
ffmpeg, 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
There is no default value for libvpx and the CRF can be between 0 and 63. 31 is recommended for 1080p HD video:
ffmpeg -i entrada.mp4 -c:v libvpx-vp9 -crf 31 -b:v 0 salida.mkv
If you're 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 half or double the file size, although results will vary.
Mostly you should use CRF encoding for offline file storage to get the most optimal encodings. For other applications,other speed control modesare recommended. For example, in streaming video, CRF can be used in a restricted/limited mode to avoid bitrate spikes.
What bit rates do I get?
To provide an estimate of the expected bitrates for clips at different resolutions, here is a figure showing the average bitrate in Mbit/s for four one-minute video clips of different encoding complexities, encoded with x264 and different CRF values:
As you can see, the maximum rate can be between 10 and 25 Mbps for 2160p encoding at CRF 23. For other CRFs and resolutions, rates 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 frame of the same type by the same amount, i.e. discarding the same (relative) amount of information. In technical terminology, it keeps a QP (quantization parameter) constant. The quantization parameter defines how much information is discarded from a given block of pixels (a macroblock). This often results in a highly variable bitrate throughout the stream.
Constant Rate Factor is a bit more sophisticated. Compresses different frames by different amounts, thus varying PQ as needed to maintain a specific level ofI have itQuality. This is done taking into account the movements. 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 velocity factor at CRF = 18 increases the QP to 20 for frames with a lot of movement (more compressed) and reduces it to 16 for parts of the sequence with little movement. This will significantly 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:
The CRF line is always lower than the CQP line; This means that the encoder can clip bits while preserving perceptual quality, whereas with CQP a lot of space is wasted. 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.
In simple terms, this is because your visual system is "distracted" by everything that's going on and the image doesn't stay on the screen long enough to see the compression increase. Technically, high movement "masks" the presence of compression artifacts such as blocking. On the other hand, if a frame doesn't have a lot of movement, you have (simply) more time to look at the image and there's nothing to distract you or mask artifacts, so you want the frame to be compressed as little as possible. possible. With little movement, compression artifacts become more noticeable (visibly visible) and therefore more distracting.
You may be wondering if consistent QP isn't really a better quality in the end. No, the perceived quality is the same, but you essentially waste 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 have simple ways to compare the quality of video streams (for example, based on a measurement of signal-to-noise ratio per frame, PSNR), you can look at a CRF encoding and say it's lower quality than the variant CQP. . But if you're human, subjectively the CRF copy looks the same or better than the CQP version. The parts where you see more detail are compressed less, and the parts where you see less detail are compressed more. This means that while the average quality, objectively measured by the PSNR, will decrease slightly, theperceptiblethe video quality increases.
This is also another argument against using simple metrics likePSNRoSSIMto assess video quality: they cannot take into account perceptual effects, such as motion, as they only look at individual frames. More perception-based metrics, such asVQMoVMAFthey are the best option for evaluating video degradation.
How are quality and bitrate related?
Not all video clips are equally "easy" to compress. Light motion and smooth color gradients can be easily compressed, while strong motion and many spatial details require more than one encoder. When I say "easy" or "difficult" I mean that an easy font has better perceived quality at the same bit rate as a hard-to-encode font.
CRF fixes this problem: For different videos, different CRF levels result in different bitrates. (Actually, you can't reliably estimate the resulting bitrate for a given CRF unless you know more about that source, viz.what does youtube do.)
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 the same in terms of quality. With CRF, you're saying, "Use whatever bitrate you need to get the most detail."
Bitmovin Cloud Encryption Servicealso uses CRFto estimate the complexity of a clip before encoding it.
Note that if your CRF is too high, for example if you use a CRF of 30, you will see a high motion block because the bitrate in those parts is too low. The encoder uses a QP of (for example) 32 for the most complex parts, which is a very heavy quantizer. As mentioned at the beginning, choose the CRF based on the level of quality you want.
Why do you keep watching uncomfortable things 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. Especially in broadcasts, streaming is carried out at a constant bitrate that does not allow variations to adapt to the level of movement. So these TV shows get blocked because the complex things they show require more bits than the broadcaster has made available to them. They simply say, "Retain as much detail as possible without exceeding the high bitrate, no matter how complicated things get."
These days, streaming is done a little smarter. YouTube or Netflix use 2 or even 3 step algorithms; in the latter case, a CRF encoding for a given source determines the best bit rate for 2-pass encoding of its stream. You can ensure that you reserve enough bitrate for complex scenes without exceeding your bandwidth.
CanLearn more about frequency control modesin another post of mine.
Parts of this guide were originally copied from the Handbrake wiki. However, the content has been removed. It also appeared briefly on Wikipedia, but was removed because it relied on only one source: the Handbrake wiki. This is an attempt to restore the information by adding a bit here and there. I don't know if there is original copyright of the content or not. If so, please let me know.
- April 2019 - Add image to expected rates.
- March 2018 - Minor updates and clarifications.
- Apr 2017 – Added an image from another article to clarify the concept.
- February 2017 – I rewrote this article in light of some recent developments. I also tried to make it thinner.
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.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 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.
Regulation 6.1 requires the CRF be equal to at least 25 per cent of the operating fund. If the CRF is below this amount at the time of the AGM, an amount equal to 10 per cent of the operating fund must be contributed annually until the CRF is 25 per cent of the operating find.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'.What is better quality x264 or x265? ›
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.Which is better quality h264 or x265? ›
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 CRF in recording? ›
When using variable bitrate, this controls the CRF (constant rate factor) parameter in x264 (10 is CRF 22, 0 is CRF 32). This is only used with variable bitrate, and determines how the video encoder should spend bits for quality. This value is not used and disabled if using CBR (constant bitrate).
Case report form (CRF) is a specialized document in clinical research.What is CBR in rate control? ›
CBR stands for constant bitrate, a control technique which keeps the bitrate constant, but allows video quality to vary. MBR stands for maximum bitrate, a control technique which allows the bit rate to vary, but only up to a maximum value.What is the main purpose of CRF? ›
A case report form (CRF) is a printed, optical, or electronic document designed to record all protocol-required information on each subject in a clinical research study.What are the two types of CRF? ›
These two types of CRFs are referred to as single-section and multi-section CRFs, respectively.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.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.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.
For 4K @ 30fps h. 264, the recommended target average bitrate is ~45 Mbps, and for HEVC, it is ~22.5 Mbps. For 4K @ 60fps HEVC, the recommended target average bitrate is ~48-54 Mbps, depending on the device.What is the minimum CRF balance? ›
New 10% minimum annual contribution to the CRF: effective November 1, 2023, when approving the budget at the annual general meeting, strata corporations and sections are legally required to contribute a minimum of 10% of the total amount budgeted to the annual operating fund to the contingency reserve fund (CRF).What are the minimum contingency reserve requirements? ›
The minimum contingency reserve calculation is based on the greater of: The amount of Contingency Reserve equal to the loss of the most severe single contingency; The amount of Contingency Reserve equal to the sum of three percent of hourly integrated Load plus three percent of hourly integrated generation.
noun. : an appropriation of surplus or retained earnings that may or may not be funded, indicating a reservation against a specific or general contingency.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.How do I make my OBS better quality? ›
- Downscale your output resolution. ...
- Lower your frame rate. ...
- Change your x264 preset. ...
- Try Quicksync, AMF, or NVENC. ...
- Check your sources. ...
- Upgrade your hardware.
- Downscale your output resolution. ...
- Use your Graphics Card for Encoding. ...
- Lower Frame Rate. ...
- Change your x264 preset. ...
- Check your sources. ...
- Close Extra Applications. ...
- Run all audio sources at the same frequency. ...
- Free Disk Space.
x264 is capable of achieving dramatic performance with encoding four or more 1080p streams in real time on one end-user computer. Compared with other H. 264 encoders, it provides the highest quality with the most advanced psychovisual optimizations available.What is a good bitrate 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.Does h265 reduce quality? ›
265 can decrease bit rate requirements and associated storage needs by approximately 30% with no perceived loss to video quality. Similarly, retaining the same bit rate enables much-improved image quality.Which video encoder is best? ›
- Wirecast. Key Features:
- Open Broadcaster Studio (OBS)
- LiveU Solo.
- Niagara Video.
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 most efficient video codec? ›
For web streaming, the best video codec is simple to identify – it is H. 264. H. 264 is hands down the best codec for web streaming because it is highly efficient and compatible with most other forms of video technology you need to use for web streaming.
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 the best CBR for streaming? ›
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.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.
An Electronic Data Capture (EDC) System is a software application that helps streamline the process of collecting, storing, and securing data from clinical studies, while an electronic Case Report Form (eCRF) is the digital version of a Case Report Form (CRF) used by researchers to record data from about patients ...Who prepares CRF? ›
The data manager will prepare CRFs which consist mostly of multiple forms for each study visit, continuous forms and final study completion forms. In some studies it is also appropriate to include follow-up visit forms.When can data be recorded directly on the CRF? ›
Source data should be entered onto the paper/electronic CRF pages as soon as possible following the participant visit. The data is usually entered by a study team member to whom the PI has delegated this responsibility.Which bitrate is best CBR or VBR? ›
The bottom line is that CBR is more consistent and reliable for time-sensitive encoding, and VBR produces higher-quality results. CBR is the best option for live streaming, whereas constrained VBR is the best option for on-demand video upload.What is a good bitrate for 1080p recording? ›
A good bitrate for 1080p ranges from 10Mbps to 15Mbps. 10Mbps is good with a standard frame rate, while 15Mbps is better for a higher frame rate.What is the difference between CRF and QP? ›
CRF (Constant Rate Factor) - encoding mode with constant quality. Unlike Constant QP, it encodes frames with different quantization parameters to achieve the same quality. CRF changes QP depending on the motion, with a large motion in the frame, QP can be increased, with a smooth motion, QP can be lowered.What are the contents of CRF? ›
A Case Report Form (CRF) is an electronic or paper document which is used in a clinical trial to record the protocol and required information about each participant. It enables efficient and complete data collection, processing, analysis and reporting.
A Case Report Form (CRF) is a printed, optical, or electronic (eCRF) document designated to record all of the protocol required information to be reported to the sponsor on each trial subject (source: ICH GCP, section 1.1).What is CRF anxiety? ›
Corticotropin-releasing factor (CRF), a 41 amino acid-containing peptide, appears to mediate not only the endocrine but also the autonomic and behavioral responses to stress.What is CRF in highway engineering? ›
Central Road Fund (CRF) is a non-lapsable fund created under Section 6 of the Central Road Fund Act, 2000 out of a cess/tax imposed by the Union Government on the consumption of Petrol and High Speed Diesel to develop and maintain National Highways, State roads (particularly those of economic importance and which ...What is the full form of CRF in army? ›
The official insignia of the Central Readiness Force.
|VIDEO CODEC||H.264 (x264 may work)|
|ENCODING BITRATE||Constant Bitrate (CBR)|
|AUDIO BITRATE||128 kbps|
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 is a good CBR for OBS? ›
Active Member. Don't record using CBR. Record using CQP/CRF. 22 is generally acceptable, 16 is very good/visually lossless, 12 should only be used if you plan to edit later, to mitigate re-encoding artifacts.What should I set my limiter to in OBS? ›
For Release, we generally recommend keeping at the default 60ms. Its just enough time that is smooths out the gain reduction, while also not being an abrupt change to your audio output levels for the viewers.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.Which is better 1080p x264 or x265? ›
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.
Best Video Settings for OBS Recording
If you're recording in 1080p leave the base resolution as it is. If the quality of the recording is not good, downscale the resolution to 1280 x 720. Set the output resolution field to the same setting. If the quality of your video is poor downscale the resolution appropriately.
When broadcasting in full HD (1080p) with a frame rate of 60fps, use a bitrate of 4,500 to 6,000 Kbps.What is CRF or bitrate compression? ›
CRF is a “constant quality” encoding mode, as opposed to constant bitrate (CBR). Typically you would achieve constant quality by compressing every frame of the same type the same amount, that is, throwing away the same (relative) amount of information.What does CRF stand for OBS? ›
When using variable bitrate, this controls the CRF (constant rate factor) parameter in x264 (10 is CRF 22, 0 is CRF 32). This is only used with variable bitrate, and determines how the video encoder should spend bits for quality. This value is not used and disabled if using CBR (constant bitrate).What is a good CBR result? ›
What are the typical CBR values? The harder the material, the higher the CBR value. A CBR value of 2% is usually found for clay, high-quality sub-base will have CBR values between 80% and 100%, and some sands may have values around 10%. The CBR testing can be applied to soils with a maximum particle size of 20 mm.Is higher CBR better? ›
The harder the surface, the higher the CBR value. Typically, a value of 2% equates to clay, while some sands may have a CBR value of 10%. High quality sub-base will have a value of between 80-100% (maximum). The CBR test is carried out on soils with a maximum particle size of 20mm.How do I know if my CBR is effective? ›
The CBR Test
The test is performed by measuring the pressure required to penetrate a soil sample with a plunger of standard area. The measured pressure is then divided by the pressure required to achieve an equal penetration on a standard crushed rock material.