Page 1 of 1

Can anyone explain 'key frame spacing' to me?

Posted: Wed Aug 27, 2014 1:44 am
by JPK1138
ok im actually having this problem in adobe premiere pro but because no one over there has any idea wtf is going on, im going to ask here where i've had lots better help in the past.

my source is a video encoded in mp4, and i'm just exporting bits and chunks, and i noticed that (especially on parts where there are lasting stills) you can see the video pulse every couple seconds or so.

the rate at which the pulses occur seems to depend on how high or low i set the key frame distance in the advance settings.
from what i was able to understand, setting the keyframe distance tells it where to re-evaluate and when to start adding new information (?)

I ended up settling on a key frame distance of 90. and thats only because some who was helping another had posted a picture of his export settings, and his keyframe distance was 90. so i set mine to 90 like his, and now it made those pulses stop showing up.

the problem is now i understand i totally have almost no understanding of how spacing of keyframes work. i thought at first maybe it had something to do with frame rate but now since this experience with it making the screen pulse with long, still, panning images, i now have no idea.

here is an example, on unlisted youtube vids. the pulses start at around 45 seconds when the credits start with the still images.
If u raise the quality to 720 its easier to see.

https://www.youtube.com/watch?v=sC5jj4Hujbk

(fixed with keyframes set to spaced at 90 frames)
https://www.youtube.com/watch?v=Vm50AZb ... e=youtu.be


and here is a screen cap of my export settings, you can see the options for key frame spacing near the bottom.
Image

also im really sorry about asking about this on a forum for handbrake but i would think this should be relatable all in some way.
any explanation as to how exactly spacing keyframes affects the video or how to determine the appropriate spacing would be very helpful.

thanks

Re: Can anyone explain 'key frame spacing' to me?

Posted: Wed Aug 27, 2014 2:39 am
by Deleted User 11865
Moving to Tiki Bar.

Re: Can anyone explain 'key frame spacing' to me?

Posted: Wed Aug 27, 2014 2:46 am
by Deleted User 11865
This is greatly simplified, but here goes.

Keyframes are frames that can be decoded instantly, i.e. do not reference other frames in any other way. Other frames usually only encode the differences from the keyframe, which is one of the main way to improve video compression efficiency.

Encoders tend to ensure keyframes have a high quality (by allocating many bits to it, i.e. making them less compressed), since it will be used as a reference by many other frames. When done badly, this can however causes jumps in quality (quality is great at the first keyframe, gradually lowers throughout the following frames, then suddenly increase again as a new keyframe is encoded).

This might be what you're experiencing (but it's just a guess). Is the problem less noticeable if you set the keyframe interval to e.g. 24?

Re: Can anyone explain 'key frame spacing' to me?

Posted: Wed Aug 27, 2014 3:34 am
by JPK1138
yeah, thats exactly what i thought! that setting the key framing distance to basically refresh the information in sync with the frames per second. for some reason, that had absolutely no effect in fixing this (in fact it sped the problem up, pulsing every 24 frames). i usually would encode with a keyframe distance equal to the frames per second of the source video. but now that this has happend i dont know what to think...

perhaps this is just something that happens under these circumstances. zooming/panning stills. during normal scenes, such as the ones before the credits, it doesnt appear to have the problem.
also thanks for telling me more about keyframes.