Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FCP XML: marker out is hardcoded as -1 #1410

Closed
jhorrocks-tl opened this issue Sep 22, 2022 · 2 comments · Fixed by #1411
Closed

FCP XML: marker out is hardcoded as -1 #1410

jhorrocks-tl opened this issue Sep 22, 2022 · 2 comments · Fixed by #1411
Labels
bug A problem, flaw, or broken functionality.

Comments

@jhorrocks-tl
Copy link
Contributor

Bug Report

When exporting to FCP XML, markers always have an out of -1. This is because the value is hardcoded here.

<marker>
    <comment>Shot ID 12123483</comment>
    <name>...</name>
    <in>4906</in>
    <out>-1</out>
</marker>

To Reproduce

  1. OS: Mac OS 12.3
  2. Python version: 3.9.7
  3. Example Snippet:

Generating a marker with the following code and serializing it to FCP XML results in an out of -1 even when duration is > 0:

marker = otio.schema.Marker(
    name=name,
    marked_range=otio.opentime.TimeRange(
        start_time=mark_in,
        duration=(mark_out - mark_in),
    ),
    metadata={
        "fcp_xml": {
            "comment": comment,
        },
    },
)

timeline.tracks.markers.append(marker)
  1. OpenTimelineIO commit hash: cbef407 (current head of main at time of writing)
  2. Compiler information:
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.4.0
Thread model: posix

Expected Behavior

If the Marker's marked_range.duration.value > 0, I expect the value of out to be marked_range.start_time + marked_range.duration.value.

Additional Context

I have a fix for this locally that I'm happy to PR but I'm not really sure if there's a good reason for it to be hardcoded to -1. If so let me know and I'll close this issue!

@jhorrocks-tl jhorrocks-tl added the bug A problem, flaw, or broken functionality. label Sep 22, 2022
@reinecke
Copy link
Collaborator

Hi @jhorrocks-tl, thanks for submitting the issue!

I agree that this should not be hard-coded to -1. My guess would be (possibly for simplicity) the original implementer went with just using a default value for the out element as discussed in the FCP 7 XML spec:

Also, you can use -1 to override an existing encoding with an undefined or default value.

Interestingly, the adapter seems to read this value already.

We'd definitely welcome a PR to address this. Also, an example of another software package (like an NLE) generating or consuming markers with a duration in the FCP XML format would be a "nice to have" - just to validate whatever we do in practice.

I'm guessing you discovered this because you were using one of these OTIO generated files in some other software? Do you mind sharing which application you were importing the file into?

@jhorrocks-tl
Copy link
Contributor Author

Hey @reinecke, I put the PR up for it just waiting on the CLA Manager on my side. And yeah, we're auto-generating OTIO timelines that get imported into Adobe Premiere. The -1 actually works fine going into Premiere, it just comes through as an "instantaneous" (zero duration) marker when we really need to preserve the range for our use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A problem, flaw, or broken functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants