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

Support for Standalone Clips (When Project Not Present) #99

Closed
samplue opened this issue May 17, 2024 · 17 comments · Fixed by #101
Closed

Support for Standalone Clips (When Project Not Present) #99

samplue opened this issue May 17, 2024 · 17 comments · Fixed by #101
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@samplue
Copy link

samplue commented May 17, 2024

One thing I'd love to see is drag-n-drop support for compound clips. We edit scenes and entires reels in compound clips instead of projects. Unfortunately MarkerData will throw out an error. Copy pasting the timeline into a project works fine, but I'd love to avoid this extra step.

@IAmVigneswaran IAmVigneswaran changed the title Support for compound clips in MarkerData Support for Compound Clips (First Level) May 17, 2024
@IAmVigneswaran IAmVigneswaran added the enhancement New feature or request label May 17, 2024
@IAmVigneswaran IAmVigneswaran added this to the 0.3.7 milestone May 17, 2024
@IAmVigneswaran
Copy link
Contributor

@orchetect Right now we are using Project's FCPXML to perform extraction.

Are we able to support Compound Clip's FCPXML? User's can also utilise Compound Clip for extraction.

Compound-Clip

@orchetect
Copy link
Contributor

Yeah that should be pretty straightforward.

IIRC, we're currently just taking the first project found in the FCPXML. Probably because that was the most common during our workflow and testing.

In later versions of the FCPXML format, it's possible to have a mixed variety of events, projects, and clips. For that reason I ensured the parser is already capable of finding them. It's just a matter of telling it what we want.

For MarkersExtractor, ideally it would autonomously determine its markers source based on what it finds in the FCPXML. I'd like to avoid having to require the user to tell it what the source is - and it may not be necessary any way for our needs.

I'm thinking the precedence for finding markers would be something like this:

  1. If a project is found in the FCPXML, use that project. If more than one project is found, use the first.
  2. Otherwise, check for a standalone clip. If more than one clip is found, use the first.

@IAmVigneswaran
Copy link
Contributor

I'm thinking the precedence for finding markers would be something like this:

  1. If a project is found in the FCPXML, use that project. If more than one project is found, use the first.
  2. Otherwise, check for a standalone clip. If more than one clip is found, use the first.

We can try this approach.

Thank you.

@orchetect
Copy link
Contributor

orchetect commented May 20, 2024

This is actually a lot more involved than it may have seemed.

  1. The notion of 'project' is pervasive in the source code and documentation, so I'm having to factor it out and replace it with the generic notion of a 'timeline'. That way a project or a clip or any conceivable timeline type can be used as the 'main timeline'. So it's involving code refactors but also changes to all the documentation to reflect that.

    For example:

    • projectTimecode naming mode will become timelineNameAndTimecode.
  2. Some ancillary good news is that it's also led to some refactors of the parser that will make handling timelines better.

Parser updates are done. It's now a matter of refactoring and updating MarkersExtractor to use the new 'timeline' nomenclature and paradigm.

@IAmVigneswaran
Copy link
Contributor

I will also update Marker Data's documentation site respectively; from project to timeline.

@orchetect
Copy link
Contributor

Yes, and really we are only really dealing with a single timeline regardless of what timeline it is. To the users, we blur this line by now inferring the timeline from a project or a standalone clip, etc.

@orchetect
Copy link
Contributor

orchetect commented May 20, 2024

When FCPXML only contains a clip:

  • That means that our Event Name, Project Name and Library Name manifest fields will be empty, since Final Cut does not export that data to the XML file in that case.
  • We'll use the clip name in place of the project name for folder and filename generation. Nomenclature for this will simply be "Timeline Name" for purposes of CLI help text and documentation.

@IAmVigneswaran
Copy link
Contributor

IAmVigneswaran commented May 20, 2024

When FCPXML only contains a clip:

  • That means that our Event Name, Project Name and Library Name manifest fields will be empty, since Final Cut does not export that data to the XML file in that case.
  • I believe users would know what to expect in the manifest fields when they don't use Project. I will make a note in the documentation website.

@orchetect orchetect changed the title Support for Compound Clips (First Level) Support for Standalone Clips (When Project Not Present) May 20, 2024
@orchetect
Copy link
Contributor

orchetect commented May 20, 2024

drag-n-drop support for compound clips

Are we able to support Compound Clip's FCPXML

Missed this question. Yes, dragging the clip directly from Final Cut Pro's browser will work. It creates intermediate FCPXML data containing just the clip. That's what I am using to unit test this as well.

orchetect added a commit that referenced this issue May 20, 2024
@orchetect orchetect linked a pull request May 20, 2024 that will close this issue
@orchetect orchetect reopened this May 20, 2024
@orchetect
Copy link
Contributor

New alpha build for testing: https://github.com/TheAcharya/MarkersExtractor/releases/tag/0.3.7-alpha1

@IAmVigneswaran
Copy link
Contributor

Thanks for the new alpha build. Will report back soon!

@IAmVigneswaran
Copy link
Contributor

On initial test, I get.

No timelines (projects or clips) could be found in the FCPXML.
Error: Error extracting timeline context.

This is a Compound Clip with first level clips.

Marker Data Demo_V3 Clip CC.fcpxmld.zip

@orchetect
Copy link
Contributor

orchetect commented May 20, 2024

Ah I think I figured it out.

For standalone clips, Final Cut exports the XML differently depending whether you:

  1. Select the clip in the browser then export XML via File → Export XML...

    This exports with this general structure:

    <fcpxml>
        <resources> ... </resources>
        <library ... >
            <event ... >
                <!-- single clip here, ie: ref-clip, sync-clip -->
            </event>
        </library>
    </fcpxml>
  2. Drag the clip from the browser and drop it outside of Final Cut (ie: as a text clipping on the desktop or an app that accepts FCPXML).

    This exports with this general structure:

    <fcpxml>
        <resources> ... </resources>
        <!-- single clip here, ie: ref-clip, sync-clip -->
    </fcpxml>

@orchetect
Copy link
Contributor

orchetect commented May 20, 2024

Also note: If it's a clip, MarkersExtractor will now use the clip name (and not project name) to:

  • name the output folder
  • used in filename ID if timelineNameAndTimecode ID naming mode is used (default, used to be projectTimecode)
  • use it as default media base filename when searching for a media file (MyClipName.mov, MyClipName.mp4, etc.)

@IAmVigneswaran
Copy link
Contributor

Noted!

@orchetect
Copy link
Contributor

Ok, timeline parsing is more robust now, and from my initial testing, it should work as expected.

Try alpha2: https://github.com/TheAcharya/MarkersExtractor/releases/tag/0.3.7-alpha2

@IAmVigneswaran
Copy link
Contributor

Just did a quick test! Seems to be working as expected! Thank you, Steffan!

We can safely release 0.3.7?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants