Why does adding a speed keyframe change the position in the clip. Making speed ramp

PaulSeal
PaulSeal Posts: 11 Just Starting Out*

Hi,

I'm trying to make a speed ramp, my procedure is;

Make composite shot, add clip, add speed effect.

At the beginning of the clip I add a keyframe at 1.0 then move to where I want the clip to reach a fast speed. I add a keyframe, type 5, hit enter but Hitfilm changes the position of the clip in the viewer. So now the speed changes in the wrong place.

I have looked at several tutorials on YouTube and it doesn't happen when they do the exact same thing. What am I doing wrong?

I'm using Hitfilm Express version 2021.1 on Windows 10.

Any help would be awesome. I hope I have asked the question the right way and included all needed info.

Best Answer

  • Triem23
    Triem23 Posts: 20,061 Ambassador
    Accepted Answer

    @Dimipapa is on the right track here:

    Hitfilm's Speed effect is unintuitive and is overdue for an update.

    First let's talk about how the Speed effect works, because it needs some massaging to work "as expected."

    When you add a clip to a Timeline the clip defines a range of frames... Let's say for now we have a 10 second clip at a (true) 30fps (not 29.97). The range of frames is defined BEFORE any effects are added.

    This is 300 frames (which are numbered 000-299). ONLY these 300 frames exist in the clip. Any frames outside that initial range (maybe this 10 seconds comes from the middle of a 30 second clip) "don't exist" and are not read by the Speed effect. Remember, the range of frames in a clip is defined BEFORE effects, and the Speed EFFECT is, of course, an effect. This will become very important later. (right after the video link)

    Ok, you've set a keyframe at the beginning of the clip (frame 0). For this discussion the next keyframe will be at 5 seconds (frame 150).

    First, by default, Hitfilm interpolates values between keyframes. The video is slowly getting faster between frame 0 and frame 150. There are two ways to fix this. First, as Dimipapa says, you can create a Speed=1 keyframe at 04:29 (frame 149). This means the ramp up is one frame from frame 149 to frame 150. The second way is to change the Keyframe type from the default "Linear interpolation" to "Constant." Constant keys just stay at the set value until you hit the next key.

    This video is for an older version of Hitfilm, but is a good discussion on keyframes and interpolation.

    Ok, so we have 300 frames and, at five seconds (frame 150) we speed the video up to 500%. That effectively means we have a playback of 150 fps.

    At second 6 your video will "go black." There were 300 frames and, at 150 fps starting at second 5 you just ran out of frames. If you "trim the black" at second 6 your video will "go black" at second 5 frame 7, because the trim just removed source frames from the clip, thus fewer frames for the Speed Effect. Oh, dear, that's annoying.

    I did say the Speed effect is unintuitive, right?

    The means if I want a ten second clip that is normal speed for five seconds then 500% speed for five seconds, I have to start with a 30 second clip! (Five normal seconds and another twenty five seconds to speed up). Twenty seconds of the starting clip are "black," and those frames can't be cut without removing frames from the speed effect.

    Ugh, annoying.

    So, this means I need to make a Composite Shot just to set up the fast motion clip. Create a 30 second Comp, do the Speed effect in this Comp. Now I can drag this Comp to my Editor Timeline, or another Comp, and NOW I can trim the 20 seconds of black frames without messing up my Speed effect.

    Ok, so... Changing speed over a range of frames is called "speed ramping." Changing speed over a single frame doesn't have a name, but I call it "speed snapping."

    You want speed snapping, and, for that, I recommend a different workflow.

    Right click the video you want to speed up in the Media Bin and select "Duplicate." Right Click the Duplicate and select "Rename." Add a useful description to the filename like ">fike<x5 Speed." Right click the "x5 Speed" clip in the Media Bin and look for "Frames per Second." Uncheck "From File" and enter the new value - for a 30fps clip, 5x speed is 150.

    Now treat these as two separate clips and cut between them on the Timeline. I find this faster and easier than creating a new Comp, messing around with Speed effects, adding the Speed Comp to the main Timeline and trimming.

Answers

  • Dimipapa
    Dimipapa Posts: 386 Enthusiast

    I think I may not understand this correctly so dont take this as gospel.

    From what I understand you want something to move someplace at a certain speed, you play a keyframe indicating that speed. Then you move forward and create a new keyframe indicating the next speed? So I'm not sure how this effect works but you probably want to create a keyframe on the frame before you increase the speed. Otherwise you will start at one then slowly make your way to five. One easy way to make a keyframe at the current value is the make sure the effect you are adjusting is highlighted then click this button.


    Then move forward one keyframe and create the new value of 5

  • DafterThings
    DafterThings Posts: 983 Enthusiast

    I see the same behaviour. I load a video, add the speed effect, add a 1.0 keyframe on frame 0, move to the point I want to change the speed to 5.0 (lets say 15secons) and then move to the point I want the speed to move back to 1.0. The issue is that the time the video is playing speed adjust the length of the video so those keyframes are now at a different point in the video. The only way is to adjust the keyframe so it matches the point in the video again.


  • PaulSeal
    PaulSeal Posts: 11 Just Starting Out*

    Thanks @Triem23 , @Dimipapa & @DafterThings for your replies and joining the discussion

  • PaulSeal
    PaulSeal Posts: 11 Just Starting Out*

    Thanks so much for taking the time to write such a detailed answer, that has made me understand it a lot more. I'm going to try using your workflow method now and see how I go.

    Thanks again,

    Pau