Moving a project folder looses thumbnails

Bug #423948 reported by markba
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
OpenShot Video Editor
Fix Released
High
Unassigned

Bug Description

When a project is moved to another location (subfolder thumbnails included), the snapshot images point to the original location. Thus in the project screen, the movies are shown with no snapshot. Everything is functional, but this is not as it supposed to work. Apparently is the loaction of the thumbnails stored in a absolute way, so not relative. As long as the project folder is not moved, everything works.

Steps to reproduce:
- Create a folder, say '~/OpenShot'
- Create a folder, say '~/OpenShot/Project1'
- Create a new project
- Import some movies
- Save the project under 'Project1.osp' in '~/OpenShot/Project1'
- Close the project
- Check the automatically created folder 'thumbnails' (and contents) under '~/OpenShot/Project1'
- Copy '~/OpenShot/Project1' to '~/OpenShot/Project2'
- Open '~/OpenShot/Project2/Project1.osp'
- Check the images (thumbnails) to appear in the movie tracks
- Close OpenShot
- Rename the folder ~/OpenShot/Project1' to ~/OpenShot/Project1_'
- Open '~/OpenShot/Project2/Project1.osp'
- Check the images (thumbnails): they do not appear anymore in the movie tracks
- Close OpenShot
- Revert the renaming: rename the folder ~/OpenShot/Project1_' back to '~/OpenShot/Project1'
- Open '~/OpenShot/Project2/Project1.osp'
- Check the images (thumbnails) to re-appear in the movie tracks

This proves that the location of the thumbnails which shows in the movie tracks, are stored absolutely, so not relative to the project folder. Despite the existence of the thumbnail sub folder, images in that folder do not play any role when the project is copied from another location. The copied thumbnail sub folder could be deleted any time, without loosing any data.

To prove this, a final test:
- Rename the folder ~/OpenShot/Project1/thumbnails' to './thumbnails_'
- Open '~/OpenShot/Project2/Project1.osp'
- Check the images (thumbnails): they do not appear anymore in the movie tracks

Revision history for this message
Helen McCall (wildnfree) wrote :

The answer to this one is not to rename the project .osp file outside of OpenShot

If you want to change the name of a project do it with File->Save As

Helen

Changed in openshot:
status: New → Invalid
Revision history for this message
markba (mark-baaijens) wrote :

Hmm, using the option 'Saving the project as...' seems to lose the thumnails entirely: the thumbnail folder is empty and the clips are without thumbnails. I guess this is another bug and should be reported separately. I'll elaborate this.

With regard to your remark that renaming or copying a project should be through the mentioned menu option: I do not entirely agree.

There are several ways in which the project location can change, without having access to the OpenShot GUI:
- a project can be restored from a backup to a different folder
- the project tree can be reorganised
- the project is moved to another machine in a different folder
- etc.
In all cases: due to the fact that the thumbnail location is stored in an absolute way (not relative to the project file i.e. ./thumbnails), the thumbnails in all examples will point to the wrong ones or are void (not pointing to a valid location).

This can be avoided by using a relative path for the thumbnails. Another advantage is that one is less dependent of using the menu option Save as, thus prohibiting errors.

Revision history for this message
markba (mark-baaijens) wrote :

The workaround of renaming every project file using Save as is not workable. If you have a folder with all your OpenShot projects (10 or many more), and you have to rename that folder, you have to rename every single file, within Openshot.

The problem is really that the path of the thumbnails is stored in a absolute way. I examined the Openshot project file (.osp) and, though it's a binary, it's clearly proving my suggestion.

Please reconsider the status of this bug again, because it will improve Openshot considerably, especially file operation area.

Revision history for this message
Jonathan Thomas (jonoomph) wrote :

I agree that file paths should be stored in a relative manner. This would make it easy to move the project folder around (assuming the videos are inside the project folder).

So how about this...

