A bundle keeps a timeline together with its media, so it can be moved as one item. It is
a folder with the extension .otiod, or the same content in a ZIP file with
the extension .otioz.
Layout
| Entry | In .otiod | In .otioz | Meaning |
|---|---|---|---|
content.otio | Yes | Yes, compressed | A normal OTIO file holding the cut. |
version.txt | No | Yes, compressed | The OTIOZ version and nothing else, such as 1.0.0. |
media/ | Yes | Yes, uncompressed | The media files. |
Rules for content.otio
Each media reference is either a MissingReference, or an
ExternalReference whose target_url is a relative path into the
media folder.
Rules for the media folder
- It is flat, with no sub-folders.
- It holds every file that an
ExternalReferenceincontent.otiopoints to. - Each file must have a unique base name.
- Any codec or container is allowed, since OTIO does not decode media.
When writing a bundle
The source target_url values may be absolute, as
file:///path/to/some/file, or relative to the working directory. The
media_policy option says what happens to references that do not point to a
file.
| Policy | Meaning |
|---|---|
ErrorIfNotFile | Default. Raise an error if an ExternalReference does not point at a file. |
MissingIfNotFile | Replace such references with MissingReference, keeping the original in metadata. |
AllMissing | Replace all references with MissingReference, keeping the originals in metadata. No media is copied. |
A default read parses only content.otio. The ZIP is made with Python’s
zipfile library.