Skip to content

Media shows offline from a python-generated AAF file #62

@corentincharron

Description

@corentincharron

Hello,

For our internal CG pipeline I am writing a little script which rebuilds an edit with OTIO and exports if as AFF.

Currently, when I import the generated AAF into Premiere all my clips are brough in as offline files, and I don't know why.

I initially though it was due to UNC paths (footage are located on a network space), but after trying to mount my network location to a drive letter, the problem remained, so I ruled out this hypothesis.

I am just discovering otio, and finding the learning curve quite steep, so bare with me, it is certainly not a bug, definitely an error on my side, but any help would be very appreciated.

Here is a minimum reproducible example of how I build by AAF file:

from pathlib import Path
import opentimelineio as otio


sources = {
    "//my/network/location/shot1.mov": 55,
    "//my/network/location/shot2.mov": 26,
    "//my/network/location/shot3.mov": 71
}

timeline = otio.schema.Timeline("Demo")
track = otio.schema.Track(f"V1", kind=otio.schema.TrackKind.Video)
timeline.tracks.append(track)

for path, duration in sources.items():
    path = Path(path)
    clip = otio.schema.Clip(name=path.name)
    clip.media_reference = otio.schema.ExternalReference(
        target_url=otio.url_utils.url_from_filepath(path),
        available_range=otio.opentime.TimeRange(
            start_time=otio.opentime.RationalTime(value=0, rate=24),
            duration=otio.opentime.RationalTime(value=4, rate=24)
        )
    )
    track.append(clip)
destination = "//my/network/location/export.aaf"
otio.adapters.write_to_file(timeline, destination, adapter_name='AAF', use_empty_mob_ids=True)

Thank you for any help :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions