Bug 494726

Summary: Built-in LUTs has absolute paths causing load error after reopening project when using AppImage executable
Product: [Applications] kdenlive Reporter: dnx2k <denis.khoruzhiy>
Component: Project Bin & ImportAssignee: Jean-Baptiste Mardelle <jb>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 24.08.2   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description dnx2k 2024-10-14 09:37:20 UTC
SUMMARY
Any default LUT (BLUE_TINT.cube, CINEMATIC.cube, GREEN_TINT.cube, TEAL_ORANGE.cube) applied to a clip is stored with it absolute path like `/snap/kdenlive/112/usr/share/kdenlive/luts/CINEMATIC.cube` in case of Snap package manager or path like `/tmp/.mount_kdenlirY0eGN/usr/share/kdenlive/luts/CINEMATIC.cube` for AppImage executable.

Upon saving and reopening the project, Kdenlive can no longer locate the LUTs because they are stored in a transient location. As a result, an error occurs, and the LUT effect is no longer applied.

Suggested solution: use environment variable to identify Kdenlive path while storing default preset files. E.g.:
`$KDENLIVE_PATH/luts/CINEMATIC.cube`

STEPS TO REPRODUCE
1. Download and run Kdenlive using the AppImage executable.
2. Import a video clip into the timeline.
3. Apply the "Apply LUT" effect to the clip.
4. Select any of default LUTs and apply it.
5. Save the project.
6. Close Kdenlive and reopen the same project.

OBSERVED RESULT
After reopening the project, the LUT files are no longer available, leading to the following error:
`[filter avfilter.lut3d] Cannot init scale filter: Invalid argument`

EXPECTED RESULT
The default LUT files should remain linked to the project, and the effect should be retained after reopening the project.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 24.04.1
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Comment 1 Jean-Baptiste Mardelle 2024-10-18 14:32:08 UTC
Git commit b18d5b71822f870454243df17d6edec146d84ee1 by Jean-Baptiste Mardelle.
Committed on 18/10/2024 at 14:31.
Pushed by mardelle into branch 'release/24.08'.

Fix missing build-in LUT files not correctly fixed on project open

M  +3    -1    src/doc/documentchecker.cpp

https://invent.kde.org/multimedia/kdenlive/-/commit/b18d5b71822f870454243df17d6edec146d84ee1