Bug 424944 - Multiple Effects produce unexpected clipping
Summary: Multiple Effects produce unexpected clipping
Status: CONFIRMED
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Effects & Transitions (show other bugs)
Version: 20.08.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Vincent PINON
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2020-08-02 21:05 UTC by Cyril Giraud
Modified: 2024-10-26 13:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
fritzibaby: Brainstorm+


Attachments
Project and PDF to describe kdenlive_multiple_effects_and_losed_regions (37.31 KB, application/gzip)
2020-08-02 21:05 UTC, Cyril Giraud
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cyril Giraud 2020-08-02 21:05:26 UTC
Created attachment 130594 [details]
Project and PDF to describe kdenlive_multiple_effects_and_losed_regions

SUMMARY

When 1st effect moves out of video a part of picture that is moved in again by second effect, moved out part is lost.


STEPS TO REPRODUCE
1. New project, create a white color clip, and move it to timeline.
2. Add 1st Effect "Position and Zoom", and set X to half image (ex 960 for full HD video)
3. Add 2nd Effect "Rotate" and set Rotate X to -300

OBSERVED RESULT
In Project Monitor, all video corner are black.

EXPECTED RESULT
In Project Monitor, upper right video corner should be white.

WORK AROUND THAT FAILED
Switching effects order in stack would produce an other result, but an other region is lost (upper left corner of white square, in the center of the video).

SOFTWARE/OS VERSIONS
Linux Ubuntu Studio 20.04 64 bits + kdenlive stable ppa up-to-date.
Kdenlive Version 20.04.1
KDE Frameworks 5.68.0
Qt 5.12.8 (construit sur 5.12.8)
Le système de fenêtres xcb

ADDITIONAL INFORMATION
. When multiple transformation effects are stacked, a virtual larger video size should be used temporary between effects to avoid losing regions.
. Automatic computing of virtual video size may be quite difficult. 4 pixel values could be user defined in stack effect to extend right, lift, upper and bottom normal video.
. Changing those values should not require to modify any effects settings to get the same result (unless regions that should no more being lost).
. Alternative solution: one mega keyframable effect that combines all transformation effects at once to limit virtual extended video size handling to this single effect (at least: Crop, Scale and Tilt; Rotoscoping; Position and Zoom; Rotate and Shear; Corners).
Comment 1 emohr 2020-08-07 15:37:08 UTC
Please try with the current Kdenlive AppImage version 20.04.1b to see if there are any packaging issues https://files.kde.org/kdenlive/release/ 

If the problem/issue doesn't occur when using the AppImage, then it's your configuration or packaging.
Comment 2 Cyril Giraud 2020-08-21 16:35:02 UTC
Just tested with kdenlive-20.04.1b-x86_64.appimage and kdenlive-20.08.0-x86_64.appimage --> I've got exactly the same problem.
Comment 3 emohr 2020-08-21 18:08:07 UTC
Good catch. You see it even better with a video clip. Position and Zoom moves with x=960 the clip to the right. The clip gets just cut on the right side while turning with rotate instead of showing the "hidden" part. There seems to be some variable issue either in Position and Zoom or in Rotate.
Comment 4 Cyril Giraud 2020-08-21 18:30:14 UTC
Of course, this problem occurs also with video clip!
Comment 5 Vincent PINON 2020-08-21 19:22:26 UTC
I believe this is how MLT pipeline works: each filter (effect) inputs and outputs to a frame of just the size of the "consumer" profile (maybe because all modules are plugins, and maybe API is quite limited). One must organize the image operations having this in mind.
There are already some filters that do many operations at once (qtblend for example), and will probably be further expanded, but probably not up to rotoscoping.
This might be confirmed discussing on MLT mailing list or issues...
Comment 6 Cyril Giraud 2021-09-06 20:48:16 UTC
New test with kdenlive-21.08.0a-x86_64.appimage and new "Transform" effect that combines Pan, Zoom and Rotation effects. My feedback:
- it solves common problems with those 3 effects... if you use only 1 effect (combining 2 "Transform" effect, one for moving, one other for rotating, initial problem is still present... but is there a good reason to do that?)
- sometimes, I've got a hudge number of keyframes (stabilizing a video with automask effect, thanks to https://ferrolho.github.io/blog/2020-08-09/stabilizing-a-video-subject-in-kdenlive)... and wanted to modify constant zoom ratio --> because keyframe sets all parameters effect, I have to modifiy zoom factor for each keyframe...
Cheap suggestion here: https://bugs.kde.org/show_bug.cgi?id=442094
Best suggestion: allow temporary extra video resolution between effects to avoid clipping and video quality issues.