AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.47k stars 293 forks source link

When exporting via OpenTimelineIO, I'm losing the effect #1558

Closed waldirio closed 1 year ago

waldirio commented 1 year ago

Incorrect Functionality and General Questions

Creating a basic example, adding 2 tracks/2 videos, overlapping them, and adding an effect on the first one, just to make a picture in picture, for example using the effect transform. This works fine in kdenlive. However, when exporting it via opentimelineIO and importing it back, we can see the videos in the correct place/position/time/track, but the effect it's not there.

To Reproduce

  1. Fedora
  2. Python version == 3.11.1
  3. Example snippet that demonstrates the issue - if it's a build issue,
  4. OpenTimelineIO release version or commit hash == 0.15.0
  5. Compiler information: on Linux, type gcc -v, and paste the results here
    $ gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/12/lto-wrapper
    OFFLOAD_TARGET_NAMES=nvptx-none
    OFFLOAD_TARGET_DEFAULT=1
    Target: x86_64-redhat-linux
    Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-12.2.1-20221121/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-offload-defaulted --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
    Thread model: posix
    Supported LTO compression algorithms: zlib zstd
    gcc version 12.2.1 20221121 (Red Hat 12.2.1-4) (GCC)

Expected Behavior

Be able to import the project with all the effects already in place.

Screenshots

Let me know if you need it, I can create a small video to preset the issue, if necessary.

apetrynet commented 1 year ago

Hi @waldirio!

Is the example otio file created and exported from kdenlive? Would you be able to provide a file we can look at? Also, does the effect show in otioview?

waldirio commented 1 year ago

Hello @apetrynet

Thanks for your quick response.

yes, the file was exported via kdenlive and I'm importing on kdenlive as well, btw, the app version is 22.12.2

Please, check the file below

$ cat otio_export.otio 
{
    "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": [
                    {
                        "OTIO_SCHEMA": "Gap.1",
                        "metadata": {},
                        "name": "",
                        "source_range": {
                            "OTIO_SCHEMA": "TimeRange.1",
                            "duration": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 865.0
                            },
                            "start_time": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 0.0
                            }
                        },
                        "effects": [],
                        "markers": [],
                        "enabled": true
                    },
                    {
                        "OTIO_SCHEMA": "Clip.2",
                        "metadata": {},
                        "name": "",
                        "source_range": {
                            "OTIO_SCHEMA": "TimeRange.1",
                            "duration": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 1000.0
                            },
                            "start_time": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 5091.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": 30.0,
                                        "value": 32023.0
                                    },
                                    "start_time": {
                                        "OTIO_SCHEMA": "RationalTime.1",
                                        "rate": 30.0,
                                        "value": 0.0
                                    }
                                },
                                "available_image_bounds": null,
                                "target_url": "Videos/sat_report_template_ptBR.mp4"
                            }
                        },
                        "active_media_reference_key": "DEFAULT_MEDIA"
                    }
                ],
                "kind": "Audio"
            },
            {
                "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": 30.0,
                                "value": 865.0
                            },
                            "start_time": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 5091.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": 30.0,
                                        "value": 32023.0
                                    },
                                    "start_time": {
                                        "OTIO_SCHEMA": "RationalTime.1",
                                        "rate": 30.0,
                                        "value": 0.0
                                    }
                                },
                                "available_image_bounds": null,
                                "target_url": "Videos/sat_report_template_ptBR.mp4"
                            }
                        },
                        "active_media_reference_key": "DEFAULT_MEDIA"
                    },
                    {
                        "OTIO_SCHEMA": "Clip.2",
                        "metadata": {},
                        "name": "",
                        "source_range": {
                            "OTIO_SCHEMA": "TimeRange.1",
                            "duration": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 1709.0
                            },
                            "start_time": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 47261.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": 30.0,
                                        "value": 119575.0
                                    },
                                    "start_time": {
                                        "OTIO_SCHEMA": "RationalTime.1",
                                        "rate": 30.0,
                                        "value": 0.0
                                    }
                                },
                                "available_image_bounds": null,
                                "target_url": "Videos/2023-01-25 Career Path Journey - Panel Discussion (Recording).mp4"
                            }
                        },
                        "active_media_reference_key": "DEFAULT_MEDIA"
                    }
                ],
                "kind": "Audio"
            },
            {
                "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": [],
                "kind": "Video"
            },
            {
                "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": 30.0,
                                "value": 865.0
                            },
                            "start_time": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 5091.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": 30.0,
                                        "value": 32023.0
                                    },
                                    "start_time": {
                                        "OTIO_SCHEMA": "RationalTime.1",
                                        "rate": 30.0,
                                        "value": 0.0
                                    }
                                },
                                "available_image_bounds": null,
                                "target_url": "Videos/sat_report_template_ptBR.mp4"
                            }
                        },
                        "active_media_reference_key": "DEFAULT_MEDIA"
                    },
                    {
                        "OTIO_SCHEMA": "Clip.2",
                        "metadata": {},
                        "name": "",
                        "source_range": {
                            "OTIO_SCHEMA": "TimeRange.1",
                            "duration": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 1709.0
                            },
                            "start_time": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 47261.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": 30.0,
                                        "value": 119575.0
                                    },
                                    "start_time": {
                                        "OTIO_SCHEMA": "RationalTime.1",
                                        "rate": 30.0,
                                        "value": 0.0
                                    }
                                },
                                "available_image_bounds": null,
                                "target_url": "Videos/2023-01-25 Career Path Journey - Panel Discussion (Recording).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"
            },
            {
                "OTIO_SCHEMA": "Track.1",
                "metadata": {},
                "name": "",
                "source_range": null,
                "effects": [],
                "markers": [],
                "enabled": true,
                "children": [
                    {
                        "OTIO_SCHEMA": "Gap.1",
                        "metadata": {},
                        "name": "",
                        "source_range": {
                            "OTIO_SCHEMA": "TimeRange.1",
                            "duration": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 865.0
                            },
                            "start_time": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 0.0
                            }
                        },
                        "effects": [],
                        "markers": [],
                        "enabled": true
                    },
                    {
                        "OTIO_SCHEMA": "Clip.2",
                        "metadata": {},
                        "name": "",
                        "source_range": {
                            "OTIO_SCHEMA": "TimeRange.1",
                            "duration": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 1000.0
                            },
                            "start_time": {
                                "OTIO_SCHEMA": "RationalTime.1",
                                "rate": 30.0,
                                "value": 5091.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": 30.0,
                                        "value": 32023.0
                                    },
                                    "start_time": {
                                        "OTIO_SCHEMA": "RationalTime.1",
                                        "rate": 30.0,
                                        "value": 0.0
                                    }
                                },
                                "available_image_bounds": null,
                                "target_url": "Videos/sat_report_template_ptBR.mp4"
                            }
                        },
                        "active_media_reference_key": "DEFAULT_MEDIA"
                    }
                ],
                "kind": "Video"
            }
        ]
    }
}

