Generate a video from a topic, or a script you already have.
npm install -g tube-crafter
- ffmpeg must be installed
OPENAI_API_KEY
must be set in your environment- Your machine must be able to access Google Cloud (instructions)
tube-crafter --topic "red squirrels"
tube-crafter --script my-script.md
When you run the command it will create an output
directory in the current directory, and a timestamped directory inside for each run. The final video is located at e.g. output/2023-08-18T11-33-06-013Z/output.mp4
.
- Creates a video script from the topic provided (or uses provided script)
- Splits the script into "text lines" (paragraphs and headings)
- Creates a text-to-speech MP3 for each text line
- Creates an image for each text line (if heading, text shown in image)
- Creates a video for each text line (using the MP3 and image)
- Concatenates all the videos into a single video