Skip to main content
readmepic

Check out these examples with captions added using Captametropolis (by CurioBurstz):

CurioBurstz No. 1 CurioBurstz No. 2

Captametropolis

GitHub issues GitHub pull requests

Stargazers repo roster for @AppSolves/captametropolis Forkers repo roster for @AppSolves/captametropolis

Captametropolis brings next-level automated captions to your YouTube Shorts and other videos using Whisper and MoviePy.

Introduction • Features • Installation • Usage • Customization • License


👋 Welcome to Captametropolis, a tool designed to make your videos even more engaging with stunning automatic captions! The process is seamless, fast, and adds flair to your content.

Captametropolis ✨

Introduction 📖

Forked from unconv/captacity

Just like captacity, but BIGGER!

Captametropolis takes video captioning to a new level! Whether you're making YouTube Shorts, TikToks, or any other type of video content, Captametropolis helps you effortlessly add beautiful, dynamic captions with precision using Whisper for speech recognition and MoviePy for video editing.

Features 🚀

  • Automatic Captions: Powered by Whisper, Captametropolis transcribes your video and adds captions with ease.
  • Custom Fonts & Styles: Customize your captions with unique fonts, colors, sizes, shadows, and more.
  • Highlight Words: Focus attention on important parts by highlighting specific words in real-time.
  • Local & API Whisper Support: Use OpenAI's Whisper locally or via API for transcription.
  • Programmatic Integration: Easily integrate Captametropolis into your Python projects.

Installation 🛠️

Prerequisites 📦

Make sure to install the following:

  1. FFmpeg: Download the latest version from here and ensure it’s added to your PATH.
  2. ImageMagick: Download from here, making sure to select:
    • Install legacy utilities (e.g. convert)
    • Add application directory to your system PATH.

Install Captametropolis ⚙️

To install the latest version of Captametropolis, run the following command:

pip install captametropolis -U

Once installed, you can add captions to a video by running:

captametropolis <video_file> <output_file>

Font Registration 🎨

To use custom fonts in your captions, register them with ImageMagick. Run the following in admin mode:

captametropolis register_font "path/to/your/font.ttf" -qr

Alternatively, register fonts programmatically in Python:

from captametropolis.utils import register_font

register_font("path/to/your/font.ttf", quiet_run=True)  # Will also ask for admin rights

Programmatic Use 💻

Easily add captions to your videos programmatically using Captametropolis:

import captametropolis

captametropolis.add_captions(
    video_file="my_short.mp4",
    output_file="my_short_with_captions.mp4",
    font_path="path/to/your/font.ttf",  # Use your custom font here
)

Customization 🎨

Customize your captions with full control over fonts, colors, effects, and more! Check out the customizable parameters:

captametropolis.add_captions(
    video_file="my_short.mp4",
    output_file="my_short_with_captions.mp4",

    font_path = "/path/to/your/font.ttf",
    font_size = 130,
    font_color = "yellow",

    stroke_width = 3,
    stroke_color = "black",

    shadow_strength = 1.0,
    shadow_blur = 0.1,

    highlight_current_word = True,
    highlight_color = "red",

    line_count=1,
    rel_width = 0.8,  # Relative width of the text box
)

Using Whisper Locally vs API 🧠

By default, Captametropolis uses OpenAI’s Whisper locally if the openai-whisper package is installed. If you want to use the OpenAI Whisper API instead, you can force this behavior:

captametropolis.add_captions(
    video_file="my_short.mp4",
    output_file="my_short_with_captions.mp4",
    use_local_whisper=False,  # Use the OpenAI Whisper API
)

To install Whisper locally, run:

pip install captametropolis[local] -U

Conclusion 🎉

Captametropolis makes adding captions to your videos as simple as it is powerful! Enhance your videos and reach a wider audience with engaging captions. 🚀

License 📜

This project is licensed under the MIT License. See the LICENSE file for more details.

Metadata

Release files for captametropolis 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for captametropolis 1.1.3
File Size Uploaded Provenance Actions
captametropolis-1.1.3.tar.gz 161.4 kB With provenance Details for captametropolis-1.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for captametropolis 1.1.3
File Interpreter ABI Platform Actions
captametropolis-1.1.3-py3-none-any.whl Python 3 none any Details for captametropolis-1.1.3-py3-none-any.whl

Total release size: 320.3 kB

Release files / captametropolis-1.1.3.tar.gz

Download URL captametropolis-1.1.3.tar.gz
Size 161.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5383810c2fcf93274003cd4f1f1f4b0f3221297fefc231fa20953412baf91762
BLAKE2b-256 checksum
How to use checksums
10be3745db6e720b960f0f6a4a5e74d37fe04dff809fcc536b9492574cd7b3c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 1, 2025.

Transparency log

Release files / captametropolis-1.1.3-py3-none-any.whl

Download URL captametropolis-1.1.3-py3-none-any.whl
Size 159.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c32aabb8fe3932dfe2a601fd48c1353d36f0604d5ef4901923e6356826eb9ea
BLAKE2b-256 checksum
How to use checksums
dd1d9fe39c16b5db1c0ee24ef465146abbff587cd85e4794ed9d61b683c351d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 1, 2025.

Transparency log

Security for captametropolis 1.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for captametropolis-1.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 1, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page