Skip to content

Turn Full Movies into AI-Generated Movie Recaps Using ChatGPT

Notifications You must be signed in to change notification settings

keithhb33/AI-Movie-Shorts

Repository files navigation

AI-Movie-Shorts

Turn full movies or .MP4 Files into AI-generated movie trailers and summaries using OpenAI.

Basic Installation Steps

#This repository only works on Windows PCs
#Clone the Git repository:
git clone https://github.com/keithhb33/AI-Movie-Shorts.git

#Navigate to the cloned repo:
cd AI-Movie-Shorts

#Install modules and dependencies within the cloned "AI-Movie-Shorts" directory:
python3 -m pip install -r requirements.txt

#Remove .placeholder files (Windows PowerShell Terminal Command):
Get-ChildItem -Recurse -Filter ".placeholder" | Remove-Item

OpenAI API Setup & Configuration

Due to OpenAI's API usage rate costs, users must configure their own GPT 3.5 API keys.
Key acquisition guide here.

Once acquired, edit line 37 in "main.py":
#Replace string with your API key
open_api_key = "OPEN_AI_API_KEY HERE"

(Optional) YouTube API Setup & Configuration

Users must configure the YouTube API to access their particular YouTube channel. This configuration is optional if users only wish to generate MP4 files.

Follow the steps here only under the "Requirements" heading. Configure your YouTube API here. Once the YouTube Data API web application has been configured, paste the correct "client_id" and "client_secret" into the existing client_secrets.json or replace the file.

After clicking "Upload All to Youtube" on the GUI, users should be asked to sign in to the Google account associated with their YouTube channel, and all of the outputted .MP4 files in the "output" directory will upload to YouTube.

Unfortunately, as of 2020 July, only audited and approved user-created YouTube APIs can be used to upload public videos to the platform. Using non-audited APIs to upload videos to YouTube results in the videos being locked as private. The audit application can be found here. The process usually only takes a few days.

Usage

After configuration:
#Run the terminal command in the "AI-Movie-Shorts" directory:
python3 main.py

An application GUI should appear.

GUI Image

Place .MP4 (movie) files into the "movies" directory. Ensure all filenames are the titles of their respective movies (Ex: "American Psycho.mp4")

Click "Start Generation"

After all narrations are complete, the GUI will indicate such. Processed trailers can be viewed in the "output" directory.

If properly configured, all of the .MP4 files in the directory "output" will be uploaded to YouTube, each upload sharing the name of the original file placed in "movies" along with a preloaded description.

#Changes to the preloaded title and description can be configured in "upload_action.py" under the "upload_to_youtube" method.

*I am working on implementing an improvement in the AI's knowledge of movies and TV shows, allowing for an increase in the number of accurately generated scripts. This project will continue to be updated.

About

Turn Full Movies into AI-Generated Movie Recaps Using ChatGPT

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages