Experiments with the Time Remap filter

That clip wasn’t the best example to be honest.
But it’s the best one I could quickly find that show two easily identifiable moments. In that case, the stick hitting the cue ball, then the cue ball hitting the other ball. I wish I had found a longer clip.

It actually was because it’s a use case where the workaround that was just suggested wouldn’t pan out.

This is the problem that keyframe ripple would fix. It’s a mission critical feature in my book.

2 Likes

I made a video to demonstrate the workflow I was describing.

I appreciate the comments @DRM. All the conversation has been constructive from my perspective.

4 Likes

Nice clear demo, @brian. You should think about making some vids for the Shotcut youtube channel at least just to announce a new feature and demonstrate it like how you did with the Timer filter before. :slightly_smiling_face:

In regards to your demo, you did make the section after the slow motion 1x and to do that you had to change the frame at which the clip ends. For use cases where people aren’t particular about where the clip ends this is totally fine. But what if I was very particular about ending the clip with a 1x speed where the clip actually ends? I can’t. The only way to do this is to then split the clip and try to match the exact frame where clip A with Time Remap ends and match the exact frame that’s supposed to follow with clip B. I’ve tried this and it’s a big hassle and very time consuming because once you remove Time Remap from clip B the clip won’t start on the frame that you split it from which is expected.

I am assuming that programming Time Remap to change length a clip’s length dynamically might not be easy with how the timeline is programmed. But would it be possible to have some sort of clip outline similar to what’s seen when moving multiple clips around with Ctrl or Shift that would show just how much the clip would be lengthened or shortened before it actually changes in length? Something like when the keyframe is being dragged around a clip outline would go forward or backward to preview where it would end up if the keyframe is laid down at that spot and once it is laid down then at that point the clip length would actually be changed according to what the clip outline showed. Is that possible and would that make it easier to program?

1 Like

Ok @brian, this is pretty much how I’ve been doing it since I started this thread in February, except that I use the Set Speed Before button at almost every step. But, and I’m sorry to insist on this, you didn’t provide a solution to the issue I’ve been trying to explain here in maybe four or five posts of the thread. You said in the video that you want to start the slow motion at the moment the player throws the ball, and stop it at the moment the other player catches it. But the slow motion stops about six or seven seconds latter. So, a few more steps (or a lot of steps if you’re unlucky) are needed to finish the job.

I’ve learned something though, and I thank you for that. You’ve explained to me a while ago how to extend the video in Properties but I didn’t really understand what you meant. Now I do :slight_smile:

What is “Clip B”? Did you split the clip before applying time remapping? If so, that is not necessary. Once you restore the 1.0 speed, you can play the entire duration of the rest of the clip. No need to split it.

I could have taken more care to make sure the frame I ended on is the last frame. It would just be a matter of noting the length of the original clip, setting the play head on that frame by watching the “Input Frame” status in the Time Remap filter, and then trimming out to that frame.

If you are particular about which frame the speed change occurs on, then you can not use this button because it will choose a different source frame to achieve the desired speed (moves it up/down on the Y axis). This must be the crux of your problem. Use the technique I showed. Put the cursor before the keyframe and use the “Alt” key to LOCK the source frame (y-xis) and only change the output time (x-axis).

Maybe I did not pick the exact source frame you expected - but the demonstration shows that it always kept the exact frame that I originally selected. It never changed the “ending” frame of the speed change.

Based on your description, I am feeling confident that your use of the Set Speed Before button is causing this guessing game you are experiencing. Use the Alt key and drag.

Sorry again, but I don’t agree with you on this… You did pick the frame showing the player catching the ball as your second key moment (i.e. the end of the slow motion),

Your exact words : Over there for the catch, I think I’m also going to consider that a key moment … so I’ll put a keyframe right here… and then, for the rest of the clip, I think I’ll just have it be regular speed

But on the end result, the slow motion stops about 6 seconds after the player catches the ball. How is that the exact same frame you originally selected ?

