Transform on zoomed portait 4:3 image results in jumpy / jittery / unsmooth motion

I was about to file a bug, but thought it prudent to ask her first.

When I select portrait images, size to fill the width, then size +2-5% for the end keyframe on duration of 3-5 seconds, the resulting motion is jumpy / jittery / unsmooth in both kdenlive and the rendered output.

STEPS TO REPRODUCE

  1. Add portrait 4:3 image to timeline
  2. Apply Transform effect
  3. Set size to 240% on first keyframe to fill frame
  4. Add keyframe at end of timeline
  5. Set size on last keyframe to ~245% for Ken Burns effect
  6. Play sequence
  7. Notice jumpy / jittery / unsmooth motion
  8. Render
  9. Notice jumpy / jittery / unsmooth motion

Is this expected, or a bug that I should file?

You donā€™t say what size your original image is, which will have some effect on this - but it is expected and has nothing to do with the image aspect ratio or (mostly) the initial zoom, and canā€™t really be described as a bug because it is just doing exactly what you asked it to.

If you chose to do an animated zoom where the amount of zoom over the selected duration increases the size of the image by < 2 pixels per frame, then youā€™re going to have some frames where the size does not increase at all, and some where it only increases by 1 pixel, leaving it to rounding as to which pixels in which corner stay still and which move - so itā€™s somewhat unavoidable that the result will be jumpy unless you were to use a transform which upsamples the image and allows for subsample transformations, which would then have its own artifacts to annoy people with.

If you want a smooth looking zoom, it needs to increase the image size by more than just 1 pixel per frame, and until you get to a high rate of zoom, ideally by an exactly even integer number of pixels for every frame, otherwise youā€™ll still get some sort of strobing jitter, even if itā€™s mostly not perceptible.

@Ron Thanks for your detailed explanation!

My original image is 2401x3201.

While your explanation makes sense, I do note that OpenShot is able to do the transform / pan and zoom with uniformly smooth motion using the same parameters, suggesting itā€™s possible. Not sure how itā€™s accomplishing the smooth motion.

I also tried kdenliveā€™s Position and Zoom effect, but it has the same jittery motion as transform.

Iā€™m using Flatpak, but also tested with the AppImage with same results.

What project size are you using with that? MLT transformations usually operate on ā€˜frame sizedā€™ things - so if youā€™re dropping that image into say a 1080p project, then each transform step is going to be rounded to a 1x1080p pixel change rather than doing it as a 1 x 2401x3201 pixel step followed by downsampling to your target resolution (which would definitely look smoother).

If you really, really donā€™t want a faster zoom, you might get better results by starting with a larger project frame size to better suit your original image resolution, then rescaling that at render time to the output format you want.

(In the cases where Iā€™ve used this to include still images in a video, Iā€™ve generally found the slightly faster zoom looks better anyway, but I wonā€™t say thatā€™s some sort of universal truth ā€¦)

After more searching in the bug tracker, I think the issue Iā€™m encountering is probably related to this one. Unfortunately, itā€™s been open for over a year.

https://bugs.kde.org/show_bug.cgi?id=476625

Just went through the archived versionsā€¦ issue seems to have been introduced in 22.08.2. Filed Bug 497435.

If the rounding behaviour or transform coordinate scale changed between versions, that would more likely be due to a change in MLT than in kdenlive itself - since it is what actually renders those things.

So if youā€™ve got time to dig into this, Iā€™d be looking at what version of MLT the 22.08.1 and 22.08.2 appimages were built with, and looking at what changes happened between those two releases ā€¦

Thanks for the tip!

Using kdenlive > Help > About > Components

kdenlive 22.08.1 works as expected and uses:
MLT 7.9.0
KDE Frameworks 5.97.0
Qt 5.15.5
xcb (no version given)
FFmpeg (no version given)

kdenlive 22.08.2 has shakiness in transform and uses:
MLT 7.9.0
KDE Frameworks 5.98.0
Qt 5.15.5
xcb (no version given)
FFmpeg (no version given)

