Created attachment 143376 [details] error dialog SUMMARY Based on the output from kdenlive OpenTimelineIO export dialog, and the referenced line in the adpaters.py file, it appears the support for kdenlive in OTIO is out of date. Is this the right place to raise this issue? STEPS TO REPRODUCE 1. Set up a project; import footage 2. Assemble footage in timeline 3. Select File > OpenTimelinIO Export OBSERVED RESULT Project conversion failed: Traceback (most recent call last): File "/usr/bin/otioconvert", line 33, in <module> sys.exit(load_entry_point('OpenTimelineIO==0.13.0', 'console_scripts', 'otioconvert')()) File "/usr/lib/python3.9/site-packages/opentimelineio/console/otioconvert.py", line 226, in main result_tl = otio.adapters.read_from_file( File "/usr/lib/python3.9/site-packages/opentimelineio/adapters/__init__.py", line 140, in read_from_file return adapter.read_from_file( File "/usr/lib/python3.9/site-packages/opentimelineio/adapters/adapter.py", line 131, in read_from_file result = self._execute_function( File "/usr/lib/python3.9/site-packages/opentimelineio/plugins/python_plugin.py", line 174, in _execute_function return (getattr(self.module(), func_name)(**kwargs)) File "/usr/lib/python3.9/site-packages/opentimelineio_contrib/adapters/kdenlive.py", line 76, in read_from_string for maintrack in maintractor.findall('track'): AttributeError: 'NoneType' object has no attribute 'findall' EXPECTED RESULT fcpxml compatible xml file SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: 21.08.2 (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION The OTIO adapter script talks about a "global_feed" tractor which does not appear in the kdenlive xml file. def read_from_string(input_str): """Read a Kdenlive project (MLT XML) Kdenlive uses a given MLT project layout, similar to Shotcut, combining a "main_bin" playlist to organize source media, and a "global_feed" tractor for timeline. (in Kdenlive 19.x, timeline tracks include virtual sub-track, unused for now)""" mlt, byid = ET.XMLID(input_str) profile = mlt.find('profile') rate = (float(profile.get('frame_rate_num')) / float(profile.get('frame_rate_den', 1))) timeline = otio.schema.Timeline( name=mlt.get('name', 'Kdenlive imported timeline')) maintractor = mlt.find("tractor[@global_feed='1']") for maintrack in maintractor.findall('track'):
I found the issue. The global_feed=1 tractor still exists, it just doesn't have that attribute any more. I have submitted a patch to the opentimelineio project, which can be found here: https://github.com/PixarAnimationStudios/OpenTimelineIO/pull/1160 The problem can also be worked around by opening the kdenlive project file in an editor and adding a `global_feed="1"` to the last `<tractor>` tag (which should be the one that includes all the other tractors). It should look like this: <tractor title="your project name " id="tractorSOMENUMBER" global_feed="1" in="00:00:00.000" out="00:20:34.480"> <track producer="black_track"/> <track producer="tractor0"/> ... </tractor> If the kdenlive team just added that attribute back in, that would also fix the issue of course :)
Thank you for reporting. OpenTimelinIO is not really working at the moment. Let's see if the Developers have time to fix it.
*** This bug has been marked as a duplicate of bug 426942 ***