That is not what I see. Pay attention to the selected frame and not the description. For example, “catch” might imply as soon as the ball is in the hands, but here he also included the falling down and turning over. And when that portion shows down, yeah it is at least a few seconds.

This is hopeless…I’ll just stop wasting my time (and yours) with this filter. We obviously don’t see things the same way. It’s either me being too dumb to understand or you refusing to acknowledge the issue I’m trying hopelessly to explain.

The clip on the right side that is produced after splitting the original clip with Time Remap. “Clip A” I call the clip that ends up on the left after the split.

No. That’s the point. Following your demo, If I wanted to end the sequence on the frame where the original clip ends but do it at 1x speed… I can’t.

The only way to even attempt that is from the moment in your demo after you modified the clip to end on an earlier frame to get 1x speed, instead of trimming the clip like you did to just end the clip at the moment where the new last frame comes in, I would split the clip where the last frame ends then with clip B (i.e. the clip that ends up on the right side after the split) I would have to spend time fishing to find the actual frame that follows where clip A ends.

The original clip we’re working with:

After splitting the clip:

Assuming that the clip you used in your demo is the whole source clip (meaning you can’t stretch the clip out longer to get more footage), you can’t play the whole rest of the clip up to the original source clip’s last frame at 1x speed after slowing down a section. The only way to get 1x speed is to end on an earlier frame and that’s because there isn’t enough footage to play out to the last frame at 1x speed.

I took a screen shot of the initial point when Brian set the second keyframe and then another screenshot after he used the ALT key and moved the second keyframe to the right in order to set the slo-mo time. The screenshots to me are in exactly in the same place, his technique worked.

Screenshot of the initial setting of the second keyframe

Second screenshot after him setting the speed (using ALT and moving the keyframe to the right) and playing the video

I know what you’re saying. The thing is I tried something like this before and Shotcut crashed on me. So I suppose the best way to do this is extending the duration in the Source tab like Brain does with the clip before bringing it to the timeline. But most people are working as they go and this method wouldn’t be obvious. That’s the perspective I was coming from: Someone applying Time Remap and as they are adding slow downs and speed ups have Time Remap do the lengthening or shortening of the clip for you. Brian’s method is more or less doing it manually by just creating a lot of extra footage which seems like a workaround because it’s not going to be obvious to people.

I don’t disagree and I’m sure these points are being noted. I personally think some excellent points have been raised over the course of it’s inception which will only aid to make it more refined.

I actually downloaded the example video and followed as per Brian’s video. I did it were Brian added the video to the timeline and a second were I did the work of adding keyframes in source (is it possible to do the entirety in Source, not sure but I tried anyhow), when I went to change the time (left arrow) and the dialogue popping up, it did pop up but I couldn’t get it’s focus (I could see it if used the Windows technique of changing programs, that is, using the Alt - Tab technique), the dialogue was visible but I couldn’t actually Alt-Tab to get it’s focus, quite strange. I deleted the keyframe and done it again and the dialogue popped up allowing me to alter the speed no problem second time.

I apologize. Apparently I was the dumb one. It’s not easy to admit, but I was very wrong and stubborn. The second key moment is indeed further than I thought. Your video makes sense @brian and the technique you show works quite well for pinpointing the start and, most importantly, the end of a slow-down or a speed-up on the very first try.
Thanks :+1:

1 Like

The biggest obstacle is that changing the clip length requires closing and reopening the clip - which is a heavy operation that we would not want to do while dragging a keyframe. Also, there are other complications: like what to do if the clip can not be lengthened because there is another clip after it in the timeline. For these reasons, I think that automatically re-setting the clip length would not be possible.

I think this is solved by increasing the duration of the clip. “work around” or “workflow” could be debated terms.

