@bevyl-ai/premiere-project
v0.2.7
Published
Typed Premiere project model, construction helpers, and serialization
Readme
Premiere Project
@bevyl-ai/premiere-project owns the supported native Premiere project model,
construction helpers, and serialization. It has no dependency on Bevyl's editor
types, caption behavior, asset lookup, or style policy.
Public Contract
PremiereProject contains the document version and an ordered collection of
native Premiere objects. Each object identifies its schema type, XML tag, and
typed value. Order is preserved, including repeated objects and different object
types that share an XML tag. The model and object serializers are generated from
schema/adobe-prgraphic.xsd, not a separate editor timeline schema.
import {
buildEmptyProject,
encodeProject,
serializeProject,
type PremiereProject,
} from "@bevyl-ai/premiere-project";
const project: PremiereProject = buildEmptyProject({
name: "Main",
canvas: { width: 1920, height: 1080 },
frameRate: { numerator: 30000, denominator: 1001 },
durationInFrames: 90,
});
const xml = serializeProject(project);
const prproj = encodeProject(project);Callers may construct the model directly or use helpers that return native
schema values. AdobeProjectBuilder.build() returns a PremiereProject
containing graphics components, without a sequence or project shell.
buildGraphicObjects(graph) assembles native objects for embedding;
buildTextProject(graph) combines those objects with a standalone project
shell. Construction and serialization use the same native model.
buildMogrt(project, definition) packages a native project and an
AdobeMogrtDefinition; it does not interpret source-editor tracks.
The sibling premiere-bundle-builder package owns Bevyl conversion. Its
buildMogrt accepts canonical Bevyl tracks, resolves their presentation, and
passes native Premiere construction data to this library. MogrtRenderGraph
contains native fragments, text, and PostScript font names. Font files, CSS text
runs, caption display windows, and source-editor items stay in the adapter.
Native font size and tracking encode the supplied values directly. Browser
matching adjustments belong to the caller, not the format writer.
Fill and stroke visibility are independent; run visibility masks both.
Supported Format
The XSD describes the inspected text, media, sequence, and audio-routing subset.
It is not a complete Adobe format specification. Unknown root object kinds and
unsupported Component.Node content fail explicitly rather than disappearing.
There is no arbitrary-project parser or general XSD validator.
The wire: annotations preserve compact-version field ordering and omitted
defaults. Binary parameters retain explicit empty text. XML attribute order,
object order, source-text FlatBuffers, and deterministic gzip/ZIP packaging are
owned here. The two inspected media Motion profiles retain their distinct
numeric formatting and bounds.
ZIP timestamps use a fixed calendar date, independent of the host timezone.
buildImageSource and buildAvSource construct supported source metadata;
callers supply resolved metadata, IDs, placement, and registration.
applyProjectSequenceView updates timeline framing on the native model before
serialization.
Verification
bun run generate
bun run build
bun run lintThe workspace patches @abapify/[email protected] for dotted property names, following
upstream PR #192. Remove that patch
when upgrading to a release containing the fix.
Existing empty-project fixtures verify exact XML at integer and fractional frame rates. The Bevyl adapter's graphics fixture verifies static text, backplates, and later-page karaoke through the same public serialization API. Its mixed native-project fixture verifies deterministic output for video, mono/stereo audio, images, text, and captions at 30 and 30000/1001 fps. These checks do not replace native Premiere open/render verification.
