FFmpeg - Encode AVC
From PiRho Knowledgebase
FFmpeg – Encode AVC (H.264) Using CRF
Summary
This article explains how to encode H.264/AVC video using CRF (Constant Rate Factor) with FFmpeg. CRF is the recommended rate‑control mode for most workflows because it prioritises consistent visual quality over exact file size.
What CRF Is
CRF is a quality‑targeted encoding mode. Instead of telling the encoder how big the output must be, you tell it what quality level you want, and the encoder decides the bitrate dynamically across the entire video.
CRF Scale Explained
The CRF scale ranges from 0 to 51.
Presets
Presets determine the speed/compression ratio balance.
Example Command
ffmpeg -i input.file -c:v libx264 -crf 23 -preset veryslow output.file