-
Notifications
You must be signed in to change notification settings - Fork 289
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
timecode problem with FCP XML converter #830
Comments
It doesn't seem to be a simple NTSC eqauls True problem. |
I think we'd need an example FCP xml file to validate what's happening with the time warp, but I do have evidence of the wrong start offset coming through when using NTSC rates.
And the
And, in the FCP 7 UI the timecode range for the clip is: So, it would appear that perhaps what's happening is that the match to calculate source range is coming out to:
Since the timecode of 23.976 is counted as 24 (the timecode time drifts from "wall clock" time), this is adding the timecode time to wall clock time. I believe the correct thing to do is use If we generate the start time using: Then |
One other interesting observation: @msheby Which app did your original XML file come from? FCP 7 or Premiere? |
Root cause has been possibly identified by @msheby as stemming from exact frame rate tests against inaccurate values here: https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/466a9b51aeaab2aae20b46620eff6ec49c9106ba/src/opentime/rationalTime.cpp#L41 Proposed fix is one of: add an epsilon to the function signature, or to change the comparison loop such that the result returns true if the supplied value is no worse than the values in the table, or to hard code a tolerance of 1ms from an exact value. |
I think the intent behind those similar, but numerically wrong, rates (e.g. 29.97 vs 30000/1001) was to identify rates coming from "pragmatic" workflows where users had typed the convenient truncated rate, and to coerce them into the correct NTSC rates. Maybe that should be factored out into separate functions with clear intent, like The code as written seems to be using those lists of "valid" rates just when formatting or parsing timecode strings, which should be the only place in OTIO's base library where NTSC matters. The only other place would be in some of the adapters where timecode is used. The core of OTIO was designed to not care what the rate is, as long as it is positive. In this case, otiostat's output doesn't seem to be honoring that intent. |
Ah, so the issue @msheby references here #190 (comment) is another rate-rounding issue, not this one per se. |
Hi friends. Im having a similar issue in OTIO 0.16-dev (im running off of main / master) - and am looking for pragmatic solutions to getting an OTIO -> FCP7 XML for Premiere Pro workflows in the wild. Realistically, not all video used in our system will adhere to video broadcast standards and rates, as our software can ingest arbitrary sources. Our workflow is to export an OTIO file from our in progress AFVoundation OTIO wrapper, and then leverage Im unaware of adaptor flags or work arounds - im curious if there's any workarounds. |
Bug Report
Incorrect Functionality and General Questions
We used
otioconvert
on a FCP file with content described as:and got an output OTIO file with a bunch of
entries. So far so good. However,
otiostat
is unhappy with the resulting file:To Reproduce
Expected Behavior
Well, I would expect that
otiostat
would be happy withotioconvert
's output. That said, I don't know ifotioconvert
emits an incorrect decimal place, ifotiostat
needs to change its_top_level_rate
behavior (note both the 23.976 and 23.97602397602398 strings in its output), or even if there need to be additional entries in thevalid_timecode_rates
array.Screenshots
n/a
Logs
n/a
Additional Context
Interestingly enough, I get this on the same machine:
As such, I'm not sure why
otioconvert
writes a least significant digit of 9 instead of 8.The text was updated successfully, but these errors were encountered: