Skip to content

KayckMatias/zshorts-automatic-shorts-videos-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zshorts

A automatic shorts videos generator for youtube, tiktok and more...

Requirements

  • FFmpeg
  • node
  • npm
  • build-essential packages (only if you are going to use subtitles, required by nodejs-whisper)

Installation

  • To install run in terminal:
npm i 
  • Configure using one of the two available modes
  • Enjoy :D

Configuration

First, you need to populate the "/static/videos" folder with videos that will be used as backgrounds for the generated shorts. (video example)

This system works with two modes: manual story and auto-generated story from GPT

Manual Story:

Set STORY_BY_GPT to false in .env file

Copy "/static/manual_story.json.default" to "/static/manual_story.json" and populate

Auto-Generated Story from GPT:

Turn true the STORY_BY_GPT and set your OPENAI_API_KEY in .env

You can customize the payload sended to ChatGPT generate the story in field PAYLOAD_CHATGPT on .env

You can change language in .env on LANGUAGE_CHATGPT variable.

Attention for "auto-generated story from GPT" mode

PAYLOAD_CHATGPT is a customizable payload, it is concatenated with another payload to generate the story in a standard way, if you want to change it, customize it in the file: "/src/services/chatgpt.js" however, it can cause problems in the system, be careful.

Attention for subtitle

We are using whisper to generate automatic subtitles, read more about the models (available and requirements) here

Usage

To use it is very simple, just after making the configuration run in your terminal:

npm run generate

Remember

If you are using manual story mode, you need populate the file "/static/manual_story.json" with the data you want for your story.

Future Update:

  • Add automatic subtitle in video based in audio generated
  • More customization
  • Add random categories and video filter based in category choiced (example, horror story: darkness filter to video)
  • Add a automatic upload to youtube (canceled because YouTube blocks the video due to "suspicion of spam")

License

The MIT License (MIT). Please see License File for more information

Made with ♥ by Kayck Matias

About

a project to automatically make shorts for youtube, tiktok...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published