Python - Sequence attributes in Flame 2022

I’m trying to get the timecode values for ‘Media Start’, ‘Media End’, and ‘Media Duration’ of a sequence with python (2022.2). The sequence attribute ‘start_time’ seems to correspond to ‘Media_start’ in the media panel but there’s no ‘end_time’ or somesuch that corresponds to the ‘Media_End’. The ‘duration’ attribute is actually ‘In/out Duration’ and there doesn’t seem to be one for ‘Media Duration’ either.

Am I missing something or are the sequence attributes really this incomplete and/or inconsistent with their tokens in the media panel?

You are right that it is not possible to do so out of the box right now. Please submit an Improvement request at for it.

In the meantime, you could use on of these two methods:

via in/out mark removal

def getClipEndTime( clip ):
    inmark = clip.in_mark.get_value()
    outmark = clip.out_mark.get_value()
    clip.in_mark = None
    clip.out_mark = None
    duration = clip.duration
    clip.in_mark = inmark
    clip.out_mark = outmark
    return clip.start_time.get_value() + duration

via segments start/end

def getClipEndTime( clip ):
    if len(clip.versions) > 0 :
        track = clip.versions[0].tracks[0]
        track = clip.audio_tracks[0].channels[0]
    return track.segments[-1].record_out + 1
        def getClipFullDuration( clip ):
    return  getClipEndTime( clip ) - clip.start_time.get_value()

Ah - interesting. Thanks for the help, Fred!