Adding something analogous to an LFO for keyframes?

I’m not primarily a video editor, so I’m borrowing terminology from DAWs that I do work with a lot, and it’s because I’ve run into a specific use case that could help me skip a whole bunch of manual work.

A simplified explanation of what I’m trying to achieve: I’m trying to “scroll” a static image in a specific direction for a couple seconds, before switching to a different direction, for a couple seconds, etc., so the way I AM able to do that is to create a bunch of video tracks that are scrolling in those directions (the 8 total being the cardinal 4 directions + their diagonals). The issue I’m running into is that there isn’t a way to do them “endlessly”, easily. I’m using “Size, Position & Rotate” and adding keyframes on the X and Y positions to “scroll”. I’d like to reset to the base X and Y positions after the duration, but there’s already a keyframe there for the end positions. And, at least for my case, I’m just repeating this pattern for the same duration for the whole runtime of the video, hence the suggestion about an LFO.

Specific numbers/details about what I’m doing:

  • 1920x1080, 60 FPS video
  • the aforementioned static image is 2880x2040
  • the X and Y base position I mentioned is at (-480, -480), so I always start the scrolling from the center of the static image
  • the scroll goes 480 pixels in the 8 different directions over the duration of 4 seconds, and I’d like it to just reset back to middle and do the same thing

Does “LFO” stand for Low Frequency Oscillator?

This is not what your asking for, but in the past people have requested copy/paste for keyframes. That would at least speed up the manual process.

Yes! Sorry, I should’ve clarified that. A more relevant article would be the timing patterns in the image here. I’d love to apply that pattern of values in Shotcut.

My main problem is I’d like the values to follow a pattern like the sawtooth wave, and it isn’t possible to have multiple keyframes at the same exact time marker AFAIK. I think what I’ll do for now is to save the keyframe value 1 frame before I need it to restart the pattern, and then go back to the base position right at the restart of the pattern. I think that should actually be seamless.

If you’re looking for another program to check out that has LFOs, my own reference is FL Studio.

You don’t need an oscillator. A lot of graphic tools allow for expressions to parameters. I think some of our FFmpeg avfilters might support them; however, not as exposed in our UI. Shotcut has a custom filters and script API. In theory, you can make a custom copy of a filter UI to either allow an expression instead of number for an avfilter, or to add buttons that compute a bunch of keyframes. Something like the latter is already done for the motion tracker integration, for example.

That sounds pretty difficult, but cool! It’s not the MOST important thing since there is capability, but I do think there is room for improving the keyframe workflow in general, especially from the perspective of a DAW user, this was just one of those possible ways to do so.