[x264-devel] Encoding a single input files to multiple output files with different bitrates

Jason Garrett-Glaser jason at x264.com
Tue Aug 23 05:09:05 CEST 2011


On Mon, Aug 22, 2011 at 8:04 PM, Kiran Kotla <kotlakiran at gmail.com> wrote:
> Hello,
>
> I am trying to use x.264 to generate multiple output files with different
> bitrate from a single input file.
>
> I want to do this in the most efficient way possible. Does x.264 already
> provide a way to do this?
>
> As in, after a common motion estimation step, is it possible to generate
> multiple output files (with different bitrates), rather than having to go
> through most estimation phase for each output bitrate?
>
> If, this functionality is not available, any pointers to where to make
> changes, would be appreciated.
>
> I am looking at the function x264_macroblock_analyse and trying to use
> multiple 'qp's each for one output bitrate, but the changes look quite
> complex.
>
> Appreciate any suggestions.

It's theoretically possible, but as the results of an optimal motion
estimation and analysis pass are heavily dependent on the quantizer
used, any algorithm which shares these between multiple
vastly-different bitrates will have much worse compression.

In short, you're probably better off doing 5 separate encodes at
"superfast" than trying to share them all at "medium".

Jason


More information about the x264-devel mailing list