Bug 498338

Summary: Second Transform effect offsets scaled down images/videos.
Product: [Applications] kdenlive Reporter: nuxttux
Component: Video Effects & TransitionsAssignee: Jean-Baptiste Mardelle <jb>
Status: CONFIRMED ---    
Severity: normal CC: fritzibaby
Priority: NOR Keywords: triaged
Version First Reported In: 24.12.0   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description nuxttux 2025-01-07 01:09:12 UTC
SUMMARY
When working with video/image with a different aspect ratio than that of the project, adding a second Transform after having scaled & moved video/image with a first Transform, the second Transform automatically offsets the position and/or scale of video/image.

STEPS TO REPRODUCE
1. Video must have different aspect ratio to that of the current project.
1. Add video/image to timeline.
2. Add Transform effect to video/image on timeline.
3. Scale down video/image and move it.
4. Add second Transform to video/image. 

OBSERVED RESULT
The video/image becomes offset without any changes being applied to second Transform.

EXPECTED RESULT
The video/image should remain as it is until changes are applied to it.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 6.9.0
Qt Version: 6.7.3

ADDITIONAL INFORMATION
Either an offset is added to video/image or the scale is altered or the resolution declines - or a combination of the three.
Comment 1 emohr 2025-01-07 18:10:09 UTC
Thank you for reporting. I can confirm the issue. Following your steps.
Comment 2 Jean-Baptiste Mardelle 2025-01-16 08:33:58 UTC
Thanks for your report. I have a patch ready for MLT to fix this issue, but would appreciate some testing before merging my fix. Could you please test this AppImage to see if it fixes the problem and if the "transform" effect and "Composite and Transform" transition behave as expected and rendering works as expected on existing projects ?

AppImage: https://files.kde.org/kdenlive/unstable/kdenlive-master-qtblend-x86_64.AppImage.mirrorlist

Thanks for your help.
Comment 3 nuxttux 2025-01-16 13:03:21 UTC
I downloaded and tested the AppImage "transform" effect and "Composite and Transform". The offset caused by second transform has been fixed - although adding a second Transform (to a scaled down media), reduces the quality / clarity of said media (introduces blur).
Comment 4 emohr 2025-01-16 17:22:36 UTC
Tested with a picture, size 5152x3864

I can confirm that the offset caused by a second transform has been fixed.
I don't see any blur when adding a second transform.
Comment 5 nuxttux 2025-01-16 17:38:01 UTC
To test the blur:

1. Add first Transform to image.
2. Scale down image to 30%.
3. Add second Transform to image.

Zoom in on monitor for a closer view.
Comment 6 emohr 2025-01-16 18:21:19 UTC
Yes, you are right. Following your steps, I see that the image gets blurry.
Comment 7 Jean-Baptiste Mardelle 2025-01-17 13:59:42 UTC
I think I fixed the blur when a second transform was added. Can you please test again with the latest daily build:
https://cdn.kde.org/ci-builds/multimedia/kdenlive/master/linux/
Comment 8 nuxttux 2025-01-17 20:34:59 UTC
I tested it - The blur has significantly been reduced. 
There's a minuscule shift in the pixels - for some images. I tested with 4 images.