This forum has been archived. All content is frozen. Please use KDE Discuss instead.

OpenTimelineIO

Tags: None
(comma "," separated)
waldirio
Registered Member
Posts
6
Karma
0
OS

OpenTimelineIO

Wed Mar 01, 2023 6:01 am
Hello friends, good morning

I'm starting with OpenTimeLineIO and it seems pretty interesting. However, not very well documented.

I was looking for how to automate the process to create my own track completely via CLI, I see that kdenlive doesn't support it at this moment and someone told me about the OpenTimeLineIO.

To be simple, I created a virtual environment, installed the opentimelineio python module, and open my kdenlive app from there, after that, I added a simple track and in a sequence, I exported via File - OpenTimelineIO Export. Then, I got a file as below
Code: Select all
{
    "OTIO_SCHEMA": "Timeline.1",
    "metadata": {},
    "name": "Kdenlive imported timeline",
    "global_start_time": null,
    "tracks": {
        "OTIO_SCHEMA": "Stack.1",
        "metadata": {},
        "name": "tracks",
        "source_range": null,
        "effects": [],
        "markers": [],
        "enabled": true,
        "children": [
            {
                "OTIO_SCHEMA": "Track.1",
                "metadata": {},
                "name": "",
                "source_range": null,
                "effects": [],
                "markers": [],
                "enabled": true,
                "children": [],
                "kind": "Audio"
            },
            {
                "OTIO_SCHEMA": "Track.1",
                "metadata": {},
                "name": "",
                "source_range": null,
                "effects": [],
                "markers": [],
                "enabled": true,
                "children": [
                    {
                        "OTIO_SCHEMA": "Clip.2",
                        "metadata": {},
                        "name": "",
                        "source_range": {
                            "OTIO_SCHEMA": "TimeRange.1",
                            "duration": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 29.97002997002997,
                                "value": 43231.0
                            },
                            "start_time": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 29.97002997002997,
                                "value": 0.0
                            }
                        },
                        "effects": [],
                        "markers": [],
                        "enabled": true,
                        "media_references": {
                            "DEFAULT_MEDIA": {
                                "OTIO_SCHEMA": "ExternalReference.1",
                                "metadata": {},
                                "name": "",
                                "available_range": {
                                    "OTIO_SCHEMA": "TimeRange.1",
                                    "duration": {
                                        "OTIO_SCHEMA": "RationalTime.1",
                                        "rate": 29.97002997002997,
                                        "value": 43231.0
                                    },
                                    "start_time": {
                                        "OTIO_SCHEMA": "RationalTime.1",
                                        "rate": 29.97002997002997,
                                        "value": 0.0
                                    }
                                },
                                "available_image_bounds": null,
                                "target_url": "/path/to/my_file.mp4"
                            }
                        },
                        "active_media_reference_key": "DEFAULT_MEDIA"
                    }
                ],
                "kind": "Audio"
            },
            {
                "OTIO_SCHEMA": "Track.1",
                "metadata": {},
                "name": "",
                "source_range": null,
                "effects": [],
                "markers": [],
                "enabled": true,
                "children": [
                    {
                        "OTIO_SCHEMA": "Clip.2",
                        "metadata": {},
                        "name": "",
                        "source_range": {
                            "OTIO_SCHEMA": "TimeRange.1",
                            "duration": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 29.97002997002997,
                                "value": 43231.0
                            },
                            "start_time": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 29.97002997002997,
                                "value": 0.0
                            }
                        },
                        "effects": [],
                        "markers": [],
                        "enabled": true,
                        "media_references": {
                            "DEFAULT_MEDIA": {
                                "OTIO_SCHEMA": "ExternalReference.1",
                                "metadata": {},
                                "name": "",
                                "available_range": {
                                    "OTIO_SCHEMA": "TimeRange.1",
                                    "duration": {
                                        "OTIO_SCHEMA": "RationalTime.1",
                                        "rate": 29.97002997002997,
                                        "value": 43231.0
                                    },
                                    "start_time": {
                                        "OTIO_SCHEMA": "RationalTime.1",
                                        "rate": 29.97002997002997,
                                        "value": 0.0
                                    }
                                },
                                "available_image_bounds": null,
                                "target_url": "/path/to/my_file.mp4"
                            }
                        },
                        "active_media_reference_key": "DEFAULT_MEDIA"
                    }
                ],
                "kind": "Video"
            },
            {
                "OTIO_SCHEMA": "Track.1",
                "metadata": {},
                "name": "",
                "source_range": null,
                "effects": [],
                "markers": [],
                "enabled": true,
                "children": [],
                "kind": "Video"
            }
        ]
    }
}


Then, based on all the videos I'm seeing about OpenTimeLineIO, I should be able to open the .otio file above and the tracks should be organized automatically. However, when I try to open this file via menu File - OpenTimeLineIO Import, kdenlive in a sequence is asking for a project. I'm pretty sure that this is wrong ..., what do you think?

I already filled a bug here

https://bugs.kde.org/show_bug.cgi?id=465480


Please, if you have any recommendation and/or advice about the file creation and automation, I'll really appreciate.

Thank you in advance!
Waldirio
waldirio
Registered Member
Posts
6
Karma
0
OS

Re: OpenTimelineIO

Fri Mar 03, 2023 1:14 am
Hello all,

Just to clarify here, the second prompt it's not asking for the project to open, but what will be the saved project filename, once we add the name, we can notice the button "Save", instead of "Open". :)

When writing this today and reading out loud, this came to my mind, and when setting any name, voilá, the data was imported as it should be.

Thank you!
Waldirio


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]