[x264-devel] Global optimization of keyframes
Jason Garrett-Glaser
jason at x264.com
Sun Dec 26 14:12:42 CET 2010
On Sun, Dec 26, 2010 at 5:38 AM, Nicolas George
<nicolas.george at normalesup.org> wrote:
> Hi.
>
> I am wondering if you considered implementing a global optimization of
> keyframes using two-pass encoding, even in CRF mode.
>
> The way I see it, allocating keyframes with regard to the GOP size is a lot
> like allocating line breaks in a paragraph with regard to the page width.
> And we know since TeX that this can be optimized globally in an efficient
> way and greatly increase the quality. Keyframes have even more freedom than
> line breaks, the benefit could be even bigger¹.
>
> I tried to encode something to have figures to illustrate this mail;
> unfortunately, it seems that forcing the frame type, even to what it would
> have been anyway, greatly decreases the quality of the encoding.
>
> Anyway, I believe this idea may be worth some thought.
>
> Regards,
This idea has a few problems.
x264 currently makes all frametype decisions in the first pass. It
also makes various decisions *based on* these frametype decisions,
such as MB-tree. Changing frametypes in the second pass would require
either ignoring the inaccuracy of the other decisions, or redoing them
all.
Secondly, I don't really get your example. Why would you want
keyframes at all in that case? Keyframes are for scenecuts, and your
described video has no scenecuts.
Jason
More information about the x264-devel
mailing list