Incorrect behavior of Opacity filter with dissolve transition


#1

Hello, I believe this behavior should be classified as a bug unless it’s by design which needs to be confirmed, of course.

How to reproduce:

  1. Create 2 video tracks. The bug is not about the number of tracks but the second track makes it easily visible.
  2. Add one clip on the top video track and any not blank image on the bottom track.
  3. Cut the top track into 3 clips and apply the opacity filter of 50% to the middle clip.
  4. Produce cross fade dissolve transitions between middle and left and right and middle clips.
  5. Move the image on the bottom track underneath the middle clip with the opacity effect and resize it so its duration is the same as the middle track plus both transitions.
  6. Play the video starting anywhere before the left (first) transition.

Observed behavior reproduced consistently:

The video will not smoothly transition on the left side of the middle clip but will smoothly transition on the right side of the middle clip.

Expected behavior: smooth transition on both sides of the middle clip with reversed effect: smooth fade in of the background image on the left and smooth fade out on the right.

This effect does not happen with other filters, for example, the blur filter and/or text filter will work smoothly (fade-in on the left and fade-out on the right).

Problem scope:
I haven’t tried with all existing filters, but the opacity filter definitely has a problem. I guess something in the transition algorithm incorrectly calculates the pixels when the opacity on the right side of the transition is less than 100%.

Is this urgent? I guess not, because it can be worked around by creating two tracks with the same content and applying fade-in/fade-out filters manually, which is doable but really time-wasteful and error-prone.

So, because some other filters work (which is really nice especially when adding a text filter) I suppose the approach is correct but something was not tested with the opacity filter. Just wanted to let you know.


#2

I reproduced this issue. It is a bug. Used color clips for the video because it’s easier to see the problem.

https://streamable.com/vqf5v

image


#3

I posted on this problem a few days ago. I too can reproduce a problem. Occurs with fades and dissolves.

-=Ken=-


#4

In case this saves anyone some time if/when they go to work on this bug: I don’t think this is a bug related specifically to the filter part of the Opacity filter, because I can recreate the examples using color clips that have less-than-FF alpha values. Going from a lower alpha value to FF seems to work fine (or maybe I just can’t tell), but going from totally opaque or partially opaque to partially opaque seems to end up with the wrong alpha value/blend/something at the end of the transition.


#5

Was going to file a new Topic, but I’m guessing this is the same issue.

  • Shotcut Version number: 18.06.02

  • Shotcut Settings:

    • GPU Effects (Experimental) enabled: No
    • Video Mode: Automatic
    • Display Method: OpenGL
  • Operating System: Windows 8.1

  • Computer Specifications:

    • Processor: Intel® Core™ i7-4702MQ CPU @ 2.20GHz, 2201 MHz, 4 Core(s), 8 Logical Processor(s)
    • Installed Physical Memory (RAM): 16.0 GB
    • Available Physical Memory (RAM): 5.10 GB
  • Screenshot of Shotcut:

  • Source File(s) Specifications:

    • Codec/Extension types: PNG 32bpp
    • Resolution: 1280x640
    • Frame rate: n/a
    • Bit rate: n/a
  • Export File Specifications: n/a

  • MLT file: transition_error.zip (40.8 KB)

  • Did you watch all of the Tutorials?: Yes

  • Did you read the FAQ? (Frequently Answered Questions): Yes

  • Did you search the forum for your issue?: Yes

  • Post Type: Bug

  • Provide steps that anyone could follow to recreate the problem:
    Given two images with alpha:

    1. Add image A to the timeline
    2. Add image B to the timeline next to image A
    3. Drag the clip for image B partially over the clip for image A to generate a transition
  • Observed behavior: Clip B fades in, but clip A does not fade out.

  • Expected behavior: Clip B fades in while clip A fades out.
    4. Change transition type to e.g. “Bar Horizontal”

  • Observed behavior: Clip A remains on screen with clip B effectively being masked off by clip A. The transparent parts of clip B are no longer transparent.

  • Expected behavior: A transition between clips A and B that do not alter transparency of the original clips.

  • Workarounds:

    • For the ‘Dissolve’ transition: place both clips overlapping on separate tracks, and use the Opacity filter with Keyframes to animate each clip’s opacity.
    • For several other basic transitions: place both clips overlapping on separate tracks, and use the Mask filter with keyframes to animate a shape masking the clip.
    • For complex transitions: TBD

#6

I’m having this same issue with the most current version, 19.01.27 (as of 2/13/19). However, in my case, the only transition that works when the first clip is transparent or opaque is “dissolve”. None of the other transition type function properly.


#7

I reproduced this bug and found the source of it. I am working on the fix, but there may be reduced performance as a result.