This suggests itā€™s not MLT.

I looked at the KDE Frameworks release notes for 5.98.0 but nothing popped out at me.

Also I noticed mention of Wayland in the 24.08.3 Componentsā€¦ my previous tests were using Wayland so I went back and tested with Xorg and got the same results, so doesnā€™t appear to be a Wayland/Xorg thing.

thatā€™s ā€¦ interesting ā€¦

kdenlive doesnā€™t really do any manipulation itself, thatā€™s all done by MLT - and you should more or less be able to just pass the .kdenlive project file to MLT to have it render the result.

You should be able to confirm that by taking your test project and using the ā€œgenerate scriptā€ option in the render dialog - then looking at what if anything is different between the 22.08.1/.2 scripts.

And then you should be able to use both those scripts to see that the problem does/does not occur not based on which appimage generated them, but which you use to render it ā€¦

It may be that the real problem change is in some dependency of MLT - or itā€™s possible the appimage is using a snapshot rather than a release version ā€¦

When you start the appimage, it unpacks all its contents under /tmp/.mount_kde* - so you can poke around in those directories to see if MLT and things it depends on really are the same (beyond just the version number they report).

Itā€™s definitely a numerical precision thing, I can see it in 24.08.3 with a test similar to what Roxane used - but itā€™s almost imperceptible at high resolutions and fairly glaring at lower ones.

Itā€™s not even impossible that it might be something insidious like the default float rounding changing in the compiler used to build it or something else low level causing precision loss for all math operations.

Ron,

Thanks again for your guidance. Hereā€™s what I have to report.

kdenlive 22.08.1

/tmp/.mount_kdenliD2CHmv/usr/bin$ ./melt --version
melt 7.9.0
Copyright (C) 2002-2022 Meltytech, LLC
/tmp/.mount_kdenliD2CHmv/usr/bin$ ls -l melt*
lrwxrwxrwx 1 root root     6 Jul 14  2022 melt -> melt-7
-rwxr-xr-x 1 root root 35928 Sep  9  2022 melt-7
/tmp/.mount_kdenliD2CHmv/usr/bin$ shasum -a 256 melt-7
d3395278934f743c4d7b3ab45b296ab7a8a316cb2b0936946e0bcf5b4d749728  melt-7

f=mp4 movflags=+faststart vcodec=libx264 crf=23 g=15 acodec=aac ab=160k channels=2 real_time=-4 preset=veryfast threads=0

kdenlive 22.08.2

/tmp/.mount_kdenliD2CHmv/usr/bin$ ./melt --version
melt 7.9.0
Copyright (C) 2002-2022 Meltytech, LLC
/tmp/.mount_kdenlirK7cZK/usr/bin$ ls -l melt*
lrwxrwxrwx 1 root root     6 Oct 17  2022 melt -> melt-7
-rwxr-xr-x 1 root root 35928 Oct 17  2022 melt-7
/tmp/.mount_kdenlirK7cZK/usr/bin$ shasum -a 256 melt-7
55920010769e02df7bf3cfdb202cabd144f8d5631312f60e3c546c5db0d75739  melt-7

f=mp4 movflags=+faststart vcodec=libx264 crf=23 g=15 acodec=aac ab=160k channels=2 real_time=-4 preset=veryfast threads=0

So melt-7 is the same size in both versions, but clearly different as indicated by the hash.

Other differences in /usr/bin and /usr/lib

