[x264-devel] one question about two-pass rate control

Simon Horlick simonhorlick at gmail.com
Thu May 12 05:59:33 CEST 2016


Hi Andrew,

> x264 adopts several rate control methods, one of which is of two pass. For 1st pass, x264 encoder will generate two files, i.e. rate control file and mb tree file. For 2nd pass, x264 encoder will read the two files, and estimate qp value to encode each frame.
> 
> It's redundant to encode video sequence twice, one for each pass. Is it possible to encode video sequence once without making big change into rate control algorithm?


Perhaps consult the documentation before posting here? x264 supports constant quality mode, constant quantiser and constant bitrate:

From x264 --help:

> Ratecontrol:
> 
>   -B, --bitrate <integer>     Set bitrate (kbit/s)
>       --crf <float>           Quality-based VBR (0-51) [23.0]
>       --vbv-maxrate <integer> Max local bitrate (kbit/s) [0]
>       --vbv-bufsize <integer> Set size of the VBV buffer (kbit) [0]
>   -p, --pass <integer>        Enable multipass ratecontrol
>                                   - 1: First pass, creates stats file
>                                   - 2: Last pass, does not overwrite stats file

If you aren’t bothered about hitting an exact file size then there is no need to use two-pass encoding.

For example, the default is --crf 23, which aims to keep constant quality and bitrate depends only on the complexity of the source material. This is done in a single pass.

Regards,

Simon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20160512/32a5cc20/attachment.html>


More information about the x264-devel mailing list