Bug 365887 - git master: internally added (mix/composite) transitions getting out of sync with project and producing large overhead
Summary: git master: internally added (mix/composite) transitions getting out of sync ...
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Effects & Transitions (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Vincent PINON
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-20 09:09 UTC by Wegwerf
Modified: 2016-07-26 08:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wegwerf 2016-07-20 09:09:16 UTC
I've written a Kdenlive project XML analyzer (which is nothing more than a tricky XSLT stylesheet at this time) and put several of my both older and newer Kdenlive projects to the test.

There is basically no project of mine where the internally added transitions match the project's timeline track setup. Internally added audio mixers usually are mostly fine, with the exception of the mixer for the topmost track missing (yet this is been fixed recently, thank you!). However, I still see several projects where some mixers are missing and some are duplicates ... and this in particular explains the erroneous behavior of some of my older projects.

But when it comes to internally added compositing transitions then things get out of hand. A recent project I just started some days ago has 234(!) internally added composite transitions for only 9 timeline tracks.

I would thus like to propose that Kdenlive does some sanity cleanup whenever loading a project. In particular, all existing internally added transitions (both mixers and compositors) should be removed and only then all necessary internal transitions be built up right from the ground according to the current track setup.

This would have several advantages:
0. no more fornicating internally added compositing transitions, 234 compositing transitions for only 9 tracks surely shows that this is quickly getting out of control.
1. after loading all projects return to a well-known (minimal) state. If in doubt, save and reload.
2. no more difficult to track mixing or compositing issues and bug reports.
3. automatic upgrade to new compositors, qtblend in particular.
4. easy change between movit-based and cpu-based internal compositors.

Reproducible: Always
Comment 1 Jean-Baptiste Mardelle 2016-07-20 11:14:30 UTC
Git commit 7fc205aef2becccbd866b9d91926e725cf95e83c by Jean-Baptiste Mardelle.
Committed on 20/07/2016 at 11:14.
Pushed by mardelle into branch 'Applications/16.08'.

Rebuild composite transitions on track add/remove and enable/disable
Fix memleak on audio mix transition

M  +4    -6    src/timeline/customtrackview.cpp
M  +7    -0    src/timeline/headertrack.cpp
M  +1    -0    src/timeline/headertrack.h
M  +25   -8    src/timeline/timeline.cpp
M  +2    -0    src/timeline/timeline.h
M  +16   -25   src/timeline/transitionhandler.cpp
M  +1    -1    src/timeline/transitionhandler.h

http://commits.kde.org/kdenlive/7fc205aef2becccbd866b9d91926e725cf95e83c
Comment 2 Jean-Baptiste Mardelle 2016-07-20 11:18:37 UTC
I now changed the code to delete and rebuild internal composite transition on each track add/delete and also on enable/disable track composite. Should fix the issue, please test and report.
Comment 3 Jean-Baptiste Mardelle 2016-07-20 11:20:25 UTC
Also, when rebuilding the transitions, it will automatically use qtblend if available so when opening an older project, disabling/enabling a composite will automatically switch to qtblend.
Comment 4 Wegwerf 2016-07-20 15:52:31 UTC
Jean-Baptiste, will gladly test on my "horror" project and later report back. In any case, thank you very much for tackling and fixing this! While it may appear to be a hidden issue, squashing it will improve the perceived overall quality of Kdenlive.
Comment 5 Wegwerf 2016-07-20 18:06:31 UTC
So the jury's in for the verdict:
+ internally added compositing transitions are now properly rebuilt. I threw some of my bad projects at Kdenlive, added a track, and voilà! correctly fixed.
- audio mix transitions are not correctly rebuilt, and I still have several projects with broken mixer transitions. For instance, my horror project #5 still has a duplicate audio mixer on it's topmost audio track.

Also, I'm seeing spurious crashes when trying to load these projects. Unfortunately, running under gdb control didn't yield yet useful stack information as of what the problem is.
Comment 6 Wegwerf 2016-07-26 08:45:48 UTC
I think we can now close this bug report with the recent changes on rebuilding audio and video internally added transitions on track insert/remove and composite mode changes. Jean-Baptiste, thank you very much for taking care of this hidden bug and fixing it!