/tmp$ diff -r .mount_kdenliD2CHmv/ .mount_kdenlirK7cZK/|grep Only
Only in .mount_kdenlirK7cZK/usr/lib: libcurl.so
Only in .mount_kdenliD2CHmv/usr/lib/libexec/kf5: klauncher
Only in .mount_kdenliD2CHmv/usr/lib/libexec/kf5: start_kdeinit
Only in .mount_kdenliD2CHmv/usr/lib/libexec/kf5: start_kdeinit_wrapper
Only in .mount_kdenlirK7cZK/usr/lib: libexiv2.so
Only in .mount_kdenlirK7cZK/usr/lib: libexiv2.so.0.27.5
Only in .mount_kdenlirK7cZK/usr/lib: libexiv2.so.27
Only in .mount_kdenlirK7cZK/usr/lib: libfreebl3.so.TOC
Only in .mount_kdenlirK7cZK/usr/lib: libfreeblpriv3.so
Only in .mount_kdenlirK7cZK/usr/lib: libfreeblpriv3.so.TOC
Only in .mount_kdenliD2CHmv/usr/lib: libkdeinit5_klauncher.so
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Activities.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Activities.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Archive.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Archive.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Attica.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Attica.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5AuthCore.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5AuthCore.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Auth.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Auth.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Bookmarks.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Bookmarks.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5CalendarEvents.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5CalendarEvents.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Codecs.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Codecs.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Completion.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Completion.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5ConfigCore.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5ConfigCore.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5ConfigGui.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5ConfigGui.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5ConfigQml.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5ConfigQml.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5ConfigWidgets.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5ConfigWidgets.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5CoreAddons.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5CoreAddons.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Crash.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Crash.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5DBusAddons.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5DBusAddons.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Declarative.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Declarative.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5DNSSD.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5DNSSD.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5DocTools.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5DocTools.so.5.98.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5FileMetaData.so
Only in .mount_kdenlirK7cZK/usr/lib: libKF5FileMetaData.so.3
Only in .mount_kdenlirK7cZK/usr/lib: libKF5FileMetaData.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5GlobalAccelPrivate.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5GlobalAccelPrivate.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5GlobalAccel.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5GlobalAccel.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5GuiAddons.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5GuiAddons.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5I18nLocaleData.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5I18nLocaleData.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5I18n.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5I18n.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5IconThemes.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5IconThemes.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5IdleTime.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5IdleTime.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5ItemViews.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5ItemViews.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5JobWidgets.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5JobWidgets.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5KIOCore.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5KIOCore.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5KIOFileWidgets.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5KIOFileWidgets.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5KIOGui.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5KIOGui.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5KIONTLM.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5KIONTLM.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5KIOWidgets.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5KIOWidgets.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Kirigami2.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Kirigami2.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5NewStuffCore.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5NewStuffCore.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5NewStuff.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5NewStuff.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5NewStuffWidgets.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5NewStuffWidgets.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Notifications.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Notifications.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5NotifyConfig.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5NotifyConfig.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Package.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Package.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Plotting.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Plotting.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Purpose.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Purpose.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5PurposeWidgets.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5PurposeWidgets.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5QuickAddons.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5QuickAddons.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Service.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Service.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Solid.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Solid.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5SonnetCore.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5SonnetCore.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5SonnetUi.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5SonnetUi.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Style.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Style.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Syndication.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Syndication.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5SyntaxHighlighting.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5SyntaxHighlighting.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5TextWidgets.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5TextWidgets.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5Wallet.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5Wallet.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5WidgetsAddons.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5WidgetsAddons.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5WindowSystem.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5WindowSystem.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5XmlGui.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5XmlGui.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libKF5XmlRpcClient.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libKF5XmlRpcClient.so.5.98.0
Only in .mount_kdenliD2CHmv/usr/lib: libkwalletbackend5.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libkwalletbackend5.so.5.98.0
Only in .mount_kdenlirK7cZK/usr/lib: liblcms2.so
Only in .mount_kdenlirK7cZK/usr/lib: liblcms2.so.2
Only in .mount_kdenlirK7cZK/usr/lib: liblcms2.so.2.0.7
Only in .mount_kdenlirK7cZK/usr/lib: libnss3.so.TOC
Only in .mount_kdenlirK7cZK/usr/lib: libnssckbi.so
Only in .mount_kdenlirK7cZK/usr/lib: libnssckbi.so.TOC
Only in .mount_kdenlirK7cZK/usr/lib: libnsssysinit.so
Only in .mount_kdenlirK7cZK/usr/lib: libnsssysinit.so.TOC
Only in .mount_kdenlirK7cZK/usr/lib: libnssutil3.so.TOC
Only in .mount_kdenlirK7cZK/usr/lib: libopenjp2.so
Only in .mount_kdenlirK7cZK/usr/lib: libopenjp2.so.2.4.0
Only in .mount_kdenlirK7cZK/usr/lib: libopenjp2.so.7
Only in .mount_kdenliD2CHmv/usr/lib: libPhabricatorHelpers.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libPhabricatorHelpers.so.5.98.0
Only in .mount_kdenlirK7cZK/usr/lib: libpoppler-cpp.so
Only in .mount_kdenlirK7cZK/usr/lib: libpoppler-cpp.so.0
Only in .mount_kdenlirK7cZK/usr/lib: libpoppler-cpp.so.0.11.0
Only in .mount_kdenlirK7cZK/usr/lib: libpoppler-qt5.so
Only in .mount_kdenlirK7cZK/usr/lib: libpoppler-qt5.so.1
Only in .mount_kdenlirK7cZK/usr/lib: libpoppler-qt5.so.1.31.0
Only in .mount_kdenlirK7cZK/usr/lib: libpoppler.so
Only in .mount_kdenlirK7cZK/usr/lib: libpoppler.so.124
Only in .mount_kdenlirK7cZK/usr/lib: libpoppler.so.124.0.0
Only in .mount_kdenliD2CHmv/usr/lib: libReviewboardHelpers.so.5.97.0
Only in .mount_kdenlirK7cZK/usr/lib: libReviewboardHelpers.so.5.98.0
Only in .mount_kdenlirK7cZK/usr/lib: libsmime3.so.TOC
Only in .mount_kdenlirK7cZK/usr/lib: libsoftokn3.so
Only in .mount_kdenlirK7cZK/usr/lib: libsoftokn3.so.TOC
Only in .mount_kdenlirK7cZK/usr/lib: libssh2.so
Only in .mount_kdenlirK7cZK/usr/lib: libssh2.so.1
Only in .mount_kdenlirK7cZK/usr/lib: libssh2.so.1.0.1
Only in .mount_kdenlirK7cZK/usr/lib: libssl3.so.TOC
Only in .mount_kdenlirK7cZK/usr/plugins/kf5: kfilemetadata

