OpenTimelineIO Media Linkers are plugins that allow OTIO to replace MissingReferences with valid, site specific MediaReferences after an adapter reads a file.
The current MediaLinker can be specified as an argument to otio.adapters.read_from_file or via an environment variable. If one is specified, then it will run after the adapter reads the contents of the file before it is returned back.
To write a media linker, write a python file with a “link_media_reference” function in it that takes two arguments: “in_clip” (the clip to try and add a media reference to) and “media_linker_argument_map” (arguments passed from the calling function to the media linker.
deflink_media_reference(in_clip,media_linker_argument_map):d.update(media_linker_argument_map)# you'll probably want to set it to something other than a missing referencein_clip.media_reference=otio.schema.MissingReference(name=in_clip.name+"_tweaked",metadata=d)