AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.4k stars 276 forks source link

FCP xml adapter and invalid "out" values (premiere) #287

Open alatdneg opened 5 years ago

alatdneg commented 5 years ago

Hi, We've seen some clip duration issues, looks like the start-end / in-out values can be exported oddly from Premiere.

I'm guessing that most apps ignore the "out" attribute and just add the duration from the start-end properties.

In this example the in/out duration is a frame short, has anyone come across this before ?

This causes the otio clip to be one frame short.

<masterclipid>masterclip-26</masterclipid>
<duration>51</duration>
<rate>
<timebase>24</timebase>
<ntsc>FALSE</ntsc>
</rate>
<start>1574</start>
<end>1618</end>
<in>7</in>
<out>50</out>
ssteinbach commented 5 years ago

@alatdneg if you have a second, can you turn this into a unit test case we can add to the test suite? I think that might help debug it. @bashesenaxis might know the specifics of what you're asking, though.

alatdneg commented 5 years ago

Yeah, I've not had the contributors form signed off yet, not sure how you'd do a unit test for this, I think is a bug in how premiere writes it's FCP7 XML, it seems most apps ignore the "out" value and calculate it from "end"-"start"

bashesenaxis commented 5 years ago

Hmm, that does indeed look interesting.

duration = 51
out - in = 50 - 7 = 43
end - start = 1618 - 1574 = 44

The way that I would interpret that, is as follows

Therefor, the clip would be stretched in time ever so slightly. Or perhaps you are displaying a 24 fps clip on a 25 fps timeline? @alatdneg, can you confirm whether this is the case?

@ssteinbach, @jminor I`m not entirely sure if OTIO supports scaled clips at the moment?

boredstiff commented 5 years ago

Tagging @bbb999 to try and get some eyes from Premiere on it.

bbb999 commented 5 years ago

Could we have:

A PPro project (media doesn't matter) containing a sequence that, when exported, comes out a frame short?

ssteinbach commented 5 years ago

@bashesenaxis we have time effects including a linear time warp that we're starting to introduce to support scaled clips. for an example in the EDL adapter, see: https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/33ad026c7d46f106eb079f77324ffae6060691d5/opentimelineio/adapters/cmx_3600.py#L150

ssteinbach commented 5 years ago

Pinging @alatdneg just to put this back on your radar per our earlier conversation. See the question from @bbb999.

Thanks!

alatdneg commented 5 years ago

Here's the full clip item, I'll see if I can clean the timeline so you can have the whole thing

<clipitem id="clipitem-204">
    <masterclipid>masterclip-26</masterclipid>
    <name>test.mov</name>
    <enabled>TRUE</enabled>
    <duration>51</duration>
    <rate>
        <timebase>24</timebase>
        <ntsc>FALSE</ntsc>
    </rate>
    <start>1574</start>
    <end>1618</end>
    <in>7</in>
    <out>50</out>
    <pproTicksIn>74088000000</pproTicksIn>
    <pproTicksOut>529200000000</pproTicksOut>
    <alphatype>none</alphatype>
    <pixelaspectratio>square</pixelaspectratio>
    <anamorphic>FALSE</anamorphic>
    <file id="file-26">
        <name>test.mov</name>
        <pathurl>file://localhost/test.mov</pathurl>
        <rate>
            <timebase>24</timebase>
            <ntsc>FALSE</ntsc>
        </rate>
        <duration>51</duration>
        <timecode>
            <rate>
                <timebase>24</timebase>
                <ntsc>FALSE</ntsc>
            </rate>
            <string>00:00:00:00</string>
            <frame>0</frame>
            <displayformat>NDF</displayformat>
        </timecode>
        <media>
            <video>
                <samplecharacteristics>
                    <rate>
                        <timebase>24</timebase>
                        <ntsc>FALSE</ntsc>
                    </rate>
                    <width>1920</width>
                    <height>1080</height>
                    <anamorphic>FALSE</anamorphic>
                    <pixelaspectratio>square</pixelaspectratio>
                    <fielddominance>none</fielddominance>
                </samplecharacteristics>
            </video>
        </media>
    </file>
    <logginginfo>
        <description></description>
        <scene></scene>
        <shottake></shottake>
        <lognote></lognote>
        <good></good>
        <originalvideofilename></originalvideofilename>
        <originalaudiofilename></originalaudiofilename>
    </logginginfo>
    <colorinfo>
        <lut></lut>
        <lut1></lut1>
        <asc_sop></asc_sop>
        <asc_sat></asc_sat>
        <lut2></lut2>
    </colorinfo>
</clipitem>
alatdneg commented 5 years ago

I've got a cleaned timeline, is there someone I can email it to, it's too big to attach here.

jminor commented 5 years ago

@alatdneg, can you paste it into a gist? https://gist.github.com

alatdneg commented 5 years ago

https://gist.github.com/alatdneg/3a708eb34649631fea7ef774f1f95843