This project uses AI-powered text generation engines to generate video scripts, which are then used to create videos with frames, captions, and voiceovers. The project is written in Python and utilizes a variety of third-party services and APIs.
python
3.x (this project was developed usingpython
3.9.6)virtualenv
installed (or any virtual environment manager ex:conda
)pip
installedgit
installed
git clone https://github.com/Zentra94/ai-cinema-engine.git
virtualenv venv
venv/Scripts/activate
pip install -r requirements.txt
python configs.py
Please follow the instructions on each respective link to obtain the corresponding API keys for the services (all of them are free but have usage limits):
Add the API at the .env.example
file as follows, and rename as .env
as follows:
# .env
OPENAI_API_KEY=<OPENAI_API_KEY>
STABLEDIFFUSION_API_KEY=<STABLEDIFFUSION_API_KEY>
PICOVOICE_API_KEY=<PICOVOICE_API_KEY>
Please follow the instructions on each respective link to obtain the JSON-formatted keys and save them to their respective locations:
- Google Cloud Platform Service Account (Speech-to-Text) โ
keys/client_secrets.json
- Client Secrets (Youtube Data API v3) โ
keys/GCP_sa_key.json
You can have a E2E execution (create & upload a new video) running the python main.py "TITLE PROMPT"
as the next example:
python main.py "create a unique title of a youtube video of 3 curios facts about pandas bears"
Wait some minutes, and you will have a result like this (click the image for check the video):
This will include: cover page image for the Youtube miniature (1), automatic title (2) and description (3).
Also, will upload some ad-hoc tags.
And will provide some multi-language subtitles (uploaded automatically as well).
For more details and configurations you can check packages/video_manges/core/screenwriter.py
& packages/video_manges/core/youtube.py
files.
python -m ipykernel install --name venv --display-name "Ai-cinema-engine-venv"
- Franco Zentilli Traverso (@Zentra94)
- Improve prompt engineering music.
- Correct match between input language and narrator, images, prompts (fail example)
- Expand channels: upload video to multi social media and formats: reels, shorts, tiktok, instagram, etc..
- Migrate & Upload videos to GCP database.
- Add a short intro and outro (DAMO video + static text)
- Add social media trend scrapper to automatize title prompt creation.
- Add AI music engine to background music videos.
- Improve prompt engineering (get verb, subject, etc..) to get better images.
- Improve cover creation, that will attract more viewers to the video.
- Improve content: check that chatGPT is not using "narrator" structure output or defaults answers "as a natural language model I'm not..." and replace respectively.
- Fix stable-diffusion NSFW detector.
- Fix bug
upload_thumbnails
apply default image instead of input one. - Improve the serialization of
json
responses (current as "PLACE_HOLDER"). - More docstring and unitary test.
- Fix unitary test of
test_youtube
. Configure a betterconftest.py
and avoid local dependencies. - Test E2E execution via
main.py
. - Add logger and logs instead of
prints
.