Relative file paths for project file dependencies and improve file association detection

I’ve been using Shotcut for well over 18 months, and I must say, it has improved a lot in terms of functions and stability since I started used it. Keep up the good work! With that being said, I want to suggest a feature that would improve the Quality of life, if a project is moved in its entirety.

I am moving a few projects to a new external hard drive, and I’m a little tired of having to correct for every file in a given project. As you can see, I keep my dependencies for a project either in sub-folders or, in this case, in the same directory of the project file.

I’m moving several projects with this or a similar structure, and it’ll be rather annoying to have to remap all dependencies to a new directory. Even if it automatically detected the correct files in the same directory where I find one asset, that would be a huge improvement, but Ideally, I would appreciate Shotcut project files supporting a relative file path (That is, something like “./Video/MyVideo.mp4” instead of “C:/Users/User/Videos/Projects/MyProject/Video/MyVideo.mp4”) To make moving projects and their assets less of a pain.

This would be a great feature to have, especially for someone like me who is archiving their old projects and assets for later use. I wouldn’t have to reset the paths for all of my assets, or at least, most of them.

Thanks for taking the time to read this, and I hope you keep doing what you’re doing! :+1:

Shotcut already uses relative paths for files that in the same folder or a sub-folder of the project file. You said you are already doing this. Are you doing this organization before you create the project (or as you work on the project just before importing the file)?

1 Like

I usually do this organization as I work on a project, as I have few of the actual files I need on hand when I begin the project. That being said, I get my files in place right before I import them by dragging and dropping into the project window.

How many “My Passport” drives do you have? Perhaps try renaming them if you have more than 1. Do they always appear with Drive G? I noticed you have a SD Card inserted on Drive F.

If you have both the SD card out, and the My Passport drive unplugged, then just plug the My Passport drive in, which letter drive will be assigned to My Passport? F or G?

My point is can you always guarantee My Passport (if you have just the one drive) will always be G:?

I can’t remember if you can assign a designated drive letter to a USB drive or not.

Now I understand, I had failed to read this part. I don’t really know that I would have a use for this, but from you describing with your scenario, I could see this being useful. If this is implemented I hope there a box that I can check to not have this happen. I prefer the absolute path.

I only have one “My Passport” and the SD card stays inserted at all times, though I can dedicate a drive letter to a specific device, if I wish. Also, That wouldn’t quite help things, As I still have the absolute path to deal with, and I’d only hit onto this issue again if I decide to move the project again…

That’s why I had the 2nd reply, sorry. I had failed to read that part of your original message,

Bumping as I haven’t heard a response in two days. If relative paths are already supported, then how come, even when my files are organized before I import them via drag-and-drop, does it use an absolute file path by default, unless I manually go in to the .mlt file and set the relative paths individually for every file in the project? Does it use relative paths automatically if I use File>Open instead?

I haven’t checked but:

Ideally you could test whether or not File/Open creates relative paths.

I think relative paths are supposed to only work if you move the .mlt file together with the project files.

I think I understand what @EnzoD is trying to say.
Enzo wants the Project1.mlt originally saved at Q:/Folder A/Subfolder 3/Project1.mlt, to work with P:/Folder B/Subfolder 4/, or wherever that specific directory is moved/copied to.
file structure

I do not know. I retested it, and it works for me. You showed a screenshot. The UI is going to show full paths. Make a project with assets in the same folder or sub-folders of the project folder and look at the XML. And if it is not relative, show the relevant portions of the XML.

The two mlt files I created are all relative.
All mlt files loaded just fine.

Test 101
Test 103Test 102
Test 104Test 105

testsdv1.mlt (4.4 KB)
test57.mlt (4.4 KB)

I even tried it on a different disk.
Test 106

This works for Windows 10.
Shotcut version 18.05.03
I’m not sure which Operating system the O.P. is using.

1 Like

I’m on Windows 10, Shotcut 18.05.08. Just tried making a test project and it seems to be working correctly now. I don’t know why (probably because I reinstalled and cleared registry settings prior to testing it), but I created a quick test project with files in the same directory and in a subdirectory of the project and it worked just fine.

I’m assuming it was something in the registry options that was doing that, as none of my previous projects (made in earlier versions of ShotCut) were doing it properly

1 Like

And I just upgraded to 18.05.08 and just tried the test57.mlt file I created, and it works fine.
Glad you got it to work. :cowboy_hat_face: