What is the difference between good and realtime deadline modes in libaom?
When encoding video using the AV1 codec via libaom,
choosing the right deadline mode is critical for balancing processing
speed and visual quality. This article breaks down the fundamental
differences between the good and realtime
deadline settings, explaining how they manage compression algorithms,
their primary use cases, and how to choose the best option for your
video project.
The Purpose of Deadline Modes in Libaom
In libaom, the --deadline (or -usage in
newer versions) parameter tells the encoder how much time it is allowed
to spend compressing each frame. Because AV1 is an incredibly complex
codec, these modes act as high-level profiles that dictate whether the
encoder should prioritize maximum compression efficiency or raw
processing speed.
Good Quality Mode
(--deadline=good)
The good mode is the default setting for libaom and is
designed for file-based, ahead-of-time encoding.
- How it works: It enables exhaustive searching of coding tools, deep motion estimation, and advanced psychoacoustic optimizations. The encoder takes as much time as necessary (within your specified CPU-used preset) to deliver the highest possible visual quality at the lowest possible bitrate.
- Best Used For: Video-on-demand (VOD) streaming, archiving movies, creating high-quality web assets, or any scenario where encoding time is not a constraint.
Realtime Mode
(--deadline=realtime)
The realtime mode is specifically engineered for
low-latency, live video scenarios.
- How it works: It bypasses the most computationally
expensive AV1 encoding tools and enforces strict time constraints on
frame processing. The encoder compromises on compression
efficiency—meaning you will need a higher bitrate to match the visual
quality of
goodmode—in order to guarantee that frames are encoded fast enough to prevent buffering during a live stream. - Best Used For: Live streaming, video conferencing (e.g., WebRTC applications), cloud gaming, and real-time broadcasting.
Key Differences at a Glance
| Feature | Good Mode (good) |
Realtime Mode (realtime) |
|---|---|---|
| Primary Focus | Maximum visual quality and compression efficiency. | Ultra-low latency and fast encoding speed. |
| Encoding Speed | Slow to very slow. | Extremely fast, capable of 30+ FPS live encoding. |
| Bitrate Efficiency | High (smaller file sizes for the same quality). | Lower (requires higher bitrates to avoid artifacts). |
| Algorithmic Depth | Uses deep motion vector searches and complex block partitioning. | Disables heavy tools; utilizes fast motion estimation and speed-optimized heuristics. |
Which Mode Should You Choose?
- Choose Good Mode if your video is pre-recorded. If
you are uploading a video to YouTube, archiving a family video, or
mastering a film, you want the best quality per gigabyte, making
goodthe correct choice. - Choose Realtime Mode if your video is interactive
or live. If you are building a video chat app or streaming live gameplay
where frames must be encoded and transmitted instantly,
realtimeis required to avoid breaking the live experience.