def create_otio_clip(track_item):
    media_pool_item = track_item.GetMediaPoolItem()
    mp_clip_property = media_pool_item.GetClipProperty()
    if (not self.project_fps):
        fps = mp_clip_property['FPS']
    else:
        fps = self.project_fps
    name = track_item.GetName()
    media_reference = create_otio_reference(media_pool_item)
    source_range = create_otio_time_range(int(track_item.GetLeftOffset()), int(track_item.GetDuration()), fps)
    if (mp_clip_property['Type'] == 'Audio'):
        return_clips = list()
        audio_chanels = mp_clip_property['Audio Ch']
        for channel in range(0, int(audio_chanels)):
            clip = otio.schema.Clip(name=f'{name}_{channel}', source_range=source_range, media_reference=media_reference)
            for marker in create_otio_markers(track_item, fps):
                clip.markers.append(marker)
            return_clips.append(clip)
        return return_clips
    else:
        clip = otio.schema.Clip(name=name, source_range=source_range, media_reference=media_reference)
        for marker in create_otio_markers(track_item, fps):
            clip.markers.append(marker)
        return clip
def create_otio_clip(track_item):
    media_pool_item = track_item.GetMediaPoolItem()
    mp_clip_property = media_pool_item.GetClipProperty()
    if (not self.project_fps):
        fps = mp_clip_property['FPS']
    else:
        fps = self.project_fps
    name = track_item.GetName()
    media_reference = create_otio_reference(media_pool_item)
    source_range = create_otio_time_range(int(track_item.GetLeftOffset()), int(track_item.GetDuration()), fps)
    if (mp_clip_property['Type'] == 'Audio'):
        return_clips = list()
        audio_chanels = mp_clip_property['Audio Ch']
        for channel in range(0, int(audio_chanels)):
            clip = otio.schema.Clip(name=f'{name}_{channel}', source_range=source_range, media_reference=media_reference)
            for marker in create_otio_markers(track_item, fps):
                clip.markers.append(marker)
            return_clips.append(clip)
        return return_clips
    else:
        clip = otio.schema.Clip(name=name, source_range=source_range, media_reference=media_reference)
        for marker in create_otio_markers(track_item, fps):
            clip.markers.append(marker)
        return clip