Skip to main content

Generate narrated movie recap videos from a single prompt.

Project description

English 简体中文

🎬 Movie Narrator

Python License CI PyPI

One Prompt → One Narrated Movie Video

Movie Narrator is an open-source toolkit that automatically generates movie recap videos with narration, subtitles, and rendered output from a simple command.


Features

  • 🎬 Generate movie recap scripts with LLMs
  • 🔊 Text-to-Speech narration (Edge-TTS by default)
  • 💬 Automatic SRT subtitle generation
  • 🎞️ Video rendering with MoviePy and FFmpeg
  • 📦 Metadata export
  • 🔌 Extensible pipeline architecture
  • 🐍 Pure Python implementation

Installation

Requirements

  • Python 3.10+
  • FFmpeg

Install FFmpeg

macOS

brew install ffmpeg

Ubuntu / Debian

sudo apt install ffmpeg

Windows

Download and install from: https://ffmpeg.org/

Verify installation:

ffmpeg -version

Install Movie Narrator

From PyPI

pip install movie-narrator

From Source

git clone https://github.com/yourusername/movie-narrator.git
cd movie-narrator
pip install -e .

For development:

pip install -e ".[dev]"

Quick Start

Generate your first narrated movie video:

mn create \
  --movie "飞驰人生" \
  --style "热血搞笑" \
  --duration 60

Check version:

mn version

Show help:

mn --help

Output

output/
└── 飞驰人生/
    ├── narration.mp3
    ├── subtitle.srt
    ├── metadata.json
    └── final.mp4
File Description
narration.mp3 AI-generated narration audio
subtitle.srt Synchronized subtitle file
metadata.json Segment timings and video config
final.mp4 Rendered video (16:9 or 9:16)

Future versions will add script.md and clips/ for scene-level output.


Pipeline

Current workflow:

Movie → Script → TTS → Subtitle → Render

Future workflow:

Movie → Research → Script → TTS → Subtitle →
Scene Detect → Scene Match → BGM → Render

Project Structure

movie-narrator/
├── src/movie_narrator/
│   ├── cli.py              # Typer CLI entry point
│   ├── config.py           # Pydantic settings
│   ├── models.py           # Data models
│   ├── pipeline/
│   │   ├── runner.py       # Pipeline orchestrator
│   │   ├── script.py       # LLM script generation
│   │   ├── tts.py          # Edge-TTS with caching
│   │   ├── subtitle.py     # SRT generation
│   │   └── render.py       # MoviePy video rendering
│   └── utils/
│       ├── async_utils.py  # Sync/async bridge
│       ├── font.py         # CJK font fallback
│       ├── llm.py          # OpenAI client wrapper
│       ├── prompts.py      # Prompt templates
│       └── json_parser.py  # LLM JSON extraction
├── tests/
│   └── test_context.py
├── docs/
├── assets/
└── .github/workflows/

Roadmap

v0.1.x

  • CLI
  • Script generation (LLM)
  • Edge-TTS narration
  • Subtitle generation
  • Video rendering
  • Research Agent
  • Background music
  • WhisperX alignment

v0.2.x

  • Scene detection
  • Automatic clip matching
  • Semantic scene search

v0.3.x

  • Workflow DSL
  • YAML pipeline execution
  • Web UI

v0.4.x

  • Plugin system
  • SDK
  • Third-party extensions

Documentation


License

Licensed under the AGPL-3.0 License.

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

movie_narrator-0.1.0.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

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

movie_narrator-0.1.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file movie_narrator-0.1.0.tar.gz.

File metadata

  • Download URL: movie_narrator-0.1.0.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for movie_narrator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 39940377df20d48ea919bb41be597c07eb306f20ccc6def337435d9b45cea7fe
MD5 b50a287e99ad22576c731f69d330979f
BLAKE2b-256 bfbe9e60fe856b7565ec0f9e6f95cb1031a1746e9cf27eb34b6a8f8678e5b321

See more details on using hashes here.

File details

Details for the file movie_narrator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: movie_narrator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for movie_narrator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca9b400d78fc1157663bdb0ee97738c47090b124b16d4c6158b0bfa0dea71730
MD5 bf2609a82216669a55517aebc3e90e7d
BLAKE2b-256 33c6b58202eec574e8bed42ad19647f07e880130cde41a53115f2e054ee3a8af

See more details on using hashes here.

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