Also, I wanted to copy melt-7 from 22.08.1 into 24.12.0, but even after remounting the AppImage rw, the copy was denied using sudo. Any pointers on how I might try the old melt-7 with the new kdenlive?

You seem tech savvy enough to compile it from source?

In theory you can create a franken-appimage mixing and matching from both by extracting them, making the changes, then repacking the result ā€¦ in practice, that could get a little messy if not all the deps are compatible and you might need to move more than just melt, but itā€™s probably the quickest and easiest way to isolate the component actually at fault if it works.

Youā€™ll need appimagetool installed, then:

To unpack it, just run kdenlive<version>.AppImage --appimage-extract
and that should put the contents in a modifiable squashfs-root directory.

Once youā€™ve copied what you want into that, appimagetool squashfs-root will create a new appimage from the contents and metadata files in it.

Itā€™s not impossible that this is a problem introduced by a change in the compiler toolchain, so testing the existing appimage binaries that are known to (not)work takes that variable out of the loop.

If itā€™s not an ultimately ā€˜obviousā€™ change in one of those, then rebuilding both with the same toolchain will let us confirm itā€™s the toolchain - but rebuilding cleanly with all the historically same dependencies isnā€™t quite as trivial a job (though it might be something that could easily be triggered on the kdenlive appimage build farm by someone to make some test images if it gets narrowed down to that point?)

And melt has relatively few (dynamic) dependencies:

