py_premiere
py_premiere is a Python package for working with Adobe Premiere Pro project files (.prproj).
About
Premiere Pro project files are gzip-compressed XML object graphs. This
package parses them into an Application object containing the project,
its item tree, sequences, tracks and clips. The API is very close to the
ExtendScript API, with
validated inputs.
Sibling project of py-aep.
Features
Supported
- Reading
.prprojfiles: project panel tree (bins, clips, media paths), sequences, tracks, track items (timeline and source times, playback-speed aware) - Components (effects) with parameters, static values and keyframes (materialized ones - Premiere synthesizes untouched intrinsics at runtime and stores nothing for them)
- Track transitions (name, matchName, timeline times, the cut point they cover, and the wipe controls: border width/colour, direction, reverse, anti-aliasing) - a surface the ExtendScript DOM never exposed
- Sequence and clip/project item markers (read and write: name, comments, start/end, colour index)
- Footage interpretation (alpha usage, ignore/invert alpha, field type,
pixel aspect - anamorphic media included), media start timecode
(
start_time) and attached proxies (has_proxy,proxy_path) - Track state: mute, lock and sync lock
- Sequence work area, in/out points and playhead position
- Retiming: playback speed, reverse, and how a retimed clip fills frames (frame sampling / blending / optical flow)
- Generated media - Black Video, colour mattes, bars and tone, transparent video, counting leaders - identified by kind rather than by an empty path
- Creating from scratch:
py_premiere.new()projects,add_sequence,add_bin,import_files(BMP/PNG/JPEG/GIF/TIFF/PSD stills; WAV, AIFF, M4A, MP3, AAC and WMA audio; AVI, H.264/H.265/ProRes/DNxHR in MP4/MOV and MPEG-2 in MXF, carrying start timecode and field dominance) and placing clips withadd_clip/insert_clip - Modifying read/write attributes (names, track item times, markers) and
saving with
Project.save(path)(atomic, refuses to overwrite) - Adding and removing transitions (
track.add_transition), on a clip end or on a cut - clamped to the available handles exactly as Premiere does, and re-saved unchanged by it - Byte-identical round-trip: parse then save reproduces the original file byte for byte; files the serializer cannot faithfully reproduce are refused at parse time instead of silently rewritten
- Values validated against Premiere's own ExtendScript DOM (ground-truth JSON fixtures exported from Premiere)
- Effect masks (on an effect or on the clip) and time remapping - surfaces the ExtendScript DOM never exposed
- Caption tracks: each caption's text and both its timeline and source
times (
sequence.caption_tracks) - Subclips (
is_subclipand the boundaries that narrow them) and Motion Graphics template clips (their Essential Graphics parameters, including the edited text) - FCPXML export (
py_premiere.export.export_fcpxml) - CLI tools:
pr-inspect(structure),pr-compare(resave-churn-aware diff),pr-visualize(parsed tree),pr-validate(ground truth)
Not supported (yet)
- Popup/menu param value decoding (exposed as raw strings; verified encodings are decoded). Arbitrary-data params decode when they hold text or a shape path
- The caption enable flags and stroke-alignment popup (their slots are decoded but the values are all 0/1/2, so nothing names them yet)
- Importing media beyond the formats listed above
XMP metadata is not a gap: Premiere writes an item's XMP packet into the
media file, not into the project, so there is none in a .prproj to read.
Installation
uv (recommended)
uv add py-premiere
pip
pip install py-premiere
Getting started
import py_premiere
app = py_premiere.parse("myproject.prproj")
project = app.project
for sequence in project.sequences:
for track in sequence.video_tracks:
for clip in track.clips:
print(clip.name, clip.start.seconds, clip.end.seconds)
project.sequences[0].name = "Renamed"
project.save("renamed.prproj")
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_premiere-0.1.0.tar.gz.
File metadata
- Download URL: py_premiere-0.1.0.tar.gz
- Upload date:
- Size: 436.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8a439c25ff09f2a84660cf72cae66939ac9b94eb3e3774a1349178507939bc7
|
|
| MD5 |
3e8ac6b17789553124e9d7c0743e3787
|
|
| BLAKE2b-256 |
bdcf2e445a51f56e5aadc39b08c78103dc23124eb770e8ba81223a91f8b93f9d
|
Provenance
The following attestation bundles were made for py_premiere-0.1.0.tar.gz:
Publisher:
release.yml on Pouf/py-premiere
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_premiere-0.1.0.tar.gz -
Subject digest:
b8a439c25ff09f2a84660cf72cae66939ac9b94eb3e3774a1349178507939bc7 - Sigstore transparency entry: 2368089058
- Sigstore integration time:
-
Permalink:
Pouf/py-premiere@105373c79a816e93fec9b916d60f65e39eefafc4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Pouf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@105373c79a816e93fec9b916d60f65e39eefafc4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file py_premiere-0.1.0-py3-none-any.whl.
File metadata
- Download URL: py_premiere-0.1.0-py3-none-any.whl
- Upload date:
- Size: 221.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
955c9ddb30800e0bf6c0b03fb2b3752b52a295a9a84af7ec76ecd89b0cf0ecd1
|
|
| MD5 |
2a198bfe8f66dfb2fe179aaa0260c3d2
|
|
| BLAKE2b-256 |
9c47274fbe4dbfad990ac9170792600b0a88c89abc60e73583ec4955a3a9197d
|
Provenance
The following attestation bundles were made for py_premiere-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Pouf/py-premiere
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_premiere-0.1.0-py3-none-any.whl -
Subject digest:
955c9ddb30800e0bf6c0b03fb2b3752b52a295a9a84af7ec76ecd89b0cf0ecd1 - Sigstore transparency entry: 2368089211
- Sigstore integration time:
-
Permalink:
Pouf/py-premiere@105373c79a816e93fec9b916d60f65e39eefafc4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Pouf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@105373c79a816e93fec9b916d60f65e39eefafc4 -
Trigger Event:
push
-
Statement type: