Bug 456346

Summary: Missing files in project archive if project contains multiple videos with same filename
Product: [Applications] kdenlive Reporter: post
Component: User Interface & MiscellaneousAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: normal CC: erjiang, fritzibaby, hadmut, jb, post, wfr1
Priority: NOR    
Version First Reported In: 22.04.2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Bug Depends on: 421567    
Bug Blocks:    

Description post 2022-07-05 07:41:26 UTC
Hello,

I have a kdenlive project with video clips from multiple source directories. Some of these video clips have the same filename, but are located in different source directories. Rendering works fine on the PC on which I created the project.

Then I wanted to transfer the whole project to another PC using the "Archive Project" function of kdenlive. Creating the archive folder works without any errors, but when I try to open the archived project on the 2nd PC kdenlive reports missing files.

Example:

On the source PC:
Project with video clips "C:\Users\xy\videos\folder1\clip.mkv" and "C:\Users\xy\videos\folder2\clip.mkv". Then use the archive project tool from kdenlive. Let's assume we put everything on a USB drive.

On the target PC:
Load the archived project from the USB drive. Kdenlive then complains while loading the project that it cannot find the video clip named "clip_0.mkv". Looking into the USB drive I can confirm, that there is "clip.mkv" but the other file with the same source name (which should have been renamed by kdenlive) is missing.

Summary:
- Creating an archived project forgets to copy video clips having the same name as other video clips in the project.
- Opening an archived project fails due to missing files. You can see that the archived kdenlive project file contains correct references to the renamed filenames (it expects to find "clip.mkv" and "clip_0.mkv") but the renamed files (in this example: "clip_0.mkv") are not copied into the archive folder.

Hope that helps to fix that bug :)
Comment 1 post 2022-07-05 07:43:55 UTC
I forgot to mention that I always used an uncompressed archive (no .tar.gz)
Comment 2 erjiang 2022-07-13 04:53:53 UTC
Seems similar to bug #421567, also about name collisions in archives.
Comment 3 wernerf 2024-01-30 10:46:17 UTC
I have also seen in an archived project that an image has been given the name "bildXX_0.jpg" instead of "bildXX.jpg", but the latter was not in the file system. However, I did not pursue this any further.
OS: openSUSE Leap 15.5
KDE Frameworks:   Version 5.112.0
Qt:   Version 5.15.10 (kompiliert gegen 5.15.10)
MLT: Version 7.21.0
Comment 5 Jean-Baptiste Mardelle 2024-02-02 09:31:44 UTC
Git commit 273b8d99070578eb4af93aeb88adbc51bcd9603a by Jean-Baptiste Mardelle.
Committed on 02/02/2024 at 09:31.
Pushed by mardelle into branch 'release/24.02'.

Fix duplicated filenames or multiple uses not correctly handled in archiving
Related: bug 421567

M  +2    -4    src/doc/documentchecker.cpp
M  +13   -3    src/project/dialogs/archivewidget.cpp
M  +1    -0    src/project/dialogs/archivewidget.h
M  +2    -1    src/project/dialogs/projectsettings.cpp
M  +39   -2    src/titler/titlewidget.cpp
M  +5    -1    src/titler/titlewidget.h

https://invent.kde.org/multimedia/kdenlive/-/commit/273b8d99070578eb4af93aeb88adbc51bcd9603a
Comment 6 Jean-Baptiste Mardelle 2024-02-12 08:04:38 UTC
Git commit 617a8cd9fa1df0e0e15a0eb267644ae70b8fc552 by Jean-Baptiste Mardelle.
Committed on 12/02/2024 at 07:50.
Pushed by mardelle into branch 'release/23.08'.

Fix multiple archiving issues

M  +15   -17   src/project/dialogs/archivewidget.cpp
M  +1    -1    src/ui/archivewidget_ui.ui
M  +14   -0    src/utils/qstringutils.cpp
M  +5    -0    src/utils/qstringutils.h

https://invent.kde.org/multimedia/kdenlive/-/commit/617a8cd9fa1df0e0e15a0eb267644ae70b8fc552