Short story
As a new year gift, you can now easily build Kdenlive on Windows, Mac, and of course Linux & BSD, fetching up-to-date dependencies thanks to KDE Craft package manager. You can simply download our latest builds… or for hacking & building yourself, follow typical Craft process:
- Having a python 3 interpreter (preferably 64bits if your OS supports it)
and for Windows additionaly PowerShell at least version 5 and .NET at least 4 - Create a directory (eg
Craft
on Windows, preferably in C:\) - In this directory, download the installer script and run it (on windows choose compiler: mingw-w64, architecture: x64)
- Source the shell environment:
'. craft-master/craftenv.sh'
on Unix/Mac, or'craft-master\craftenv.ps1
‘ on Windows PowerShell (choose ‘Always run’) - Bootstrap the package manager:
craft craft
- Get kdenlive and all dependencies:
craft kdenlive
- Enjoy!
Background history
First cross-builds with MXE
“Porting” Kdenlive to other platforms has been in the works for years now: old Qt4 version was in MacPorts, and we started looking at Windows version with our GSoC student back in Spring 2016. We anticipated we wouldn’t have much to change in the code, as Kdenlive relies on the portable Qt5/KF5 combo, and MLT, which is already embedded in Shotcut cross-platform editor.
At that time, KDE didn’t have Windows & Mac build servers yet, and I had no Windows machine available. I thought it would be more efficient to use the Linux machines. Moreover, the young Craft lacked multimedia libraries (audio and video codecs, effects), while MXE cross-build system had several ready. I liked MXE’s use of GNU Make to resolve build dependencies, it’s automated version update, simple build option overrides… So we went for it and built all the stack up to our final application!
The main difficulty has been deployment: build ends with several executables (kdenlive, melt used for rendering, ffmpeg for transcoding, dbus-daemon for notifications…), shared libraries, plugins (qt’s, mlt’s, frei0r’s…), data files… and it didn’t work out of the box! Finding a layout to please all these required several trials and tweaks, and that step didn’t allow for direct testing while developing & recompiling.
At least with this work we could share Windows binaries, published in 2016 under “alpha” preview state, which rapidly found users despite of several shortcomings… And the situation remained so during more than a year, during which updates didn’t concern platform specific bugs.
Developing in Windows with MSYS2
The most annoying bug: the basic play/pause function was very unreliable! (how could people live with it?)
This seemed due to multi-threading specificity on Windows, but to solve this any developer would need a debug environment. Windows users sometimes offered to help, but they were immediately stuck by the “foreign” build process, and so was I.
At some point I traveled for my job with a Windows laptop: to feel home I set up a MSYS2 environment, with Bash and Pacman. I ported our Linux AppImage build script, and was able to compile Kdenlive and dependencies directly on Windows. Then after a few trials, the play/pause bug got fixed!
Should have started here: Craft!
Next problem: closing Kdenlive was leaving the process running, locking files and occupying memory. This proved to be an issue known by KDE-Windows team, due to KF5 / Qt-DBus / Windows threading loop. The fix was available in Craft, along with other patches and special build options… Instead of importing all these and rebuild every update, it was more than time to use friends work and use Craft, and so benefit from updates & fixes, pre-built cache, automated builders… and most important, new friends to meet at Akademy or Randa Meetings.
I just had to install a recent PowerShell (without admin rights), import “a few” library packages, and patch MLT to allow running Kdenlive without deployment phase. Finally, anyone wanting to simply build and a run Windows version can do it with the steps above.
Craft also comes with built-in installer generation, so “craft –package kdenlive” ends with an NSIS-type compact exe file, which Windows users are more used to that the raw archives available before.
Last but not least, Craft also works on Linux/*BSD… and MacOS! Though on the latter, the build succeeds but the program doesn’t start, due to a DBus startup failure I had no time to debug (as I borrowed a Mac only for a few hours). But I believe we are really close to be able to feed DMG eaters.
Conclusion
If you want to setup a Kdenlive environment with up-to-date libraries in a corner of your system, no problem, whatever the OS you choose!
Welcome in the Crafters friendship. 🙂
Cool stuff! Will this mean the beta Windows builds will have a chance to catch up to the Linux builds sooner?
Also the space/stop/pause bug was a serious showstopper for me learning Kdenlive, glad to hear it’s fixed. I will try more once 12.2 is out.
Great!
Very very nice Vincent!, good job!
Hi!
Craft seems cool, but I get the error:
CMake Error at /home/hugh/Compil/kdenlive/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
Could not find a package configuration file provided by “Qt5X11Extras” with
any of the following names:
Qt5X11ExtrasConfig.cmake
qt5x11extras-config.cmake
I tried installing libqt5x11extras5-dev, no success 🙁
Any idea about dependencies?
Using Kubuntu 18.10
Hello,
You don’t seem to use Craft here, true?
If you jut want to build Kdenlive on Linux, there are instructions here:
https://community.kde.org/Kdenlive/Development
Short way for your kubuntu if you have source repos enabled:
apt build-dep kdenlive
will install all packages you need.
Good luck!
I do not find kdenlive-18.12.2 version for windows of 15 febr.
Could the movit library be installed for Windows too?
MOVIT’s integration is still very experimental and hence buggy.So for the time being it won’t make it in.
Hello,Pinon
Error:
Action command: “compile for libs/ffmpeg ***”
executing command: “F:\craftroot\msys\usr\bin\bash.exe” -c “/f/craftroot/build/_/8832ba5f/ffmpeg-4.1/configure –enable-shared –disable-debug –disable-doc –enable-gpl –enable-version3 –enable-avresample –enable-libmp3lame –toolchain=msvc –prefix=’/f/craftroot’ ”
ERROR: libmp3lame >= 3.98.3 not found
How to sovle this problem?
And I remove the require “libmp3lame >= 3.98.3” in the configure
Instale Craft Kdenlive pero no se de programación no abre creo que es una aplicación 18.12-d8ac1c1e8 requiero desintalarlo de Windows 7 y me indica error en ruta de acceso en administrador de programas no he podido desintalarlo. Si me podrían indicar cómo realizar la desintalacion. Gracias
Hi,
I installed craft kdenlive but it won’t open. I see that you mention it doesn’t open at the end of the post. Any updates on this yet?
Sorry forgot to include I am using Mac Mojave. Thank you again for all the hard (and free!) work.
Do we have to use craft to build KDE applications on Windows? Is there another way we can build them, for example using GCC?
Hi. Thank you in any case. This installation procedure does not give the expected result.
This install kdenlive on mac catalina, but it can not open its proper files i.e I created a .kdenlive project and saved it but when I try to reopen it with kdenlive it can not open. I tells me: The document was created in “C” locale, which is not installed on your system. Please install that language pack. Until then, Kdenlive might not be able to correctly open the document.
I did my best to solve the problem but always any successful result. Please, help if you can.