I am glad you did not give up. Watching you learn through this process has helped me understand a user’s thought process and workflow. Some ideas that I take away from this thread:

  1. Need a better way to “lock” the source time (value) of a keyframe. “Alt” works when dragging, but not for the “set speed” buttons
  2. Maybe there needs to be an option to “lock keyframe values”
  3. Similarly, maybe there should be a way to “lock keyframe positions”
  4. The current “set speed” buttons accomplish the speed by changing the keyframe value (y-axis). Maybe they should be changed to achieve the speed by changing the keyframe position (x-axis). Or maybe there should be 4 buttons:
    • Set speed before by changing input time (y-axis)
    • Set speed before by changing output time (x-axis)
    • Set speed after by changing input time (y-axis)
    • Set speed after by changing output time (x-axis)
  5. “Ripple keyframes” would be useful when making adjustments after the user has already worked from left-to-right
  6. I would still like to find some better ways to help the user visualize what is happening without completely redesigning the whole keyframe UI with fancy graphics. Like maybe labeling the x/y axis or adding a more informative tooltip while dragging.
3 Likes

Okay so maybe not automatic. How about then having a button somewhere in the Time Remap filter that would update the length of the clip according to what has been done with the speed of the clip? So it’s a sort of manual update that lengthens or shortens the clip just enough to always have enough footage for a 1x speed at the end if the user wants.

If that could be done then the user can see that option there and also be able to move clips out the way if needed before pressing the button. Although I would think that the Ripple button would handle that but…

Just add the x or y choices in the Set Speed sub-menu that pops up after clicking the < and > buttons.

Instead of labeling them x or y it should be very direct with what they mean. So it should say like “Time” for x and “Frame” for y. In fact, the Time parameter’s name should be changed to “Frame”. Even though that is the time, it’s actually noting specifically the frame that comes in at that time in the original clip. Because no matter what change is made to the speed of the clip that frame number (i.e. the Time parameter) does not change. And that makes sense because it’s useful for the user to identify that frame whenever they want it.

@brian, is any of what I wrote in the post just above this one being considered?

I think some of the ideas are still on the table. I had mentally moved on from the time remap filter to work on bug fixing and stability.

I do not want to allow a filter to modify the length of a clip. I think that would be complicated and prone to bugs and user support issues.

This idea is compelling to me.

This also seems reasonable. It will be tricky to make space available for axis labels without making the UI seem cluttered.

That’s good to hear. :slightly_smiling_face:

The reason I suggested this is because the length of a clip constantly updating as changes are made in time remapping/speed ramping features is common among video editors. That update in the length of clips results in something very important which is the natural ability for the clip to easily go right back to 1x speed.

Probably the most common effect of any time remapped/speed ramped clip is that a section of footage is speed up and/or slowed downed multiple times before smoothly landing back at 1x speed which will then seamlessly connect with the next clip that hasn’t been modified with any speed effects.

The Time Remap filter here wasn’t designed with this in mind unfortunately so that’s why I was suggesting at least a button to automatically give the slack to get the 1x speed at the end of the clip. But since you are saying that isn’t an option I have another idea which I hope is possible.

When you move a keyframe left or right after some keyframes before it have had speed changes made, moving it back to exactly 1x almost never happens. Depending on what was being done before it it can get close (e.g. 0.97988x, 1.00710) but it will never get back to 1x by just dragging which means it won’t ever seamlessly connect to the next clip with no speed changes. My idea is to program it so that when a keyframe is moved and it gets very close to 1x it will settle to 1x and not at a speed that is close to 1x. Is that possible? An alternative could be to do it with the set speed button with an x-axis option but that really should be an additional option for this specific use case. The ability to go back to 1x speed is almost always part of the natural design of time remapping/speed ramping features so at the very least Shotcut should offer some kind of way to get a keyframe back to 1x speed with the least amount of effort possible which means not much clicking around.

So a scenario would be that after several speed changes have been made on a clip, the user would lengthen the clip out, grab the last default keyframe and while holding Alt just drag it to the right until the Speed counter hits 1x then finally shorten the clip to end on that last keyframe so that it will seamlessly connect with the next clip.

What do you think?

1 Like