What does "Keyframe Rate" do?

  • 1
  • Question
  • Updated 6 months ago
Should I use a large or small number? So if I have a 30 fps video, do I set it to 30? Or do I set it to 2 like the YouTube Keyframe interval.
Photo of TheEzeJC

TheEzeJC

  • 11 Posts
  • 0 Reply Likes

Posted 7 months ago

  • 1
Photo of Rick Stone

Rick Stone

  • 5287 Posts
  • 2497 Reply Likes
Hi there

Perhaps the thread linked below will help? It's on a different forum and I believe the answer you will find most helpful is from a person named Lon Naylor.

Click here to view

Cheers... Rick :)
Photo of TheEzeJC

TheEzeJC

  • 11 Posts
  • 0 Reply Likes
is there an auto feature in Camtasia?
Photo of kurrykid

kurrykid, Champion

  • 759 Posts
  • 129 Reply Likes
Great link Rick!
Photo of Jay Versluis

Jay Versluis

  • 53 Posts
  • 19 Reply Likes
What Camtasia called keyframes are actually I-frames, that's the technical video encoding term for them. Those are full images as mentioned in the link, akin to JPG images. The "tweener" frames are p-frames I believe. What happens sometimes is that with too few I-frames, motion appears blurred until the next I-frame arrives. MPEG encoding uses a so-called long GOP structure (that's for Group Of Pictures). Video editors have to transcode imported footage into all I-frame footage under the hood (that's why iMovie and Premiere have to perform background tasks before you can start editing).
So... more keyframes (or I-frames) means that blurry effect is kept to a minimum, at the expense of larger files sizes upon output.
Photo of davemillman

davemillman

  • 565 Posts
  • 185 Reply Likes
Thanks Rick, useful link.
Photo of Paul Middlin

Paul Middlin, Employee

  • 924 Posts
  • 213 Reply Likes
There are two different concepts in that post, and it makes it a little confusing, plus a little bit of inaccurate information I think...

First, the concept of "keyframes" for animations (like in zoom/pan on the Windows side) are completely unrelated from keyframes when encoding. It's unfortunate that we used the same term in two places there. In this post, you're just talking about encoding, and keyframe rate, so don't worry about animations or zooming and panning.

Second, it is true that a lower keyframe rate means a bigger video. However, I think the biggest thing you would notice with a very high keyframe rate is that seeking is slow. Meaning, if you try to drag the playhead around while watching a video, or jump forward/back, this can be very slow. That is because you have to use the nearest keyframe and recalculate everything... but the tech details don't matter.
I apologize also for the confusing term- calling it a "rate" is misleading. It would be verbose, but a more accurate label would be "put a keyframe every [ 30 ] frames".

Bottom line: you usually want to leave this value alone ;) The default is 30.
Photo of Rick Stone

Rick Stone

  • 5268 Posts
  • 2486 Reply Likes
Sounds almost backward to my logic to hear a LOWER keyframe rate would result in a larger video. Can you expound on that?

Also, I'm guessing that the reason the option exists is because under some conditions one may need to adjust this to a different value. 

Are you willing to elaborate on what conditions we may see that would make it beneficial to adjust this setting?

Cheers... Rick :)
Photo of Paul Middlin

Paul Middlin, Employee

  • 924 Posts
  • 213 Reply Likes
you're absolutely right; that's what I meant about the term used in that label being a bad one. Usually a "rate" should be "X keyframes per second" but instead it means "A keyframe every X frames". So, a higher frame number here means there would be less keyframes per second... and that feels pretty backwards as far as a 'rate' goes.
Photo of Paul Middlin

Paul Middlin, Employee

  • 924 Posts
  • 213 Reply Likes
Oh, sorry, to the second part of your question- sometimes people adjust this to get better compression (smaller files), particularly if they don't care about seeking, or expect to watch the file locally where this wouldn't matter as much. Or perhaps it will get re-encoded anyways, so you're trying to save some file size on its way up to YouTube/etc. 
Conversely, if you care not at all about file size, you can add more keyframes. I think this might speed up encoding time (untested!) though I don't think it would have that big an impact on quality as suggested by Lon. I could be wrong, and it might depend on which encoder you use as well (the Apple encoder, the MainConcept encoder, others).
Photo of Rick Stone

Rick Stone

  • 5268 Posts
  • 2486 Reply Likes
Thanks so much for the explanation!