Keyframes resetting when clips interacted with (v26.9.27)

So this is a bit difficult to explain, but I’ll try my best.

I have a text preset filter specifically for creating YouTube shorts. This preset obviously sets the style, but I use keyframes on the “position and size” values too. This allows me to create a “bounce” effect as each word pops up, which works perfectly.

So I use the subtitle feature and then use “Generate Text on Timeline” and when I’m asked to select a text style preset, I select the one I just mentioned above.

It works perfectly when I do this, but as soon as I interact with any clips (literally just clicking on them) that are shorter than the full keyframe range (e.g. the “final” keyframe is beyond the clips length), the final keyframe resets everything to 0 in the filter, causing the text to just disappear instead of the bounce effect happening.

Again, it works perfectly fine if I don’t interact with the clip. The expect behaviour happens, which is the clip just ends midway between the first and final keyframe, as the keyframe is beyond the clips length.

I need to be able to edit some of the clips afterwards so I can change things like colours for specific words, but right now that’s not possible due to the keyframes breaking when I go near the clip.

I’ve put together a small pack if anyone else wants to verify. Open the project and play from the start without touching any of the clips in the timeline, everything will work fine. Then click on one of the clips in the v3 track such as “several” and check how the text no longer works.

TJGM Sub Test.zip (667.4 KB)

Here’s how the final video looked on YouTube, but I would’ve liked to have changed the colours of some words.

EDIT: Also, unrelated but instead of making a new thread, here’s an additional suggestion that I’d really appreciate. I achieve the “word by word” subtitles using the tool autosubs. As far as I know, this just downloads models for subtitles the same way Shotcut does, but it has an option for generating subtitles word for word. A feature like this would be great in Shotcut, especially for making shorter form content like this.

I like what you are doing here. Shotcut has a limitation in that it does not recognize keyframes that are positioned past the end of the clip/filter. I bookmarked this topic so I can come back and try to make it work better.

The best workaround I could find is to add a keyframe at the end of the filter. It takes a few clicks and is not very convenient.

  1. Click on the text clip in the timeline
  2. In the keyframes panel, click on the “next” keyframe arrow to put the cursor at the end
  3. Click on the “new keyframe” button to add a keyframe at the end of the clip

Until this issue is fixed, you can also try this workaround if there are only a few words that need a color change: You can open the MLT file in a text editor and change those colors manually.

  • Open the TJGM Sub Test.mlt file in your preferred .TXT editor.
  • Look for one of the subtitle word you want to edit. For example in the MLT file, for the word SEVERAL look for this line: <property name="argument">SEVERAL</property>
  • A few lines below, you’ll find this line:
    <property name="fgcolour">#ffffffff</property>
    This is the text color (foreground color) of that word.

  • Change the color value to any other color.
  • Repeat for the other words you want to edit.
  • Save the .MLT file.

Back in Shotcut:

  • Go to File > Close.
  • Re-launch the project and play the Timeline.

Not an ideal solution since I’d have to fix the final keyframe anyway, but thank you for the suggestion.

Oddly enough, I’m pretty sure I sometimes copy filters with keyframes to shorter clips in other instances and the keyframe that’s beyond the clip doesn’t break, although it’s been a while since I’ve done that.

If a solution does come up, I hope keyframes don’t just go to the end of the clip when pasted, as sometimes it’s useful to extend the keyframe beyond the range of the clip (different speeds and whatnot).

Thank you for replying anyway, I hope you can come up with a solution. I really appreciate all the work you all put into Shotcut, I’ve been using it for years to build a YouTube channel and editing is literally my favourite part because Shotcut is so nice to use. I always look forward to future updates.

@MusicalBox that’s actually not a bad idea, I’ll do that for now until a solution comes up. Thank you!

Great workaround. But @musicalbox, may I offer a slight correction to what you say:

As far as I understand it, it is the LAST two f’s in the 8-digit hex code that denotes the opacity, and the FIRST 6 digits which give the color.
So: ff at the END means 100% opacity,
bf at the END means 75% opacity,
80 at the end means 50% opacity,
40 at the end means 25% opacity,
and
00 at the end means 0% opacity (invisible).
NB - If you don’t want to bother with opacity, just use a 6-digit color code, eg. #ffffff. Unless I’m mistaken…

You scared me there for a minute Jon :anxious_face_with_sweat:
I tested again and in an MLT file:

  • The first two digits indicate the alpha value
  • The last six digits indicate the color value.

According to our friend Gemini:

When added to an 8-digit hex color code, the alpha value is placed at the end for standard web and CSS usage (#RRGGBBAA), or at the beginning for Android/Kotlin formats (#AARRGGBB).

Oh darn, I got it wrong! Sincere apologies. I assumed it was normal HTML/CSS protocol. Please ignore me! :roll_eyes:

It is due to using Qt for many years before it became possible in CSS