Bug 404680 - timeline refactor 2019-02-21_Composition effect issues.
Summary: timeline refactor 2019-02-21_Composition effect issues.
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-22 06:05 UTC by Evert Vorster
Modified: 2019-12-02 07:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
fritzibaby: timeline_corruption+


Attachments
Screen capture (333.00 KB, video/quicktime)
2019-02-24 05:48 UTC, Evert Vorster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evert Vorster 2019-02-22 06:05:07 UTC
SUMMARY
The composition effect is only applied from the first frame of a clip down to the next clip. This makes sense only in about 50% of the cases where I need a transition composition. 


BACKGROUND STORY
When doing cross fades in audio included in video clips, it is easy and quick to use two video and two audio tracks, and then just let the videos alternate on the tracks. This means that 50% of the time I want to do a cross fade the video I want to fade to is on the video track above. When I select the top clip and add composition, the composition effect is generated properly. 

However, when the video clip is below the previous one is where the fun starts. 

When I select the bottom clip and add the composition, the composition is automatically added between the video clip and it's audio track, which makes no sense. I cannot imagine a case where one would want to have a composition between video and audio. 

If I select the top clip, and add the composition, then the composition is generated from the first frame of the top clip to the last frame of the previous clip. However, I want to generate a composition from the first frame of the bottom clip to the last frame of the top clip. 

So, I drag the composition over to the end of the top clip, aligning the last frame of the composition with the last frame of the top clip. Now I find out that the first frame of the composition is not adjustable by dragging the mouse. 
So, I align the first frame of the composition with the first frame of the bottom clip, and then I am able to drag the last frame of the composition to align it with the last frame of the top clip. 

So, there is a workaround. Unfortunately the first time I tired this my UI froze. I have not been able to replicate the UI freeze again, but there are a few UI bugs in adding compositions. 

In my latest test of the timeline refactoring branch today, I found it quite stable and use-able.


STEPS TO REPRODUCE
0. Generate a new project with at least two video and two audio tracks.
1. Add three video clips with audio to the timeline.
2. First video clip to the bottom video track
3. Second video clip to the top video track
4. Thirds video clip to the bottom video track
5. Move clips so that they overlap by a few frames. 
6. Select video clip 3
7. Righ-click and add composition

OBSERVED RESULT
Composition added between video clip and it's own audio track.

EXPECTED RESULT
Composition added between top and bottom video clip, extending from first frame of bottom clip to last frame of top clip.

SOFTWARE/OS VERSIONS
Arch Linux, updated on 2019-2

ADDITIONAL INFORMATION
1. I seriously miss being able to add a composition by just dragging on the clip.

2. First frame of the composition should be adjustable by dragging the front of the composition.
Comment 1 Jean-Baptiste Mardelle 2019-02-22 15:01:15 UTC
Git commit 9699ba9d463c967fa42ba982089b8b356587eac1 by Jean-Baptiste Mardelle.
Committed on 22/02/2019 at 15:01.
Pushed by mardelle into branch 'refactoring_timeline'.

Improve composition insertion:
Correctly insert composition with lower track in some cases
Improve composition duration detection
Autodetect if composition should be inverted

M  +1    -1    data/transitions/composite.xml
M  +8    -3    src/timeline2/model/compositionmodel.cpp
M  +1    -0    src/timeline2/view/qml/Clip.qml
M  +2    -1    src/timeline2/view/qml/ClipMenu.qml
M  +44   -5    src/timeline2/view/timelinecontroller.cpp
M  +2    -1    src/timeline2/view/timelinecontroller.h

https://invent.kde.org/kde/kdenlive/commit/9699ba9d463c967fa42ba982089b8b356587eac1
Comment 2 Evert Vorster 2019-02-23 06:32:24 UTC
Of all the ways that I saw to fix this bug, I really did not expect this one. 

Thanks for looking at the bug, JBM. 
Some issues remain, though. 

1. It's not possible to just add a composition between the clip 2 & 3 in my example without adding a composition between clips 1 & 2 first.

2. There are still some cases where Kdenlive creates a compostion between a video and audio clip. This does not make sense to me, at all.