$ ldd melt-7

	linux-vdso.so.1 (0x00007ffc9e3e5000)
	libmlt-7.so.7 => /tmp/.mount_kdenliJUx4k5/usr/bin/./../lib/libmlt-7.so.7 (0x00007f50a2f94000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f50a2f75000)
	libSDL2-2.0.so.0 => /tmp/.mount_kdenliJUx4k5/usr/bin/./../lib/libSDL2-2.0.so.0 (0x00007f50a2da5000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f50a2bc4000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f50a2ae5000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f50a2ade000)
	libiconv.so.2 => /tmp/.mount_kdenliJUx4k5/usr/bin/./../lib/./libiconv.so.2 (0x00007f50a29f8000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f50a2fdd000)

so if itā€™s not a point release change in it, the build toolchain does start to get the spotlight ā€¦ Do we know if the build farm was updated between those two releases?

hmm, I guess itā€™s not impossible that itā€™s a change in ffmpeg too, and how it handles the raw frames mlt passes it (especially if itā€™s rescaling that) - but we should rule out the things closer to this sphere of influence first.

kdenlive 22.08.1

/tmp/.mount_kdenlizNlEFt/usr/bin$ ./ffmpeg 
ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (GCC)
  configuration: --enable-shared --disable-debug --disable-doc --enable-gpl --enable-version3 --enable-libmp3lame --cc=gcc --cxx=g++ --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libass --enable-libaom --enable-libdav1d --enable-libzimg --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-cuvid --enable-vaapi --enable-vdpau --enable-libmfx --prefix=/home/appimage/Craft/BC/linux-64-gcc --libdir=/home/appimage/Craft/BC/linux-64-gcc/lib
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Hyper fast Audio and Video encoder
/tmp/.mount_kdenlizNlEFt/usr/bin$ ls -l ffmpeg*
-rwxr-xr-x 1 root root 259464 Sep  9  2022 ffmpeg
/tmp/.mount_kdenlizNlEFt/usr/bin$ shasum -a 256 ffmpeg
5e229f52245409777f987e511b6e094d5ea414502cdf55c2084328302e77838b  ffmpeg

kdenlive 22.08.2

/tmp/.mount_kdenli5RrLtR/usr/bin$ ./ffmpeg 
ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (GCC)
  configuration: --enable-shared --disable-debug --disable-doc --enable-gpl --enable-version3 --enable-libmp3lame --cc=gcc --cxx=g++ --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libass --enable-libaom --enable-libdav1d --enable-libzimg --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-cuvid --enable-amf --enable-vaapi --enable-vdpau --enable-libmfx --prefix=/home/appimage/Craft/BinaryFactory/linux-64-gcc --libdir=/home/appimage/Craft/BinaryFactory/linux-64-gcc/lib
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Hyper fast Audio and Video encoder
/tmp/.mount_kdenli5RrLtR/usr/bin$ ls -l ffmpeg 
-rwxr-xr-x 1 root root 259464 Oct 17  2022 ffmpeg
/tmp/.mount_kdenli5RrLtR/usr/bin$ shasum -a 256 ffmpeg 
7688621a43ebf3f16a08cd49a3829f97d94624ebf7ec14a49d4053e8bfb1e5f9  ffmpeg

Same version, same size, but hash doesnā€™t match.

kdenlive 22.08.2 with melt-7 from 22.08.1 is butter smooth! So it seems to be a change related to melt.

What I did:

cd ~/Apps
./kdenlive-22.08.2-x86_x64.AppImage --appimage-extract

cd /tmp/.mount_kdenliQnKtOV
cp usr/bin/melt-7 ~/Apps/squashfs-root/usr/bin
cp usr/lib/libmlt-7.so.7 ~/Apps/squashfs-root/usr/lib/
cp usr/lib/libSDL2-2.0.so.0 ~/Apps/squashfs-root/usr/lib/
cp usr/lib/libiconv.so.2 ~/Apps/squashfs-root/usr/lib/
cp -r usr/lib/mlt-7 ~/Apps/squashfs-root/usr/lib/

cd ~/Apps
./appimagetool-x86_64.AppImage squashfs-root/
./Kdenlive-x86_64.AppImage

Some of the other dependencies listed by ldd werenā€™t in the /tmp/.mountā€¦ appimage path, so I had to skip copying those.

