# A neural network approach to GOP-level rate control of x265 using   Lookahead

**Authors:** Boya Cheng, Yuan Zhang

arXiv: 1908.02939 · 2019-10-25

## TL;DR

This paper introduces a neural network-based method for GOP-level rate control in x265, using lookahead features to adaptively set CRF values in a single-pass encoding, improving bitrate accuracy and compression efficiency.

## Contribution

It proposes a neural network model that maps video features to CRF-bitrate relationships and a content adaptive rate factor (CARF) method for GOP-level bitrate control in single-pass encoding.

## Key findings

- 84.5% of test data within 20% bitrate error
- Outperforms x265 ABR mode in BD-rate reduction
- Achieves 5.23% average BD-rate savings

## Abstract

To optimize the perceived quality under a specific bitrate constraint, multi-pass encoding is usually performed with the rate control mode of the average bitrate (ABR) or the constant rate factor (CRF) to distribute bits as reasonably as possible in terms of perceived quality, leading to high computational complexity. In this paper, we propose to utilize the video information generated during the encoding to adaptively adjust the CRF setting at GOP level, ensuring the bits of frames in each GOP are allocated reasonably under the bitrate constraint with a single-pass encoding framework. In particular, due to the inherent relationship between CRF values and bitrates, we adopt a shallow neural network (NN) to map video content features to the CRF-bitrate model. The content-related features are collected from the lookahead module inside the x265 encoder, including encoding cost estimation, motion vector and so on. Further, a rate control method, called content adaptive rate factor (CARF), is proposed to adjust the CRF value of each GOP with the requirement of the target bitrate by using the predicted CRF-bitrate models of each GOP. The experimental results show that the proposed approach can make 84.5\% testing data within 20% bitrate error (or better) and outperform the ABR mode in x265, leading to 5.23% BD-rate reduction on average.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1908.02939/full.md

## Figures

7 figures with captions in the complete paper: https://tomesphere.com/paper/1908.02939/full.md

## References

7 references — full list in the complete paper: https://tomesphere.com/paper/1908.02939/full.md

---
Source: https://tomesphere.com/paper/1908.02939