What is intuitive for me would be to make a composition to be applied from the first frame of the selected clip to the last frame of the overlapping clip, and then just detect whether that clip is above or below the currently selected clip. That would solve issue 1. 

Issue 2 to me is just an error, like not finding an overlapping clip, we also need to check that the overlapping clip is indeed a video clip. ;)

Thanks, again, for looking at this bug. 
Yes, I am trying to crash kdenlive on purpose, that's the point of testing, right? I crash it so others don't have to! :D
Comment 3 Jean-Baptiste Mardelle 2019-02-23 10:15:32 UTC
I cannot reproduce issue 1. It works correctly for me :
Right click on clip 2 on the area above clip 3, insert a composition it produces the expected result. You can also simply drag from the compositions list and drop on clip 2 above clip 3. Can you give details about how to reproduce your problem?

Regarding compositions over audio track, that should not happen, if you can find a way to reproduce it would help
Comment 4 Jean-Baptiste Mardelle 2019-02-23 12:34:06 UTC
Git commit 79504634c1eae046538a9c0a5f49309a086f91f3 by Jean-Baptiste Mardelle.
Committed on 23/02/2019 at 12:33.
Pushed by mardelle into branch 'refactoring_timeline'.

Don't allow dragging a composition on an audio track

M  +1    -1    src/timeline2/model/timelinemodel.hpp
M  +6    -2    src/timeline2/view/qml/timeline.qml

https://invent.kde.org/kde/kdenlive/commit/79504634c1eae046538a9c0a5f49309a086f91f3
Comment 5 Evert Vorster 2019-02-24 05:48:51 UTC
Created attachment 118331 [details]
Screen capture

Why does kdenlive allow me to generate a composition between a video and audio clip?
Comment 6 Evert Vorster 2019-02-24 05:56:29 UTC
Now that I have played with the interface a little more, I concede that point 1 is properly fixed. 

Looks like if you right-click in the overlapping area between two clips, the composition is generated in the right place and range. If you right-click somewhere between the overlaps, the composition is made from that point onwards. 

This works, but is a little unusual for me as I am not used to the fact that the position of the right-click would have any influence on where the composition would be inserted. 

However, I see where you are going with this, as now it is only a short way to re-implementing adding of compositions with a left click on some sort of hotspot. The hotspot used to be a green dot, if I remember correctly. 

Issue 2 still remains, and I have attached a little screen grab to illustrate my point. 

Thank you very much for looking into this bug.
Comment 7 emohr 2019-02-25 19:13:19 UTC
Hi Evert. About issue 2. I opened issue https://invent.kde.org/kde/kdenlive/issues/69.
Comment 8 emohr 2019-02-25 20:23:21 UTC
Hi Evert. See the comment from JBM here: https://invent.kde.org/kde/kdenlive/issues/69.

Do you have a good Idea?
Comment 9 Evert Vorster 2019-02-26 04:00:55 UTC
Hi there!

Replying to the mail as I don't feel like registering just to have my say.

We can have a vote as to which composition we would like.

For me, there are only three types of transition I use between clips.

1. Instant cut from one clip to the next
2. Fade to black/Fade from black
3. Crossfade between the two video clips.

Sometimes I use a combination of 2 & 3

1. requires no transition
2. can be done by adding fade to and from black as is done now

Which leaves only 3, the crossfade as an option. If we could add that as the 1-click transition I would be happy, as it saves me quite a bit of time.

In the old kdenlive I achieved crossfade by applying affine, and then change opacity with keyframes.

In the newer kdenlive I use composite and transform to achieve the same effect. It seems that is the only transition currently available, I assume more will be added later?

Kind regards,
Evert Vorster

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, February 25, 2019 10:23 PM, emohr <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=404680
>
> --- Comment #8 from emohr fritzibaby@gmx.net ---
>
> Hi Evert. See the comment from JBM here:
> https://invent.kde.org/kde/kdenlive/issues/69.
>
> Do you have a good Idea?
>
> ------------------------------------------------------------------------------------------------------------------
>
> You are receiving this mail because:
> You reported the bug.
Comment 10 emohr 2019-02-26 18:40:46 UTC
Hi Evert. Thanks for the feedback.
Comment 11 Evert Vorster 2019-12-02 07:06:18 UTC
This one is fixed, thanks JBM