-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bug in Timeline with Mixed Frame Rate Clips #81
Comments
See if you can narrow down the symptoms. Are there mixed frame rates in the project? What clip type is it and what is its frame rate? What is the project frame rate? |
I'm not able to reproduce this. Can you email me the projects for both of these examples? |
Ok I've confirmed the issue with the sample projects. Will see if I can get a fix out this week. |
On analyzing the FCPXML, the numbers just don't make sense. I'll have to shelve this and come back to it because I just can't see how FCP is coming up with the time values it's using in the XML. (I've done a lot of mixed-framerate parsing already with FCPXML -- and everything has made sense so far, but not this.) |
Unrelated, but also something to keep in mind... FCPX doesn't do any DTD validation on export, so FCPX can itself export invalid FCPXML: |
Yes true. This isn't a DTD violation thankfully, it's the actual time value math that isn't adding up. And yet importing the XML back into FCPX imports everything to correct time positions. So the answer is somewhere, just needs to be found. Even accounting for frame rate scaling/conversion, no combination of operations seems to work out to the expected values in specific cases. TL;DR: In a project where the project frame rate differs from video asset frame rate, marker start times within an audition clip seem incorrect, no matter how you figure the frame rate conversion/scaling. All other clip types are fine and I can parse as expected. I want to say there's an offset or some piece of information missing from the XML, but again, FCPX knows how to interpret the very same XML on import. Puzzling. |
Can you share a FCPXML with the issue? |
I think I've cracked the nut. FCPX is doing frame rate scaling in a way I didn't anticipate. ie: In a project at 23.98 fps, an <asset-clip ref="r6" name="TestVideo2" duration="646646/24000s" format="r7" tcFormat="NDF" audioRole="dialogue">
<conform-rate srcFrameRate="25"/>
<marker start="177/25s" duration="1001/24000s" value="Audition 1"/>
<marker start="344/25s" duration="1001/24000s" value="Audition 2"/>
<marker start="22s" duration="1001/24000s" value="Audition 3"/>
</asset-clip> "r6" is a Time values within the <marker start="177/25s" ...
|
I have made the corresponding refactors and unit tests in DAWFileKit 0.4.1. The fix will propagate to MarkersExtractor 0.3.2. |
Ok I will pull open that project and see what's going on. |
After spending all evening hacking at this, it appears the frame rate scaling is way more nuanced than it first seemed. The scaling is not a simple formula between two rates, but varies depending on the nature of the individual rates and how they relate to each other. I've refactored DAWFileKit to resolve the issues with both sample projects above ( The chart found here is not quite aligning with real-world results that I'm seeing in practice. (For example, the chart indicates that no scaling happens between 23.98 and 60 but manual verification shows that scaling is in fact being performed and is required.) It would be more useful if they could show pull-up/pull-down rates instead. For that reason I will need to manually verify and unit test as many rate combinations as possible and see if any patterns emerge. There are rate groupings that will likely share similar scaling factors. |
Thus far I've been able to implement correct scaling and unit tests for the following:
In theory, the reciprocals should also be functional (ie: for any given test above, swap project rate with any of its containing media rates) Which means all of these scenarios should also be working, but have not been explicitly unit tested:
|
Seems to be working with our FPS testing timelines. I will close this issue for now. We can revisit or open this in future if any users reports on this issue. Thank you Steffan! |
Did you try putting 25.0fps clips in a 24.0fps timeline? |
@latenitefilms Thanks for pointing out. @orchetect Looks like 25FPS clips on 24FPS Timeline is not supported yet. |
Not all rate combinations have been tested for scaling yet so some may be incorrect. |
I've tried to get my head around a 25fps clip on a 24fps timeline, but even with this simple example (at the bottom of the page), I'm left very tired and confused: |
In DAWFileKit it's just a scaling factor I need to add. Doesn't take long to work it out but I need to create a test project first and add it to the unit tests which takes a while. |
Yeah, the only reason I stumbled across this is because I was looking at your You did have this: case .whole: // 24, 25, 30, 60
switch timelineFrameRate.compatibleGroup {
case .ntscColor:
return t / m // works for 23.98 timeline -> 25 media
...but |
24 → 25 would be |
Just added unit test. Incidentally I'll push a fix soon that adds 24 t/l with 25 media soon. In theory this should also add support for 25 t/l with 24 media, but not explicitly tested yet. I've added a supported scaling rate pairs chart to this DAWFileKit issue thread for reference. |
Ah, interesting! I actually tried with DAWFileKit and forced the calculation I think maybe the issue with the FCP Cafe post is that I'm basing things off the seconds value, but maybe it needs to rounded up to the nearest actual video frame? |
Steffan,
I notice a bug in frame / image extraction of 23.98 video file. For some reason, the marker position is not respected. There is an offset of 23 frames back.
In Timeline
Extracted Image
It does not happened to all markers but randomly on some markers.
The text was updated successfully, but these errors were encountered: