Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Apple Final Cut Pro X FCPXML generated by script | "The item is not on an edit frame boundary"

  • FCPXML generated by script | "The item is not on an edit frame boundary"

    Posted by Dmitriy Samosenko on July 15, 2024 at 8:21 pm

    I’m, using script that generates fcpxml project, when i open it i see a lot of errors: “The item is not on an edit frame boundary

    And at the end of timeline i have some clips repeated with ~1 frame length (check attachment)


    As i saw in fcpxml projects generated by Final Cut duration tag uses math divide expression to define duration/offset/etc for example:

    <pre class=””><marker start=”20000/10000s” duration=”100/3000s” value=”Marker 2″ />

    FC don’t like decimals? Or need somehow to match framerate??

    Okay, so i’ve generated document:

    <pre class=””>…
    <asset-clip ref=”video4″ offset=”38799/2997s” name=”20 s2.mov” duration=”7665/2997s” />
    <asset-clip ref=”video5″ offset=”46465/2997s” name=”20 s3.mov” duration=”7589/2997s” />
    <asset-clip ref=”video6″ offset=”54055/2997s” name=”20 x.mov” duration=”15185/2997s”>

    so video4 offset 38799+7665 (duration) = 46464 (next clip offset)

    Than i add +1 to it to avoid overlapping and add next clip offset.

    What i’m doing wrong? FCPXML is attached below:

    https://drive.google.com/file/d/1ZEnd-1CP2Nj13s6ocWAwKohjFnKkPgPa/view?usp=sharing

    Mads Nybo jørgensen replied 8 months ago 2 Members · 10 Replies
  • 10 Replies
  • Mads Nybo jørgensen

    July 16, 2024 at 2:06 am

    Hey Dmitriy,

    “I’m, using script that generates fcpxml project”

    Where does the data/project come from that you are using the script to generate the fcpxml with?

    As a guide, if the framerate is based on video, then if progressive, 1 frame = 1 fps.

    Audio on the other hand, depending on the NLE, can be played back in a number of vays from locked to video to milliseconds.
    It all appears to be 29.97 fps, but maybe it is not?

    I suggest that you investigate the two clips.
    36 x – where does the “lens_flare” come from?

        <asset id="video17" format="r1" name="36 x.mov" start="0s" hasVideo="1" videoSources="1" duration="16.02s">
          <media-rep kind="original-media" src="file:///Volumes/Dropbox1/RealMedia%20Dropbox/Real%20Media/Media/Test/FC%20Test%20Address,%20Final%20Cut,%20testOLOLO/video/36%20x.mov" />
        </asset>
        <effect id="lens_flare"  name="Lens Flare" uid=".../Transitions.localized/Lights.localized/Lens Flare.localized/Lens Flare.motr" />

    And details for 36 x:

                </asset-clip>
                <asset-clip ref="video17" offset="165095/2997s" name="36 x.mov" duration="15274/2997s">
                  <timeMap>
                    <timept time="0s" value="0s" interp="smooth2" />
                    <timept time="2.2982332672809s" value="2.2782332672809s" interp="smooth2" inTime="0.5s" outTime="0.5s" />
                    <timept time="2.7982332672809s" value="13.721766732719s" interp="smooth2" inTime="0.5s" outTime="0.5s" />
                    <timept time="5.0964665345618s" value="16s" interp="smooth2" />
                  </timeMap>

    For 12 vo, that is an MP4 file. Which FCPX has a love-hate relation ship with:

        <asset id="video2" format="r1" name="12 vo.MP4" start="0s" hasVideo="1" videoSources="1" duration="9.51s">
          <media-rep kind="original-media" src="file:///Volumes/Dropbox1/RealMedia%20Dropbox/Real%20Media/Media/Test/FC%20Test%20Address,%20Final%20Cut,%20testOLOLO/video/12%20vo.MP4" />
        </asset>

    Details for 12 vo

                  <asset-clip ref="video2" offset="31067/2997s" name="12 vo.MP4" lane="-2" />
                </asset-clip>

    My first test would be to convert the MP4s to .MOV files, to see if that locks the duration?

    But as set out at the the top, where is the original data coming from before you use the FCPX XML generator?

    Atb

    Mads

  • Dmitriy Samosenko

    July 17, 2024 at 4:45 am

    After resaving FC generate this…

    <asset-clip ref=”r13″ offset=”501501/30000s” name=”20 x.mov” duration=”115115/30000s” tcFormat=”NDF” audioRole=”dialogue”>

    I need somehow to convert 1.25seconds to frames so it will match boundary…

  • Dmitriy Samosenko

    July 17, 2024 at 4:51 am

    Problem is not only with 36 x, between clips are a lot of gaps and at the end of timeline if you zoom in are almost all clips are being duplicated by 1 frame…

  • Mads Nybo jørgensen

    July 18, 2024 at 7:08 pm

    Hey Dmitriy,

    I still don’t know where you are coming from, and where you want to go with the edit that you are converting using XML.

    Your “1.25seconds” is likely to be related to a clip that are running at a different FPS.

    Atb
    Mads

  • Dmitriy Samosenko

    July 18, 2024 at 7:21 pm

    Okay, let start from initial task.

    I have video clips in folder and i need to generate fcpxml file, for that i need to get clip data, I’m using ffmpeg to get video metadata (length, frames, resolution, etc)

    Than i need to place those clips one by one to timeline. Everything works fine except issue with frames boundary that produces random issues…

    for example i have clips with 29.97 fps, length:

    1.25, 1.29, 2.3 seconds

    How i need to convert them to match FC frames?

  • Mads Nybo jørgensen

    July 20, 2024 at 3:11 pm

    Hey Dmitriy,

    Only two reasons for your problem that I can think off, is if you have mixed files with different frame-rates, or if there is ffmpeg file that not been closed properly if the original was a Long-GOP format.

    As you are Mac based, I would suggest as a test that you take the XML generated from the ffmpeg files and put that through SendToX?
    https://www.intelligentassistance.com/sendtox/

    I also have good experiences with intelligent assistance using XtoCC coming out of FPCX to Adobe PPro.
    https://www.intelligentassistance.com/xtocc/

    Hopefully you’ll get a working XML and you might be able to identify where the part-frames are sneaking in.

    Atb
    Mads

  • Dmitriy Samosenko

    July 21, 2024 at 10:04 am

    Okay, let’s investigate, fps is 29.97 (30000/1001)

    Duration from ffmpeg: 00:00:16.02 * 29.97 = 480,1194

    FCPXML file generated by FC: duration=”480480/30000s”

    480480/30000 = 16,016

    I’m a bit confused…

    i need somehow to get “480480/30000s” from 00:00:16.02…

  • Mads Nybo jørgensen

    July 21, 2024 at 10:38 am

    Hey Dmitriy,

    It is fairly straight forward, as you need to land on a full frame.

    So your 480,1194 needs to be rounded down to 480 frames.

    Or, you need to import the ffmpeg file as is 00:00:16.02 * 29.97

    And hope that FCPX on import makes it the same length…

    But “converting” the file out to individual frames, is clearly not working on import.

    Atb
    Mads

  • Dmitriy Samosenko

    July 21, 2024 at 10:54 am

    Final cut generates this:

    480480/30000s

    Now i need to make same value using math…

  • Mads Nybo jørgensen

    July 21, 2024 at 10:59 am

    Yes, and as you set out above, you are 0.004 from where you need to be.

    480480/30000 = 16,016

    I’m a bit confused…

    i need somehow to get “480480/30000s” from 00:00:16.02…

    Have you followed my suggestion of using SendToX to check if that makes a difference?

    As you are Mac based, I would suggest as a test that you take the XML generated from the ffmpeg files and put that through SendToX?
    https://www.intelligentassistance.com/sendtox/


    Atb
    Mads

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy