Log in

View Full Version : Is there a setting for max distance to ref frame?


vume5
30th October 2012, 17:57
Hi,
how far ahead may a very similar frame lie to be recognized and used as such and what setting(s) affect this distance?
All these "lookaheads"(vbv,rc,sync...) don't seem to be it.

For example when two people are talking in a movie, the screen constantly switches back and forth between person A and B.
If the codec decides not to put a keyframe at the A->B switch it could use the last frame before that switch as a reference when the video switches back to A.

cu
vume5

vivan
30th October 2012, 23:49
--keyint (http://mewiki.project357.com/wiki/X264_Settings#keyint)

vume5
31st October 2012, 10:43
--keyint (http://mewiki.project357.com/wiki/X264_Settings#keyint)
No way.
Are you saying that if I encode a 100000-frames video with --keyint infinite and --scenecut 0 the codec will check all 99999 previous frames when it encodes the last one?
I don't think so.

LoRd_MuldeR
31st October 2012, 12:09
I don't think what you ask for exists.

The "--ref" option controls the number of reference frames. And, as far as I understood, this is (more or less) a FIFO list.

So with N reference frames, always the previous N frames can be used as references and that's it.

If I remember correctly, x264 does not support "long-term reference" frames. Please correct me if I'm wrong...

(Still, information can propagate from frame to frame until the next scenecut/IDR-frame)

vume5
31st October 2012, 20:43
Oh, I thought --ref only determines the max number of reference frames for a single frame.
After looking up the docu though it looks like it determines the number of reference candidates (thus logically also limiting the max ref frames for a single frame; more of a side-effect).
Thanks for clearing that up.