New glitch when changing speed of a clip

JLKunka Posts: 10 Just Starting Out*
edited August 2021 in HitFilm

I don't do anything fancy when creating videos for youtube, but make extensive use of compressing various clips to get more action into less time. Before this "anomoly", when I would change the speed/duration of a clip to say 500%, the clip would shorten by 5x, I'd ripple delete any gap and continue stringing clips together. Now, when I apply a speed change, the clip appears to stay the same length, and the editor shows a phantom "end" and the speeded up clip comprises the entire remainder of its raw footage. A little hard to explain, but my end crop point is gone, the resulting clip runs at the faster setting, but no longer appears the corrent length on the editor timeline. To continue working, I've manually cut the excess footage off and continued, but have lost some smoothness to my final videos as small segments either repeat or have time gaps.

I thought this may have been a corrupt source video, but it does it on all raw videos. I then thought corrupt project, but going back to old projects, they now act this way. Lastly, I downloaded the latest version and it behaves the same way.

Anyone with ideas or experiencing similar behavior?



  • Triem23
    Triem23 Posts: 20,412 Power User

    I'm on my way to a dentist appointment, so this is more a note to myself to come back to this topic.

    In short, this isn't a bug, but a side effect of order of operations and the Speed effect. Hitfilm had a strange way of dealing with speed. I'll copy/paste my full explanation from another thread later. It's somewhat complicated, but, yes, there is a "fixaround."

  • JLKunka
    JLKunka Posts: 10 Just Starting Out*

    Thank you, and I am curious about "what changed" since I've been editing exactly the same way for two years now. Makes me think I accidentally tweaked a setting I wasn't aware of, like when my text effects turned grey which turned out to be simply a grey colored label applying itself...😄

  • Triem23
    Triem23 Posts: 20,412 Power User

    Nothing's changed with Hitfilm's handling of Speed for as long as I've used it (HF2). Anyways, here's the paste from another thread. Some days I'm too lazy to retype things. Heh. This is taken from someone actually just wanting to have the speed change over a single frame rather than interpolate, but the discussion on what the Speed effect is doing is accurate.

    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.

    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.

  • JLKunka
    JLKunka Posts: 10 Just Starting Out*

    That discussion is way advanced compared to what I do, and I think applies to an effect that changes speed over time.

    Here's what I do and have experienced with Hitfilm Express: I video machine tool operations for metalworking (many people doing this). The raw video machining a part may be 30 minutes long, interspersed with some commentary at key points. During editing, I leave the comments at 1x speed, then slice the sections of machining (which are not narrated) and speed them up typically 750% or 1000%. Now my edited string of clips has been compressed to say, 8 minutes, but shows 30 minutes worth of action.

    For the clips I choose to speed up, they used to just visually shorten (linearly) by the speed factor I apply. 1000% made a one minute clip 6 seconds, etc. The new behavior of the program is baffling, like I accidentally entered some mode I'm not familiar with. If I trim a clip with the razor tool, then speed it up to 1000%, the clip should not contain material beyond my trim points, no matter what I do to it. Yet it does, and the length on the editor window does not change.

    I may have to make a video to show this if it would make it more clear..

  • Triem23
    Triem23 Posts: 20,412 Power User

    The question is, are you using the Speed EFFECT, or the Rate Stretch tool?

    I think you're using the Speed EFFECT, because that's the behavior you're describing.

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

    You speed that up by 1000%. Now you have playback for 180 frames (6 seconds) and the rest of the clip goes black.

    Now you trim the black frames? You've just chopped off 1620 frames of original data. Now you only have 180 frames for the Speed effect to read. 18 frames of video, the rest black.

    This is the type of behavior you're describing, and this is how the Speed effect has always worked.

    You need to be doing the Speed effect on the footage in its own Composite Shot, then drag that Comp to your Editor Timeline. Trim the black frames on the Editor. That's the only way to trim footage that's been sped up with the Speed effect without removing source frames.

  • JLKunka
    JLKunka Posts: 10 Just Starting Out*

    After dropping a clip in the timeline, I usually ripple delete the gap to attach it to the previous clip. Then I right click the clip, select Speed/Duration, and change the value to 1000%. I recognize that Hitfilm now uses one frame out of ten, which gives me the clip speed and duration I'm looking for. For the now distorted audio, I typically reduce the volume to -24dB. What used to happen was the length of the clip obediently reduced by the factor of my speed increase (1000% speed resulted in a clip 1/10 the length timewise). There was no "trimming out the black frames". The clip just shortened as it was commanded to. It now seems to behave as you describe, but if my clip selection was a partial piece of an original, the speeded-up clip in my timeline now extends to the end of the original footage, and my edit point is lost - I have to guess where I placed my cut out.

    My son uses the software as well and concurs with your description of how the process SHOULD work, and has never had the experience I had for two years, where the clip behaves more intuitively (in my opinion) and simply shortens without trimming of "black frames". I cannot replicate this original behavior and am stuck with the way it "should" work now...

    Forgive me, as I am very grateful for your insight and input, yet still am frustrated because I had it easy for so long and feel this is a more cumbersome method of editing.

  • JLKunka
    JLKunka Posts: 10 Just Starting Out*

    I think I just discovered the cause of my change in behavior: The link between speed and duration was broken. I linked the two back up and editing speed has returned to how it did in the past. Now when I speed up a clip the length automatically adjusts and I get exactly what I intend, without trimming "black frames" or losing my endpoint.

    Thanks to your help I also have a better understanding of what is going on inside as well!

  • Triem23
    Triem23 Posts: 20,412 Power User

    Thank you. I've not encountered anyone unlinking Speed/Duration before, so I learned something new about how HitFilm works, too! 👍

    Glad you figured it out.

  • Andy001z
    Andy001z Lord EarthPosts: 3,633 Ambassador

    @Triem23 and @JLKunka interesting, not even sure how to unlink or link those two. I tried adding the speed effect to a media, then changed it to -10 speed and it just blacks the footage, I was expecting it to extend it to make it slower. Have I misunderstood. Mike I'm testing this on Beta.

  • Triem23
    Triem23 Posts: 20,412 Power User

    @Andy001z place a media clip on an Editor Timeline or Comp Shot, right-click it and look for "Speed/Duration" in the context menu. It's one we tend to overlook, because we're more likely to use the Media Bin Properties, Rate Stretch Tool, or Speed Effect.

    Speed/Duration is the Only thing that can unlink Speed and Duration from each other.

  • JLKunka
    JLKunka Posts: 10 Just Starting Out*

    Right click the clip you want to change, type in new value for speed (I use 1000 for a 10x speedup). Make sure the link is made between speed and duration (see attached screenshot) and your clip will shorten without "black frames"