Bug 478150 - Titles: Path to referenced Image should be relative
Summary: Titles: Path to referenced Image should be relative
Status: CONFIRMED
Alias: None
Product: kdenlive
Classification: Applications
Component: Title Clips & Subtitles (show other bugs)
Version: 23.08.3
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2023-12-06 08:50 UTC by fnx
Modified: 2024-12-23 22:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fnx 2023-12-06 08:50:19 UTC
SUMMARY
Titles: Path to referenced Image should be relative, like it is when image is used in timeline (When all files are in sub-folders of the project).

STEPS TO REPRODUCE
1. create a project
2. add a title with an image
3. save the project and see the full path in the project file

 Sample:
  <property name="xmldata">&lt;kdenlivetitle duration="125" LC_NUMERIC="C" width="1920" height="1080" out="124">
 &lt;item type="QGraphicsPixmapItem" z-index="1">
  &lt;position x="793" y="444">
   &lt;transform>1,0,0,0,1,0,0,0,1&lt;/transform>
  &lt;/position>
  &lt;content url="D:/Tests/TitleWithImgTest/Graphics/TestImage.jpg"/>
 &lt;/item>
 &lt;item type="QGraphicsTextItem" z-index="0">
  &lt;position x="645" y="248">
   &lt;transform>1,0,0,0,1,0,0,0,1&lt;/transform>
  &lt;/position>
  &lt;content shadow="0;#64000000;3;3;3" font-underline="0" box-height="63" font="Roboto Bk" letter-spacing="0" font-pixel-size="53" font-italic="0" typewriter="0;2;1;0;0" alignment="1" font-weight="50" box-width="368" font-color="255,255,255,255">test with image&lt;/content>
 &lt;/item>
 &lt;startviewport rect="0,0,1920,1080"/>
 &lt;endviewport rect="0,0,1920,1080"/>
 &lt;background color="0,0,0,0"/>
&lt;/kdenlivetitle>
</property>

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 fnx 2023-12-14 20:25:16 UTC
To add more details: The problem is that when renaming the project folder or when moving the folder somewhere else, the image(s) cannot be found (the dialog for missing files is displayed).
I just tested it again (24.8.4) and it also happens to normal Clips in the Project Bin (even if the path is relative in the entry). Steps I took:
 1. Create a new project ad add an image that is in a subfolder of the project folder
 2. Create a copy of the folder
 3. Open the project again. Check the file path of the image in the project bin (it is the path to the old folder, not the copied one).
If the folder is renamed, then the dialog for missing files is displayed. This should be the case.
I noticed the root="..." attribute in the project xml where the rootfolder is stored. It remains the same when copying or renaming the proect folder. So issue may be related to that setting.
Comment 2 fnx 2023-12-14 20:29:17 UTC
(In reply to fnx from comment #1)
> To add more details: The problem is that when renaming the project folder or
> when moving the folder somewhere else, the image(s) cannot be found (the
> dialog for missing files is displayed).
> I just tested it again (24.8.4) and it also happens to normal Clips in the
> Project Bin (even if the path is relative in the entry). Steps I took:
>  1. Create a new project ad add an image that is in a subfolder of the
> project folder
>  2. Create a copy of the folder
>  3. Open the project again. Check the file path of the image in the project
> bin (it is the path to the old folder, not the copied one).
> If the folder is renamed, then the dialog for missing files is displayed.
> This should be the case.
> I noticed the root="..." attribute in the project xml where the rootfolder
> is stored. It remains the same when copying or renaming the proect folder.
> So issue may be related to that setting.

Editing comments is not possible here unfortunately (I like invent.kde.org much more).
I meant of course Version 23.08.4 and that it should _not_ be the case (It should be possible to move / rename the project folder when everyhting is contained inside that folder).
Comment 3 wernerf 2024-01-30 11:20:16 UTC
I have only noticed this in one archived project so far. There, relative paths are only not found for images in title clips. In my projects, objects (images, videos, music, ...) only appear in the timeline or in title clips. When I move a project from a USB disk to an internal disk, for example, I repair the project XML file using a text editor. 
Additionally it is currently time-consuming to repair an project that contains several images (with wrong pathes) in title-clips using kdenlive tools so that it can be edited again. This applies to projects as well as archived projects
After used the "Clip problem" dialog kdenlive does not set the path of all images in a title-clip so that they can be found by kdenlive. 
If there are 3 images in a title-clip, you have to call up kdenlive 3 times and use the "Clip problem" dialog each time until all images are visible again. If there is only a maximum of one image in a title clip, one "Clip problem" dialog is sufficient.

OS: openSUSE Leap 15.5