Skip to main content

AI-assisted video-production workflows for Adobe Premiere Pro, built on premiere-cli

Project description

premiere-ai

AI-assisted video-production workflows for Adobe Premiere Pro, built on top of premiere-cli (which provides the premiere-cli/premiere-log CLIs and the Premiere Bridge CEP panel).

Installation

pip install -e .

Commands

transcribe <input_file>

Transcribes an audio or video file in two passes:

  1. VibeVoice-ASR (mlx-community/VibeVoice-ASR-4bit) — produces a transcript in .txt, .srt, or .vtt format
  2. Qwen3-ForcedAligner (mlx-community/Qwen3-ForcedAligner-0.6B-4bit) — aligns each ASR segment to produce word-level timestamps saved as .words.json

Video files have their audio extracted automatically via ffmpeg before transcription.

transcribe video.mp4
transcribe audio.wav --format srt --language English
transcribe audio.m4a --output transcript --verbose

Options:

Flag Default Description
--output / -o input filename stem Output path (without extension)
--format / -f txt Transcript format: txt, srt, or vtt
--language / -l English Language name for the forced aligner
--verbose / -v off Show inference progress

Output files:

  • <stem>.txt / .srt / .vtt — transcript
  • <stem>.words.json — word-level timestamps as [{"text": "word", "start": 0.123, "end": 0.456}, …]

Prerequisites — download models before first use:

hf download mlx-community/VibeVoice-ASR-4bit
hf download mlx-community/Qwen3-ForcedAligner-0.6B-4bit

remove-pauses <input_file>

Detects pauses to remove from an audio or video file:

  1. Transcribes it (reusing transcribe's output if a matching .words.json already exists next to the input).
  2. Asks Claude (claude-opus-4-8, via the Anthropic API) which word-gaps are phrase/sentence boundaries — by default, only these are considered candidates for cutting. Pass --allow-mid-phrase-cuts to skip this check entirely and consider every word-gap a candidate.
  3. Runs Silero VAD (via torch.hub) to confirm which candidate gaps are actually silent.
  4. Narrows each confirmed pause with asymmetric frame margins controlled by --aggressiveness: a small fixed buffer after the preceding word, and a larger buffer before the next word that shrinks as aggressiveness increases (since cutting too close to the next word risks clipping it).

Each cut range is a half-open [start, end) interval: start is the first frame to delete, end is the first frame that remains — matching the standard NLE in/out-point convention.

remove-pauses recording.wav
remove-pauses video.mp4 --aggressiveness 0.8 --min-pause 250
remove-pauses interview.mp4 --allow-mid-phrase-cuts

Options:

Flag Default Description
--aggressiveness / -a 0.5 0=conservative, 1=aggressive (cuts tighter to the next word)
--min-pause 300 Minimum pause duration in ms worth cutting
--fps 25 Frame rate used for MM:SS:FF timecodes
--language / -l English Language name for the forced aligner (when transcribing)
--output / -o <stem>.cuts.txt Path to write the cut list
--allow-mid-phrase-cuts off Also cut pauses that aren't at a phrase/sentence boundary (skips the Claude boundary check entirely)
--verbose / -v off Show inference progress

Output:

  • Printed to stdout and written to <stem>.cuts.txt: one MM:SS:FF - MM:SS:FF pause range per line, plus a final "Total pause time removed: M:SS.s" line (when any cuts are found).

Prerequisites:

  • ANTHROPIC_API_KEY must be set (in the environment or a .env file) unless --allow-mid-phrase-cuts is used, since that flag skips the Claude API call entirely.
  • First run downloads the Silero VAD model via torch.hub (requires network access).

zmbv-to-h265-vga <input_file> [output_file]

Converts a DOSBox ZMBV screen recording (VGA palette) to H.265/HEVC. Scales the frame up 2× using nearest-neighbour to preserve pixel-art crispness.


zmbv-to-h265-ega <input_file> [output_file]

Same as above for EGA palette recordings.


import-raw-footage <project_dir>

Locates the latest matching raw camera recording and mic recording, matches them by capture time (falling back to media duration), and copies both into <project_dir>/assets/video/ and <project_dir>/assets/audio/.

import-raw-footage /path/to/project
import-raw-footage /path/to/project --camera-file cam.mp4 --mic-file mic.wav

This package makes no assumption about your camera or mic hardware — auto-detection is entirely driven by environment variables, each optional and comma-separated for multiple locations:

Variable Purpose
PREMIERE_AI_CAMERA_GLOBS Glob pattern(s) for camera clips, e.g. /Volumes/MyCamera/DCIM/**/*.MP4
PREMIERE_AI_MIC_FLAT_ROOTS Directories checked directly (non-recursive) for *.wav/*.WAV
PREMIERE_AI_MIC_RECURSIVE_ROOTS Directories searched recursively for *.wav/*.WAV

Any variable left unset just means that source is skipped; passing both --camera-file and --mic-file explicitly needs none of them set. Full flag reference: import-raw-footage --help.


premiere-log / premiere-cli (from the premiere-cli package)

The Premiere-driving CLIs — premiere-log (send a message to the Premiere Bridge panel's log view) and premiere-cli (execute ExtendScript-backed commands against the open project) — live in the separate premiere-cli package, installed automatically as a dependency of this one. See that repo's README and docs/COMMANDS.md for the full command reference, including premiere-cli init-project, which creates a fresh empty project from a bundled template (formerly this package's create-empty-premiere-project).


File structure

src/premiere_ai/
    transcribe.py          transcription + forced alignment CLI
    pause_cuts.py          pure pause-detection logic (timecodes, margins, VAD inversion, Claude parsing)
    remove_pauses.py       remove-pauses CLI orchestration
    scripts.py             thin Python wrappers for the shell scripts
    sync_audio.py          sync-audio / audio-offset CLI
    import_raw_footage.py  import-raw-footage CLI
    zmbv_to_h265_vga.sh    VGA ZMBV → H.265 conversion
    zmbv_to_h265_ega.sh    EGA ZMBV → H.265 conversion
    font_metrics.py        font measurement utilities
tests/                     pytest suite mirroring the modules above

Development

git clone https://github.com/stefanwebb/premiere-ai
cd premiere-ai
pip install -e ".[dev]"
pytest

Scope

This package contains the AI-assisted workflow layer for video production. Everything that drives Premiere Pro itself (ExtendScript-backed commands, the CEP bridge panel) lives in the separate premiere-cli package, which this one depends on.

License

CC-BY-SA-4.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

premiere_ai-0.2.0.tar.gz (41.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

premiere_ai-0.2.0-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file premiere_ai-0.2.0.tar.gz.

File metadata

  • Download URL: premiere_ai-0.2.0.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for premiere_ai-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c4e68c484b4563e4cc704fadfd8f615c1d972115ba3106c83f3a76d6aca7c324
MD5 74400b7ad55a09b3d959eb50883333d0
BLAKE2b-256 cd2000d7774d56df6b0444ddc504cd130929235410e5251ffe42c528d72a73f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for premiere_ai-0.2.0.tar.gz:

Publisher: publish.yml on stefanwebb/premiere-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file premiere_ai-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: premiere_ai-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for premiere_ai-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8f8b00c14ccb37546da6616842a01f93092a9c98eb17ea51743763d0018a17e
MD5 1acfecb9a374f06dad5fc8d224cefc08
BLAKE2b-256 a288800a9b986b7d685f87aaff666611f1c584157d0e94366d92245e9ad10d18

See more details on using hashes here.

Provenance

The following attestation bundles were made for premiere_ai-0.2.0-py3-none-any.whl:

Publisher: publish.yml on stefanwebb/premiere-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page