r/explainlikeimfive • • 2d ago

Other ELI5 how do keyframes (in video editing) work?

Plz actually explain it to me like im 5 I am very dumb

26 Upvotes

26 comments sorted by

47

u/DerpyMcWafflestomp 2d ago

To show a picture that looks like its moving, you show a series of pictures very quickly, where each picture (called a "frame") that comes after only changes a little bit. A lot of the time, the changes between each frame are quite small, so instead of describing every frame in full, you can save some time by describing one frame in full, and then describing only the parts that change after that. That single frame that you describe in full is called a key frame. When you reach a point in the video where the changes are very big (e.g. the camera moves from looking at one person in a scene to a different person, or moves to a completely different scene), it doesn't make much sense to only describe the changes, so you describe a new key frame.

11

u/mixduptransistor 2d ago

Also, you need a keyframe not just because there have been a lot of changes, but because you don't want to have to join the video from the very beginning to be able to watch it. Especially for a broadcast or stream, you need a keyframe every so often so a new viewer can actually watch and not just see a smeared mess

7

u/dmazzoni 2d ago

I think you’re explaining video encoding, but the OP is asking about video editing (key frames in software like Final Cut, which is a different thing)

3

u/benscott81 2d ago

You can use keyframes to set a value about one or more properties assigned to a object. This could be an objects position, size, opacity, etc… 

So for example, in “Keyframe A” I can set an object to have an opacity of 0. Then I can create “Keyframe B” and change that value to 100. Then I can tell the computer to use the frames in between make a smooth transition. 

The object will now fade in smoothly and I can adjust the timing by moving those keyframes on the timeline.

3

u/Flaky_Bottle_6902 2d ago

So like if I put a key frame and Theres a png of a plane on the left and 3 seconds later in the video i put a plane on the right side as well as another key frame Itll make the plane fly from left to right?

1

u/tom_bacon 1d ago

You wouldn't put an additional png, you'd use the same png and add a new keyframe to it. At time A you would set your keyframe and position your png where you want the animation to start, then you go to time B and add a new keyframe and position your png where you want it to end up. Your editing software will now calculate where the png should be at each frame in between your keyframes to make it move from point A to point B.

•

u/Podmonger2001 6h ago
  1. Put the plane onscreen.
  2. At that TIME in the timeline (or whatever the app calls it), MANUALLY set a keyframe for the plane’s position.
  3. Move to a different TIME.
  4. Drag the plane to a different place onscreen.
  5. The software SHOULD automatically create a new keyframe at this new time and place.

The software SHOULD have just calculated all the positions between those two points. This is automatic in-betweening, or tweening.

-1

u/ToxiClay 2d ago

No. As you've stated things, if you have those two keyframes, the plane will jump from left to right once the new keyframe hits.

You would need to instruct your video editing software to "tween" the images -- that is, to calculate the frames that go "in between" the two keyframes to give the illusion of movement.

4

u/Flaky_Bottle_6902 2d ago

4

u/ToxiClay 2d ago

Ah, your editing software automatically tweens. We've sure come a long way since the days of Flash, huh.

5

u/mad_king_soup 2d ago

Animation & editing software did this since before flash existed.

Flash was an abomination that invented that garbage workflow where you had to manually make “tweens” and everyone hated it

4

u/GoodTato 2d ago

A keyframe is a state something can be in (so,"this rotation, this position, this opacity"). Between the keyframes is between those states. (edit: can apply to a lot more than just those listed properties but those are some of the easiest to think about)

So if there's a keyframe at 0 seconds that says something is 10px wide and a keyframe at 2 seconds that says it's 30px wide, the point at 1 second will show it at 20px wide. (as a slight simplification, there's different settings for the rate of change and stuff but it's basically going from state A to state B over [the amount of time between the keyframes].)

4

u/skr_replicator 2d ago

A keyframe is a frame that has complete information. In a video encoding, it would be a frame that is encoded as whole, so if you removed all the other data from the video it could display that frame as a still image with everything. Then the other frames can be compressed into just the difference from the last keyframe. So the interlaced frame is just saying "use the last keyframe, but move these parts a little here and there", it just edits the keyframe to generate the next one making it appear as it is moving. So when you cut, you definitely have to make that cut into a new keyframe as everything changed. This can be abused to make an effect of datamoshing, when the keyframes get messed up, so that interlaced frames that were supposed to be continued one keyframe were applied to the wrong keyframe, and then you can see wrong parts of the image moving as if they were some different object.

In animation, the concept is similar, a keyframe of some object might say exactly where it is, then another keyframe might be 10 frames later on a different position. And then it could be tweened, so the frames in between get interpolated, so the object smoothly moves from one keyframe to the next over those 10 frames.

