ggarra13 / mrv2

Professional player and review tool for vfx, animation and computer graphics.
https://mrv2.sourceforge.io
BSD 3-Clause "New" or "Revised" License
222 stars 14 forks source link

Saving a MRV2 session with an 'edit' will save OTL into temp files #125

Closed BigRoy closed 1 year ago

BigRoy commented 1 year ago

Issue

Whenever saving my MRV2 session when I've e.g. loaded an OTIO file and then started doing edits to it - it will store the path to the .otio edit in my tempfiles, e.g.:

            "path": {
                "path": "C:\\Users\\User\\AppData\\Local\\Temp/EDL0x00000215F599FCD0.1.otio"
            },

Also, it's quite weird that there's a nested path: path: key in the JSON data? But I assume there's reasons for that.

Saving the otio file into temporary files wouldn't make my .mrv2s session save very reliable - nor would allow sharing the session to someone else allow it to work. Saving my session and reopening the session a week later might have lost my edit if my tempfiles were cleared.


It might nice to embed the OTIO timeline into the mrv2 session if it's not linked to a saved file explicitly. Basically on save it would then turn the in-memory OTIO file into an embedded OTIO?

ggarra13 commented 1 year ago

This is a bug. EDL .otio files should not get saved in the session file. I wouldn't want to save multiple new .otio files in a new directory next to the session file, as they could conflict with other sessions.

In summary, if you want to keep an .otio EDL, save it individuallly.

BigRoy commented 1 year ago

Couldn't we embed the otio data as json inside the session files?

In summary, if you want to keep an .otio EDL, save it individuallly.

Is there any on save callback I can use to warn the user that there's an "unsaved"/"temp" .otio EDL in the current session?

ggarra13 commented 1 year ago

No, json files have a limit on their size and embedding multiple .otio files is asking for trouble. Also extracting them and passing them to tlRender may not be possible with tlRender's API I thnk.

I added a warning about .otio EDLs when saving the session.