Skip to main content

NarrativeForge

NarrativeForge is a Python package that enhances videos by adding text and synthesized speech over a background video. It's designed to simplify the process of creating engaging videos with customizable text and voice narration.

Features

  • Add text and synthesized speech to background videos.
  • Customize font, color, and other text parameters.
  • Easily integrate into existing video editing workflows.

Installation

You can install NarrativeForge using pip:

pip install NarrativeForge

Additionally, you need to set up your OpenAI API key. Obtain your API key by following the instructions on the OpenAI website. Once you have the API key, you can set it as an environment variable:

export OPENAI_API_KEY="your-api-key-here"

Make sure to replace "your-api-key-here" with your actual OpenAI API key.

Usage

use in command line as

NarrativeForge -i "input.mp4" -t "Hello, World!, Enhance your videos with NarrativeForge"
from NarrativeForge import TextToVideo

# Create an instance of TextToVideo
text_to_video_instance = TextToVideo()

# Specify input video, text, and output filename
input_filename = "input_video.mp4"
texts = "Hello, World!, Enhance your videos with NarrativeForge"
output_filename = "output_video.mp4"

# Generate the enhanced video
text_to_video_instance.generate_video(
    input_filename, texts, output_filename, caption_padding=100
)

Replace input_video.mp4 with the path to your input video and customize the texts list accordingly. The enhanced video will be saved as output_video.mp4.

Configuration

You can customize various parameters using the generate_video function. Refer to the function signature and documentation for options.

Contributing

Contributions are welcome! If you find any issues or have suggestions, please open an issue or submit a pull request.

Metadata

Release files for NarrativeForge 0.1.7

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

Source distribution (sdist)

Source distribution for NarrativeForge 0.1.7
File Size Uploaded
NarrativeForge-0.1.7.tar.gz 4.4 kB Details

Built distribution (wheel)

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

Total release size: 10.4 kB

Release files / NarrativeForge-0.1.7.tar.gz

Download URL NarrativeForge-0.1.7.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4fec6550672a42a5c95db761e357ef1cf9e7b849b3660f4ba264b03f80d261a5
BLAKE2b-256 checksum
How to use checksums
8ab05b8eb1aebb3fa29165c2b5a8792117099dd8b7d7abfd2686f7eefcfecf9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Release files / NarrativeForge-0.1.7-py3-none-any.whl

Download URL NarrativeForge-0.1.7-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a68f2e48c20b28b0a33cc139efbfa64da09e8759736800c9774f82804a72d01e
BLAKE2b-256 checksum
How to use checksums
1060b92256f783d5ca5ddfa4a6a9f3334aa703ada1250fc43d617ab7f87353eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

1 release file

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