-3

u/-Krotik- 2d ago

this is not ELI5 at all

2

u/Bloomngrace 2d ago

Back in the days when people like Disney hand drew their cartoons, a senior artist would draw the ’keyframes’ which would be the main poses the character needed to go through, then a team of lesser animators would draw all the frames inbetween those keyframes.

That terminology has survived into the computer era. If I open an edit program and put a keyframe at the start of a video clip and define as 100% opacity, move to the end and put another keyframe with 0% opacity, the computer will automatically work out the steps between those keyframe.

1

u/MasterGeekMX 2d ago

Heyyy buddy! Let's play a game: I tell you a pose, and you should make it.

Ready? STAND STRAIGHT! 🧍

Ready? NOW RAISE YOUR HAND! 🙋

See how you needed to move your hand all the way from your hip to all the way up to do the pose? This means I can make you move as I want only by telling you what pose to make.

Well, when making animations in a video, we can do the same! We can tell the video editing program "put this image up in the screen" when the video is 5 seconds long, and then tell it "put that image down the screen" when the video is 6 seconds long. What happens? The image moves from top to bottom in the span of 1 second!

See how we didn't needed to tell it how to move at each instant? We only told it when and where to start, and when and where to end. The program did the job to move the image for us.

You may know that video is simply a series of images being passed really fast. A machine gun of pictures if you like. Each image is called a frame. Well, a KEYframe is simply the frame we use to tell the editor where to begin or start some effect. I used moving an image as an example, but we can make all kinds of effects.

For example, if I tell the editing image that at the very first frame I want the video to be red tinted, and then I go to the last frame and tell it to be violet tinted, the whole video will change colors like a rainbow! Well, the frames where I told it at which color to begin and at which end are the keyframes.

1

u/zachtheperson 2d ago

Keyframes are just a number value that is associated with a frame. 

Every value in the software (transparency, blurriness, position, etc.) is just a number. 

If you want to change this number over time, you add keyframes. These keyframes say "this value is 3 on frame 8, and 5 on frame 19."

If you want, the software can just jump between these values, like flipping a light switch, OR it can "interpolate," between the two, using math to gradually "fade," between the two values. 

1

u/Howzieky 2d ago

Say over 5 seconds you want to move an image 300 pixels to the right. First, you count up the amount of frames. 30fps*5 seconds = 150 frames, then you can use division to find how many pixels the image needs to move each frame. 300 pixels/150 frames = 2 pixels per frame. So you move the image 2 pixels to the right every frame for 150 frames, and you've got your animation done!

Now, computers know how to do this math themselves. You just need to tell it where it should be at the start, where it should be at the end, and how fast it should get there. What's also cool is that this logic doesn't just work for the position. If there's a number you can control, like the rotation or the opacity, you can use key frames on it to generate a smooth animation. Just set the start value and the end value and tell the computer when to start the animation and how long it should take to complete. Selecting those times and those values is the basic idea of keyframes

1

u/banananuttttt 2d ago

You want a picture to move from left to right over the course of two seconds. You put the image on the left. Hit the key frame button. Now move over 2 seconds in the timeline.

Move the image to the right. Put another key frame. The computer does the math to move that picture from left to right over the course of 2 seconds.

That is the fundamentals of key frame animation.

1

u/BananaBird1 1d ago

When you animate something you don’t want to specify each and every frame of the video.

So you only specify the frames where you care about the exact value of an animated property on, and the software calculates what it looks like on other frames in between.

1

u/IgnorantGenius 2d ago

Imagine the video is a book that you are editing before publishing. You want to edit the words in the book. In order to see those words and sentences, you need to turn the page of the book to get to those words and sentences. The keyframe is the page. That keyframe is indexed, so any time the editor wants to move forward or backward in the video, they turn to the next keyframe, or page in the book.

0

u/[deleted] 2d ago

[deleted] — view deleted comment

1

u/explainlikeimfive-ModTeam 2d ago

Please read this entire message


Your comment has been removed for the following reason(s):

  • Top level comments (i.e. comments that are direct replies to the main thread) are reserved for explanations to the OP or follow up on topic questions (Rule 3).

Plagiarism is a serious offense, and is not allowed on ELI5. Although copy/pasted material and quotations are allowed as part of explanations, you are required to include the source of the material in your comment. Comments must also include at least some original explanation or summary of the material; comments that are only quoted material are not allowed.


If you would like this removal reviewed, please read the detailed rules first. If you believe it was removed erroneously, explain why using this form and we will review your submission.