Relative Path

Bonjour,

Merci à toute l’équipe de Shotcut pour le temps passé à développer notre logiciel. J’ai une petite suggestion à proposer.

Le fichier projet shotcut est au format xml et il est assez facile de le modifier depuis un simple éditeur. On voir par exemple le chemin complet d’une vidéo qui fera partie du projet comme ici :

/Users/phelibre/Vidéos/De l’année/Charlie 0-6 mois/IMG_0088.MOV

Mon problème est le suivant : Si je déplace le répertoire projet Charlie 0-6 mois, je vais me retrouver avec tous le chemin du fichier xml en erreur ! Serait-il pas intéressant de pouvoir nativement avoir ce genre de déclaration dans la mesure ou le fichier xml est dans répertoire projet:

<property name="resource”>./Charlie 0-6 mois/IMG_0088.MOV

Cela permettrait d’avoir plus de souplesse pour tout changement d’emplacement du projet dans l’arborescence de l’OS.


Hello,

Thanks to the entire Shotcut team for the time spent developing our software. I have a suggestion to suggest.

The shotcut project file is in xml format and is easy to edit from a simple editor. We see for example the complete path of a video that will be part of the project as here:

/ Users / phelibre / Videos / Of the year / Charlie 0-6 months / IMG_0088.MOV </ property>

My problem is this: If I move the project directory Charlie 0-6 months, I will end up with all the path of the xml file in error! Would not it be interesting to be able to natively have this kind of declaration as long as the xml file is in project directory:

./ Charlie 0-6 months / IMG_0088.MOV </ property>

This would allow more flexibility for any change of project location in the OS tree.

1 Like

This can be easy, this can be hard.

The difficulty is: what should be the relative root?

Relative to the .mlt file location? to the userpath? to a user typed-in location? All have their pros and cons.

And files located on different partitions can not use the relative path. So if you have a large .mlt with lots of files listed, some use relative path like …/…/…/abc/efg/hij.mp4, some use absolute path, and you forget what’s the path the .mlt file was, and calculating the true path of the sources from the relative path…it is more headache than simply always uses the full path, and the change of location using “sting search and replace” is more straight forward.

Relative to the .mlt file location? Yes :slight_smile:

Files located on different partitions can not use the relative path! No with Linux ou MacOS :wink:

Regards …

Recent versions of Shotcut already use paths that are relative to the .mlt file location. Provided that media is from the .mlt folder or a sub-folder when added to the project, the path in the .mlt file will be relative. It only turns absolute for media that is parent or higher in the folder structure, or from a different partition or mount point.

Projects are innately portable when created with relative paths this way.

If Shotcut is not doing this for you, please reply with your OS and Shotcut version.

1 Like

MacOS : 10.13.6
Shotcut : 19.10.20

Ok, It is possible that I cause an error in the extent I move the .mlt file in the directory where the videos are located before actually starting the editing. I should maybe leave the .mlt file in its directory and move the videos on this directory for editing …

@Phelibre
This might help explain a bit how Shotcut works with paths.

https://forum.shotcut.org/t/project-management/12574/4?u=hudson555x

2 Likes

@Phelibre It might be headache for users who like moving around the project files. (I like drop a timely backup .mlt into a buckup drive), many people may think a user-typed fixed path is more reasonable.
But as I said, all these decisions have their pros and cons.

Oh yea right unix can mount wherever, windows can mount and junction symbolink too, just rarely used by common users.

This already exists in the only way I am going to support it per the documentation link @Hudson555x provided.

MacOS: 10.13.6
Shotcut: 19.10.20

It’s okay, I just gave it a try. I have the procedure to have the relative paths in the .mlt file.

I open Shotcut and I first start creating my project file, for me in iCloud I have several Macs. That’s why I prefer to have relative paths;). Shotcut creates a directory of the same name. Then I put my rushes in this directory and in this case Shotcut creates relative paths :slight_smile:

Thanks everyone,

<?xml version="1.0" encoding="utf-8"?> 1 00:00:09.898 pause 0 1 color rgb24a 0 00:00:09.898 pause
<property name="resource">IMG_2418.MOV</property>

<property name="audio_index">1</property>
<property name="video_index">0</property>
<property name="mute_on_pause">0</property>
<property name="mlt_service">avformat-novalidate</property>
<property name="seekable">1</property>
<property name="aspect_ratio">1</property>
<property name="creation_time">2019-11-18T13:55:38</property>
<property name="shotcut:hash">2d1982abfcad0753b4cffb8baa863fa2</property>
<property name="ignore_points">0</property>
<property name="shotcut:caption">IMG_2418.MOV</property>
<property name="shotcut:skipConvert">1</property>
<property name="global_feed">1</property>
<property name="xml">was here</property>
<filter id="filter0" out="00:00:09.865">
  <property name="start">1</property>
  <property name="level">00:00:00.000=0;00:00:01.433=1</property>
  <property name="mlt_service">brightness</property>
  <property name="shotcut:filter">fadeInBrightness</property>
  <property name="alpha">1</property>
  <property name="shotcut:animIn">00:00:01.466</property>
</filter>
<filter id="filter1" out="00:00:09.865">
  <property name="window">75</property>
  <property name="max_gain">20dB</property>
  <property name="level">00:00:00.000=-60;00:00:01.433=0</property>
  <property name="mlt_service">volume</property>
  <property name="shotcut:filter">fadeInVolume</property>
  <property name="shotcut:animIn">44</property>
</filter>
<filter id="filter2" out="00:00:09.865">
  <property name="start">1</property>
  <property name="level">00:00:09.065=1;00:00:09.865=0</property>
  <property name="mlt_service">brightness</property>
  <property name="shotcut:filter">fadeOutBrightness</property>
  <property name="alpha">1</property>
  <property name="shotcut:animOut">25</property>
</filter>
<filter id="filter3" out="00:00:09.865">
  <property name="window">75</property>
  <property name="max_gain">20dB</property>
  <property name="level">00:00:09.065=0;00:00:09.865=-60</property>
  <property name="mlt_service">volume</property>
  <property name="shotcut:filter">fadeOutVolume</property>
  <property name="shotcut:animOut">25</property>
</filter>
1 V1 1 2 1 0 1 mix 1 1 0 1 0.9 frei0r.cairoblend 1

Thank you for such valuable information.
I know the manual is under construction but please do not forget to add a section or comment about this clever way to automatically handle absolute and relative paths.
Knowing that in advance may help other users to structure their project folders. I usually have a “_Org” project sub-folder where I store all original / source materials.