Add keyframes to hue/lightness/saturation filter

I want to fade out a clip by increasing the “lightness” parameter, but there’s no keyframes in the “hue/lightness/saturation” filter like there are in similar filters like “levels”, “brightness” (apparently not the same as lightness), “color grading”, or even “saturation”. Thanks!

1 Like

Hi @bjbj
I support your suggestion (it might have been already proposed before though), but in the meanwhile, maybe this workaround will work for you:

  1. Add a white clip above the clip you want to fade with lightness
  2. Apply a Fade In to the white clip (And possibly Fade Out to make a transition)


https://streamable.com/j7zjbe (If the Streamable preview no longer work, try this link)

2 Likes

Here is a new use for what is explained at this link

Then @Austin recommended a solution based on the above to apply to the white balance filter.

We can then use some filters that do not incorporate keyframes and control them by keyframes through opacity.
In your particular case, you replace point 3 in the following list (LUT) with hue/lightness/saturation and it works like this.

  1. Mask: Simple Shape with Width and Height = 100%
  2. Opacity (here is where you adjust intensity including keframes)
  3. LUT (or other filters)
  4. Mask: Apply

BxLwudImaJ

I adjusted the filter with the following values:
hue (200%) lightness (200%) saturation (0%)
The mask is set to the simple shape, add, width, and height 100%.

2 Likes

Why was this moved from “Suggestion” to “Help/How To”?

Thanks for the suggestions, and I’ve tried similar things, and I’ll figure out some approximation for my project (if keyframes haven’t been added before I finish it), but they don’t give quite the same effect as changing the “lightness” parameter.

50% white opacity:

150 lightness:

It has been corrected. I thought it was a request for help to get a result.
Sorry for the misinterpretation.

I am not a developer and cannot speak for their priorities, but keyframe support is probably unlikely. The underlying HLS filter is in avfilter (as opposed to frei0r or MLT native), and therefore does not directly support keyframing. Using the tricks provided above (mask + opacity + lightness then keyframe opacity) is probably the best workaround for now.

1 Like

You’re right, my suggestion does not achieve quite the same result.

The closest I could get to Lightness at level 150 is using Color Grading with these settings:
(clic on the first image and use the arrows to switch between the 2 images)


But @Austin is right, your best option is the solution proposed above by @ejmillan

libavfilter supports keyframing, but it is not implemented by shotcut.

Right, that’s what I meant by “not directly supported”. avfilter can do it, but Shotcut doesn’t use it. I doubted that custom code would be written to make the HLS UI work with avfilter keyframing in the near future. I can see how my wording was ambiguous as to which layer lacked support. Great to see you around again.

Do you mean by using the ffmpeg send_command interface between each frame? Or is there another way to implement keyframes?

via commands there is also bypass by using command for enable option by setting it to 0 for current frame. This will work fine for CFR videos.

To follow up, what I ended up doing was putting a black to white dissolve transition on the track above and using the “add” blend mode. This produced essentially the same “lightness” fade out effect I was looking for.

This topic was automatically closed after 90 days. New replies are no longer allowed.