FFmpeg - Encode AVC: Difference between revisions
From PiRho Knowledgebase
Jump to navigationJump to search
Created page with "Use this rate control mode if you want to keep the best quality and care less about the file size. This is the recommended rate control mode for most uses.<br/> This method allows the encoder to attempt to achieve a certain output quality for the whole file when output file size is of less importance. The downside is that you can't tell it to get a specific filesize or not go over a specific size or bitrate, which means that this method is not recommended for encoding vi..." |
No edit summary |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
= FFmpeg – Encode AVC (H.264) Using CRF = | |||
[[Category:FFmpeg]] | |||
The | [[Category:AVC]] | ||
== 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 == | |||
<pre> | <pre> | ||
ffmpeg -i | ffmpeg -i input.file -c:v libx264 -crf 23 -preset veryslow output.file | ||
</pre> | </pre> | ||
== References == | |||
* https://trac.ffmpeg.org/wiki/Encode/H.264 | |||
Latest revision as of 13:48, 14 March 2026
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