When trying to execute otioview, I'm facing the issue below. I'll check this in a sequence

(otio) [wpinheir@ironman test_otio]$ otioview otio_export.otio 
Traceback (most recent call last):
  File "/home/wpinheir/.venv/otio/bin/otioview", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/wpinheir/.venv/otio/lib64/python3.11/site-packages/opentimelineview/console.py", line 292, in main
    window = Main(
             ^^^^^
  File "/home/wpinheir/.venv/otio/lib64/python3.11/site-packages/opentimelineview/console.py", line 153, in __init__
    self._create_navigation_menu(navigation_menu)
  File "/home/wpinheir/.venv/otio/lib64/python3.11/site-packages/opentimelineview/console.py", line 222, in _create_navigation_menu
    navigation_menu.triggered[[QAction]].connect(__callback)
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
IndexError: Signature "triggered()" not found for signal: "triggered". Available candidates: "triggered(QAction*)"
apetrynet commented 1 year ago

When looking at the provided otio file, I can't see that any effects are exported from kdenlive. Perhaps they (kdenlive developers) didn't add support for translating the effect you used to/from otio. Please note that there's not that many effects defined in OTIO yet neither. But perhaps a transform like you describe can be achieved by using bounds

Others may correct me here, but I'm afraid this is something that you'll need to bring up with the kdenlive developers as the otio integration is maintained by them.

apetrynet commented 1 year ago

Here's the pull request removing kdenlive related files from OTIO. In the thread you'll see some developers you can reach out to.

waldirio commented 1 year ago

Hello,

I was able to workaround the otioviewer, I got the known issue here.

Please, check the video, as you mentioned before, I'm pretty sure that there isn't effect .. but once I never saw this viewer with effect, I'm not sure how it should be.

Thank you again for your help. Waldirio

apetrynet commented 1 year ago

Yeah, if there were effects you'd see them in the effects list and I believe there would have been an indicator in the timeline a well.

Try reaching out to the kdenlive people and see if they have any suggestions on what effects you may use to achieve your goal.

waldirio commented 1 year ago

Hello @apetrynet

Perfect. Thank you again for your help. I believe we can archive this issue!

Have an amazing day ahead! Waldirio