A package for adding text and ai generated voice to videos.
Project description
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.
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
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 NarrativeForge-0.1.6.tar.gz.
File metadata
- Download URL: NarrativeForge-0.1.6.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dbc0d4c0df55b80420440c5fe58d8b77cb38d6fc26d466174e7581158b616c5
|
|
| MD5 |
3487dd21f195447b86a2dc6c69525bfe
|
|
| BLAKE2b-256 |
627402c43ad709617523cbfbbe63336c51dc3e3fa4adb09b45716c125ce77080
|
File details
Details for the file NarrativeForge-0.1.6-py3-none-any.whl.
File metadata
- Download URL: NarrativeForge-0.1.6-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13ef6f7981ea737cfd94c8710a138c58b427e3f6df8807911376f0f54ba2485c
|
|
| MD5 |
d666149d33ef5dd201629020cdbc9c34
|
|
| BLAKE2b-256 |
49b663b9f7be4e68bc83ed67c87e7ae87acb14f07acec8566658398fec5a2cd8
|