Case 1) Resources are inside the project folder (store the relative path)
Case 2) Resources are outside the project folder (store the absolute path)

Changed in openshot:
importance: Undecided → Wishlist
status: Invalid → Confirmed
Changed in openshot:
milestone: none → 1.1.0
Revision history for this message
markba (mark-baaijens) wrote :

> I agree that file paths should be stored in a relative manner. This would
> make it easy to move the project folder around (assuming the videos are
> inside the project folder).

It would be nice if there's a solution project files also, then we can move the project around where we want.

However:

> Case 1) Resources are inside the project folder (store the relative path)
> Case 2) Resources are outside the project folder (store the absolute path)

This is a personal preference: copy or do not copy the resources. My preference is to *not* the resources, but I guess others do not follow this.

But this is a different subject from the thumbnail problem. If the thumbnail problem is solved by using a relative path in the project file, Openshot will be more flexible than it was, regarding moving project files.

Revision history for this message
markba (mark-baaijens) wrote :

There's a relation with this bug: "Cannot move project files"
https://bugs.launchpad.net/openshot/+bug/458099

Changed in openshot:
importance: Wishlist → Medium
importance: Medium → High
Changed in openshot:
milestone: 1.1.0 → 1.2.0
Revision history for this message
doc75 (linux-virlet) wrote :

I found a by-pass using the ability to save .osp file in ascii mode.
Go to Edit > Preferences and select Ascii for project file format.
Now open the project from its original location and save it under a new name.
Then you can edit the path to the files inside the project using your favorite text editor.

Hope this helps while waiting for the "fix".

Revision history for this message
Thangalin (thangalin-deactivatedaccount) wrote :

If there was an XML format for the project files:

  <project-files base='/home/user/projects/videos'>
    <file-list id='0001' path='my-video/audio'>
      <file id='000001' name='battle-royale.mp3' />
      <file id='000002' name='enter-knight.mp3' />
    </file-list>
    <file-list id='0002' path='my-video/images'>
      <file id='000001' name='battle-scene.png' />
      <file id='000002' name='castle-gate.png' />
    </file-list>
  </project-files>

You could simply change the "base" attribute of the project-files.

Revision history for this message
Jonathan Thomas (jonoomph) wrote :

The default project type has been changed to ASCII, so the process of fixing the paths is much easier now. However, due to time, I am re-targeting this bug for the next version.

Changed in openshot:
milestone: 1.2.0 → 1.2.1
Changed in openshot:
milestone: 1.2.x → 1.3.0
Revision history for this message
Carles Fernàndez Julià (chaos-ct) wrote :

It should be noted that openshot saves ALL paths as absolute: there is no way to move movies along with the project.

Changed in openshot:
milestone: 1.3.0 → 1.4.0
Revision history for this message
Richard Simmons (risimmonsuk) wrote :

I spotted this one recently too. I think at a minimum, if openshot can't find the thumbnails (wrong paths / not copied at all), it should regenerate them.

Changed in openshot:
assignee: nobody → Michael J Salmons (salmons-mike)
Revision history for this message
linuxpete (pwolters) wrote :

Hi,

I encountered this phenomena when working from another computer from which I accessed the project in physically the same disk-directory but the networkpath was different.

On the original computer something like

/video/my-name/project

 but on the other computer:

/net/original-computername/video/my-name/project

The solution could be to access / make the project on the original computer also as a network drive but relative addressing would be a nicer thing apart from the fact that I can send somebody else the whole project.

Changed in openshot:
milestone: 1.4.0 → 1.4.1
Revision history for this message
Jonathan Thomas (jonoomph) wrote :

With version 1.4.0, we've changed the way thumbnails are generated. If a thumbnail is missing, it is now re-generated automatically. This effectively fixes the issues discussed in this bug report, so I'm marking this Fix Released. Thanks!

Changed in openshot:
assignee: SP_Otaku (salmons-mike) → nobody
milestone: 1.4.1 → none
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.