Bug 460597

Summary: OpenTimelineIO export fails if file extension isn't specified in file name
Product: [Applications] kdenlive Reporter: hellocatfood <hellocatfoodsocial>
Component: Rendering & ExportAssignee: Jean-Baptiste Mardelle <jb>
Status: CONFIRMED ---    
Severity: normal CC: bilrry, brunetton, erjiang, fritzibaby, julius.kuenzel
Priority: NOR Keywords: triaged
Version First Reported In: git-master   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description hellocatfood 2022-10-17 14:42:22 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
OpenTimelineIO export fails if file extension isn't specified in filename. If you specify just the file name without adding the .otio extension it will produce an error:

```
Traceback (most recent call last):
  File "/home/$USER/.local/lib/python3.10/site-packages/opentimelineio/adapters/__init__.py", line 93, in from_filepath
    return plugins.ActiveManifest().from_filepath(outext)
  File "/home/$USER/.local/lib/python3.10/site-packages/opentimelineio/plugins/manifest.py", line 176, in from_filepath
    raise exceptions.NoKnownAdapterForExtensionError(suffix)
opentimelineio.exceptions.NoKnownAdapterForExtensionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/$USER/.local/bin/otioconvert", line 8, in <module>
    sys.exit(main())
  File "/home/$USER/.local/lib/python3.10/site-packages/opentimelineio/console/otioconvert.py", line 220, in main
    out_adapter = otio.adapters.from_filepath(args.output).name
  File "/home/$USER/.local/lib/python3.10/site-packages/opentimelineio/adapters/__init__.py", line 95, in from_filepath
    raise exceptions.NoKnownAdapterForExtensionError(
opentimelineio.exceptions.NoKnownAdapterForExtensionError: No adapter for suffix '' on file '/home/$USER/Desktop/test'
```

STEPS TO REPRODUCE
1. Create a project with clips and edits on the timeline
2. Go to  File > OpenTimelineIO Export
3. Choose a location and type a file name without extension and press save

OBSERVED RESULT
An error is given.

EXPECTED RESULT
The file should save, or some indication given that a .otio extension is needed. Currently there is no way to know within kdenlive itself that the file should be saved with a .otio extension (file specification is here https://opentimelineio.readthedocs.io/en/latest/tutorials/otio-file-format-specification.html )

SOFTWARE/OS VERSIONS
Ubuntu 22.04

KDE Frameworks 
Version 5.92.0

Qt 
Version 5.15.3 (built against 5.15.3)

MLT 
Version 7.9.0 
Open source multimedia framework.

Kdenlive
22.11.70
Comment 1 erjiang 2022-11-10 08:31:23 UTC
Agreed something should change about the export dialog. Currently it lists all of the possible extensions as one selection in the file type dropdown. Maybe the reasonable thing to do is to list them separately, with the default being *.otio? So if you don't select an extension and don't select a file type, it will default to *.otio.
Comment 2 Bruno Duyé 2024-12-02 21:53:57 UTC
Is there any version with working OTIO export ? I really need to export a long video I've made today (paid project) but exporting is broken in 24.08.3 (I'll fill a bug with detailed information of course, but I needed this information quickly, sorry for asking here :s)
Comment 3 Jean-Baptiste Mardelle 2024-12-03 10:33:27 UTC
Sorry, the OpenTimelineIO export has been broken for some time. Support was always quite minimal and needs a complete rewrite since we implemented multiple timeline inside project files.
The good news is that we now have someone working on a proper implementation of OpenTimelineIO import/export, but it will take a few more months before it is usable - hopefully for the 25.04 release.

Sorry that we cannot help more before this.
Comment 4 Bruno Duyé 2024-12-03 10:59:27 UTC
(In reply to Jean-Baptiste Mardelle from comment #3)
> Sorry, the OpenTimelineIO export has been broken for some time. Support was
> always quite minimal and needs a complete rewrite since we implemented
> multiple timeline inside project files.
> The good news is that we now have someone working on a proper implementation
> of OpenTimelineIO import/export, but it will take a few more months before
> it is usable - hopefully for the 25.04 release.
> 
> Sorry that we cannot help more before this.

Thank you for this quick and detailed answer ! I would be happy to enter the dev world of OTIO, I found this project very exiting. Just by curiosity, is there any financement for this dev ? (I understand someone is already taking care of this export but I'm curious, ans willing to be able to invest more time around this project)

Bruno Duyé
Comment 5 Julius Künzel 2025-03-29 21:37:43 UTC
Yes, the person is being payed. You can read more about it here https://kdenlive.org/en/2025/02/kdenlive-fundraising-final-report/ and here https://ev.kde.org/2024/10/04/2024-10-05-kde-e-v-kdenlive-jobs/

The work was done in multiple merge requests https://invent.kde.org/multimedia/kdenlive/-/merge_requests/?sort=created_date&author_username=darbyjohnston&state=all some fine tuning is still ongoing

It is available in 25.04 (to be released in April 2025).
Comment 6 Julius Künzel 2025-03-29 21:37:58 UTC
*** Bug 495963 has been marked as a duplicate of this bug. ***