I tried the same with 24.12.0, but it seems more has changed between the releases:

~/Apps$ ./Kdenlive-x86_64.AppImage 
kf.config.core: Watching absolute paths is not supported "/tmp/.mount_KdenlialEcpN/usr/share/color-schemes/BreezeLight.colors"
kf.notifications: Failed to play sound with canberra: No such driver
kf.config.core: Watching absolute paths is not supported "/tmp/.mount_KdenlialEcpN/usr/share/color-schemes/BreezeDark.colors"
Starting render server
malloc(): invalid size (unsorted)
Aborted

Although both reported the same version number for mlt, there are differences:

kdenlive 22.08.1 = .mount_kdenliQnKtOV
kdenlive 22.08.2 = .mount_kdenlipIkC2Z

/tmp$ diff -r .mount_kdenlipIkC2Z/usr/bin/melt-7 .mount_kdenliQnKtOV/usr/bin/melt-7
Binary files .mount_kdenlipIkC2Z/usr/bin/melt-7 and .mount_kdenliQnKtOV/usr/bin/melt-7 differ
/tmp$ diff -r .mount_kdenlipIkC2Z/usr/lib/mlt-7 .mount_kdenliQnKtOV/usr/lib/mlt-7
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltavformat.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltavformat.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltcore.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltcore.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltfrei0r.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltfrei0r.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltglaxnimate.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltglaxnimate.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltjackrack.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltjackrack.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltkdenlive.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltkdenlive.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltmovit.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltmovit.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltnormalize.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltnormalize.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltoldfilm.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltoldfilm.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltopencv.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltopencv.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltplusgpl.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltplusgpl.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltplus.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltplus.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltqt.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltqt.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltresample.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltresample.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltrtaudio.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltrtaudio.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltrubberband.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltrubberband.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltsdl2.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltsdl2.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltsox.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltsox.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltvidstab.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltvidstab.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltvorbis.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltvorbis.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltxine.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltxine.so differ
Binary files .mount_kdenlipIkC2Z/usr/lib/mlt-7/libmltxml.so and .mount_kdenliQnKtOV/usr/lib/mlt-7/libmltxml.so differ

Does it work and do you get the same result if you keep the original copy of libSDL? (it shouldnā€™t be affecting this, but it would be good to definitely rule that out.)

iconv handles (text) character encoding, so shouldnā€™t have anything to do with the math or graphics here.

Thatā€™s ok, for those theyā€™re using your system distro libs so they wonā€™t change whichever appimage you use.

Thereā€™s two reasons the binaries might have a hash mismatch / binary difference ā€¦

It could be due to the build toolchain, ranging from something ā€˜innocuousā€™ like them not using ā€˜reproducibleā€™ build techniques and there being a timestamp or the like in there - to something Significant in what is compiled from the same source.

Or it could be that the source is actually different, and the versions are the same because they are snapshots from MLT git at the time of the kdenlive release ā€¦

@berndmj where are the canonical build scripts (including what versions to pull) for the appimages kept? IIRC I found them in some kde craft repo back when I was doing the local builds for gyroflow testing, but I donā€™t seem to be able to find that again right now.

If we know that, we should be able to see what changes hit mlt git between those two versions, and have a pretty good guess, or the chance to bisect it, to pin down what change introduced this.

So ā€¦ Iā€™m still not sure exactly what version of MLT was used for each of those appimages, but from a quick look at MLT git, there was no 7.9.0 release tagged, and thereā€™s commits from JBM between the 7.8.0 and 7.10.0 tags, so it seems like a fair bet these were git snapshots and probably different ones ā€¦

So Iā€™m going to put my bets on the issue being in the changes to MLT between:

and

I havenā€™t got time to run a bunch of builds of MLT from git to bisect this right now, but if someone does that should pin down exactly which change(s) were at fault for this one.

I donā€™t know. I made the dev team aware of this discussion here because I think there is something here worth investigating further.

1 Like