Swift library for reading and writing Avid Media Composer .avb bins as a domain dictionary of chunks (not an in-memory typed object tree).
License: MIT — see LICENSE.
Repo: github.com/DJFio/swiftAVB
- macOS 11+
- Swift 5.5+
dependencies: [
.package(url: "https://github.com/DJFio/swiftAVB.git", from: "1.0.0"),
],
targets: [
.target(name: "YourTarget", dependencies: ["SwiftAVB"]),
]Local path:
.package(path: "../swiftAVB")import SwiftAVB
let doc = try SwiftAVB.open(url: URL(fileURLWithPath: "MyBin.avb"))
// VersusSync-style flow (no OTIO roundtrip):
let compositions = AVBVersusSync.listCompositions(doc: doc)
let cmpo = compositions[0].index
let tracks = try AVBVersusSync.listTracks(doc: doc, compositionIndex: cmpo)
let subCaps = try AVBVersusSync.subCapInfo(doc: doc, compositionIndex: cmpo)
let timeline = try AVBVersusSync.load(
doc: doc,
compositionIndex: cmpo,
options: .init(selectedTrackIndex: tracks.first?.index ?? 0, includeSubCapAsMarkers: subCaps.hasSubCaps)
)
print(timeline.track.segments.count, timeline.track.markers.count)
// Optional: same data as VersusSync .otio
let otio = try AVBVersusSync.exportOTIO(doc: doc, compositionIndex: cmpo)- Docs/API.md — public API reference
SwiftAVBWalker — macOS bin inspector UI (download + notes).
Codec layouts and format knowledge draw on pyavb (MIT, Mark Reid) and AVB-analyze (MIT). OMF/AAF sample files were used for research only and are not redistributed.