Giter VIP home page Giter VIP logo

ai-cinema-engine's Introduction

AI Cinema Engine

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.

Futuristic Cinema by Stable Diffusion

Project Requirements

  • python 3.x (this project was developed using python 3.9.6)
  • virtualenv installed (or any virtual environment manager ex: conda)
  • pip installed
  • git installed

Local Installation

Clone the Project

git clone https://github.com/Zentra94/ai-cinema-engine.git

Create virtual environment:

virtualenv venv

Activate the virtual environment:

venv/Scripts/activate

Packages installation with pip:

pip install -r requirements.txt

(Optional) Create all directories:

python configs.py

3th. Party Credentials

Add environments variables

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:

Usage

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):

IMAGE_ALT

This will include: cover page image for the Youtube miniature (1), automatic title (2) and description (3).

pandas1

Also, will upload some ad-hoc tags.

pandas2

And will provide some multi-language subtitles (uploaded automatically as well).

pandas3

For more details and configurations you can check packages/video_manges/core/screenwriter.py & packages/video_manges/core/youtube.py files.

(Optional) Add Virtualenv at Jupyter Notebook's Kernel

python -m ipykernel install --name venv --display-name "Ai-cinema-engine-venv"

Contributors

  • Franco Zentilli Traverso (@Zentra94)

Backlog

  • 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 better conftest.py and avoid local dependencies.
  • Test E2E execution via main.py.
  • Add logger and logs instead of prints.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.