Emby Emby Emby Learn
  • Emby Home
  • Video
  • Audio
  • Media Files
    • Subtitles and captions
    • Photos and images
    • Metadata and discovery
    • Libraries and media collections
    • Playback and streaming
    • Media hardware acceleration
    • Displays and AV connections
    • Live TV and recording
  1. Emby Learn
  2. Video
  3. Encoding and picture quality
  4. Rate control
  5. Constant rate factor (CRF)
Search Results for

    Show / Hide Table of Contents

    Constant Rate Factor (CRF) for Video

    Constant rate factor is an encoder-specific quality control that produces variable bitrate without targeting an exact output size.

    At one constant rate factor (CRF) setting, a video can produce different bitrates and different picture quantizers from scene to scene. The constant is an encoder model's selected rate-factor control, rather than the number of bytes allocated to each second.

    x264 and x265 use CRF as quality-led variable rate control. Within a fixed setup, lowering the selected value generally moves toward finer reconstruction and more data; raising it moves toward stronger approximation.

    For exact sample preservation, use the encoder's documented lossless mode. x265 documents an explicit mode for that purpose; CRF 0 is not a universal lossless convention. This separates quality-led approximation from a different reconstruction guarantee.

    Separate the control from the quantizer it produces

    QP selects quantization strength. CRF guides the decisions that produce those quantizers.

    The controller analyzes the source and applies its quality/importance model. It can choose a different baseline or regional QP as content and picture role change while retaining the same user CRF.

    Observation at one CRF Reason it can change
    Frame QP Picture role and rate-control analysis
    Regional QP Adaptive precision/importance decisions
    Bits per frame Source information and selected representation
    Whole-file average The accumulated demands of that source

    The CRF number therefore does not mean “all frames used QP 23” or “every second received the same rate.” Those would be different control policies.

    Picture complexity and reference roles in quantizer selection

    An encoder's analysis estimates how well the pictures can be predicted and how much correction their structure leaves. More complicated content can have more significant information to represent.

    In x265's implementation, a fixed rate factor participates in the conversion from modeled terms into quantizer scale. Additional picture and regional analysis changes the resulting allocation. The full code has separate branches for its enabled analysis tools, rather than one equation directly mapping CRF to visible error.

    Picture role is important. An independently coded anchor establishes information needed by later pictures. A region reused by many future predictions can be worth reconstructing more carefully than a region that disappears immediately. Adaptive decisions can distribute precision accordingly.

    The encoder then chooses partitions, predictors and coded corrections at those quantizers. The actual produced bits update its coding estimates. Size emerges from this process instead of being an exact budget requested for the film.

    What a rate cap changes

    A CRF encode can also have a maximum rate and buffer constraint. The model's preferred representation must then fit local delivery deadlines.

    If a demanding section needs more data than the cap allows, the controller changes its reconstruction choices to satisfy the constraint. Its output can depart from the unconstrained quality policy there. The cap is therefore part of the encoding setup, not an invisible accessory to the CRF value.

    The same CRF with two different caps can create different results in the scene that binds those caps.

    Evaluate the value with the encoder fixed

    Choose representative passages that include the important source characteristics: grain or clean animation, motion, fine static detail and smooth shading. Make candidate encodes that differ in the CRF value while keeping the codec implementation, version, preset, sample format and other constraints stable.

    Then compare the decoded pictures and their observed rate/size. A setting is useful when the reconstruction serves the intended viewing context and its data demand serves the intended delivery. The source's easy passages and difficult ones need to be assessed together.

    CRF 20 in x264, CRF 20 in x265, and a CRF-like AV1 control belong to different models. Their shared number is not an equal-quality specification. Record the implementation and settings with the result so the comparison can be repeated.

    See Also

    • Constant Quality Video Encoding
    • Video Quantization Parameter (QP)
    • Video Buffering Verifier (VBV)
    • Video Encoder Presets

    References

    • x265: Quality and rate-control options
    • FFmpeg: Codec and encoder documentation
    On this Page
    2026 © EMBY LLC. Please see our terms of use and privacy policy.
    Back to Top