-
Notifications
You must be signed in to change notification settings - Fork 414
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
Final Cut Pro X - XML File #156
Comments
I found this on the developer documentation about the XML format itself, but could definitely use some pointers for where to start. The XML looks a lot more involved than just the CSV though at a first glance. If you could provide an example XML that would be helpful for me to judge the effort required to implement this. Thank you! |
Marking as on-hold until further information can be gleaned as to the scope of this feature. Closing issue to cleanup backlog, feel free to re-open in future if desired. |
I am very interested in a feature like this. Having it could save a lot of time with my workflow and also hopefully fix a few quirks with the current one (like with colorspace conversion or disk space required for lossless conversions) |
I tried to find if someone else might've made something like this before but could only find https://github.com/Mirellanmawl/PySceneDetect-CSV-to-Vegas-EDL and https://github.com/duolanda/scene-detect-to-xml |
If you can provide an example of what this XML should look like I can certainly look into adding support for it. I don't have Final Cut Pro so I will need some assistance with testing as well. Could add a few new commands to the CLI like |
I can work on that, to get one to you. I use Premiere Pro and Davinci Resolve. FCP XML is pretty much supported with all major NLEs luckily and has been better for me than EDL. You could save one out or import one in both programs. |
Awesome, yeah if we can just get the most simplest "ground truth" XML so to speak I can use that as the test case for validation purposes. Ideally it would just be a short clip with 3 or more cuts, can just be manually placed. I'm also curious if you can specify a shorter start/duration if for example the If this XML could be validated on all of the programs you mentioned as well then it should be no problem at that point in adding a new command. One open question I have that might need some testing is how robust these parameters need to be:
I'm assuming some of that information can be simply omitted (edit: looks like that may be the case indeed), so hoping we can come up with the smallest example that works with all of those programs you listed. Thanks! The smallest thing I think is something like (with some of my own comments inline for things that need to be determined): <fcpxml version="1.10">
<resources>
<!-- can format be omitted? -->
<format id="r1" name="FFVideoFormat1080p30"/>
<!-- can start/duration be omitted? can they be overriden? if so how does it affect start/duration in the clips below? -->
<asset id="r2" start="0s" duration="10s">
<media-rep kind="original-media" src="file:///Volumes/media/MyMovie1.mov"/>
</asset>
</resources>
<event name="Scenes">
<!-- can format be omitted? can audio_role be omitted? -->
<!-- what does setting offset (e.g. offset="5s") do? -->
<asset-clip name="scene1" ref="r2" format="r1" start="0s" duration="10s" audioRole="dialogue"/>
<asset-clip name="scene2" ref="r2" format="r1" start="0s" offset="5s" duration="20s" audioRole="dialogue"/>
<asset-clip name="scene3" ref="r2" format="r1" start="10s" duration="40s" audioRole="dialogue"/>
</event>
</fcpxml> |
I've created a few test files in Davinci Resolve and Premiere Pro. I hope they might be useful. I took this video from http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4, imported it into Davinci Resolve, onto a timeline, and ran the cut detection in the app which went through and added splices for each cut. That is the base for all of these files. I then exported it out of Resolve with the FCP 7 XML V5 Files option which creates an XML file. There were other options like FCPXML 1.9 which might've been what I linked above but the extension .fcpxml isn't detected when I go to import in Premiere, even after renaming to XML. FCP 7 XML V5 works though. I exported this from Davinci and imported it into Premiere and re-exported it with the Final Cut XML option. I did this for a timeline with audio and without. I can't upload an XML file directly on GitHub, but was able to zip them up and upload that. According to this https://helpx.adobe.com/premiere-pro/how-to/migrate-from-final-cut-pro.html Final Cut Pro X generated files aren't compatible with Premiere, but older FCP7 files would be. |
Here's the documentation for the FCP 7 XML format https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/AboutThisDoc/AboutThisDoc.html#//apple_ref/doc/uid/TP30001152-TPXREF101 I saw this as well which might be cool as a library to use in PySceneDetect https://opentimelineio.readthedocs.io/en/latest/tutorials/adapters.html https://github.com/PixarAnimationStudios/OpenTimelineIO |
Awesome, thank you so much. One last thing that would be super helpful is, if you could repeat what you did with those XMLs, but using just the first 30 seconds of that clip, as well as the same thing but at 23.976 FPS and at 30 FPS (re-encoding is fine). I need to work out how the timing values are calculated and that would help work out any edge cases. (No need for more than the first 30 seconds) Really appreciate these samples. I can't commit to any definite timelines just yet, but will likely target this for v0.6.1 (right after the upcoming release). I may need some help testing some hand-crafted XMLs once this is being worked on just to verify that everything will work, but what you provided should be perfect for getting that started. Thank you! Edit: Found one more implementation that might help as a reference: https://github.com/antiboredom/videogrep/blob/master/videogrep/fcpxml.py I didn't realize Davinci Resolve is free, so I'll see how far I can get using that for some testing while developing this out. |
Just a quick update, have scheduled this for v0.7, but right now I don't have many cycles to tackle this. If anyone else wants to step in and submit a PR for this though, would be happy to accept that. Thanks for your patience. |
First of all, sorry for my English. It is not my native language. I hope I can explain myself well. In Davinci Resolve, the scene cut detection window allows us to export the timecodes to EDL or SceneCut file format. For import it is the same, but EDL has some issues related to mismatched frame rates between the original file and the project when importing directly from the media page. Instead, the SceneCut format is very simple at that. It only counts the total frames and marks the frame that has differences from the previous frame. PySceneDetect or DVR-Scan just needs to put some value where it detects a scene change or in the case of DVR-Scan, in the start motion frame and then in the end motion frame. In the BlackMagic Desing forum I have asked but nobody has answered me yet the following: I have this data in a SceneCut file The value of the line from the first frame to the last can vary in relation to the sensitivity with which the tool detects differences with previous frames. |
I also found this project: May be useful when revisiting this. |
+1 for FCP XML support According to Apple, there were more than 2.5 million users of FCP as of 2018. Enlyft reports that they have data on 36,427 companies that use FCP. |
Description of Problem & Solution
Request the ability export scene cut information directly to a FInal Cut Pro XML file.
Media Examples:
Guide to XML
https://support.apple.com/guide/final-cut-pro/use-xml-to-transfer-projects-verdbd66ae/mac.
Proposed Implementation:
From what I understand it is the same information as the CSV file but in "FCPX" XML format
Alternative Solutions:
Writing a python converter between the CSV output and the XML format.
The text was updated successfully, but these errors were encountered: