ffmpeg:encoding:h265:constant_rate_factor_crf
This is an old revision of the document!
Table of Contents
ffmpeg - Encoding - h265 - Constant Rate Factor (CRF)
Use this mode to retain good visual quality and do not care about the exact bitrate or filesize of the encoded file.
- The mode works exactly the same as in x264, except that maximum value is always 51, even with 10-bit support, so please read the H.264 guide for more info.
Example
ffmpeg -i input -c:v libx265 -crf 26 -preset fast -c:a aac -b:a 128k output.mp4
NOTE:
- -crf: CRF affects the quality.
- 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.
- -preset fast: Choose a preset.
- The default is medium.
- The preset determines compression efficiency and therefore affects encoding speed.
- Valid presets are ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, and placebo.
- Use the slowest preset you have patience for.
- Ignore placebo as it provides insignificant returns for a significant increase in encoding time.
- -tune: Choose a tune (optional).
- By default, this is disabled, and it is generally not required to set a tune option.
- x265 supports the following -tune options: psnr, ssim, grain, zerolatency, fastdecode.
- They are explained in the H.264 guide.
References
ffmpeg/encoding/h265/constant_rate_factor_crf.1698831575.txt.gz · Last modified: 2023/11/01 09:39 by peter