Video Production template

AI-Powered YouTube Video Generator

This Python program automates the creation of engaging, trending 30-second YouTube videos, such as mini vlogs, food challenges, DIY projects, dances, pet tricks, or transformation videos. Using AI tools, it generates video scenes, adds audio narration, background music, and subtitles, and combines them into a polished final video ready for upload to YouTube.


What the Program Does

The program leverages AI to create a structured 30-second video script based on trending topics, generates individual video clips for each scene, adds audio effects and narration using Zonos, incorporates subtitles, and merges everything into a final video. It also supports uploading the video to YouTube with a description, hashtags, and privacy settings. The workflow ensures high-quality output with minimal manual intervention.

Key Features

  • Generates a trending video script with scenes (e.g., mini vlogs, DIY projects).
  • Creates video clips using AI video generation APIs.
  • Adds narration with Zonos text-to-speech.
  • Incorporates background music and sound effects.
  • Generates and burns subtitles into videos.
  • Combines scenes into a final video with FFmpeg.
  • Uploads to YouTube with metadata (title, description, hashtags).

How to Run the Program

Follow these steps to run the program on a Windows system:

  • Ensure Python 3.8+ is installed.
  • Install dependencies listed in the table below.
  • Configure paths for ComfyUI output and result directories in the script.
  • Run the script using: python script.py.
  • Monitor the console for progress and ensure FFmpeg is accessible.
  • Check the video_output folder for the final video and subtitles.

Dependencies

DependencyVersionPurpose
Python3.8+Core programming language
moviepyLatestVideo editing and concatenation
ZonosLatestText-to-speech for narration
FFmpegLatestVideo/audio processing and subtitle burning
ComfyUILatestAI video generation pipeline
argparseStandardCommand-line argument parsing
asyncioStandardAsynchronous operations for API calls

Github link to the project: https://github.com/spspider/comfyui_automatization


Sample Output

Below is an example of a generated video. The program creates a 30-second video with multiple scenes, subtitles, and background music, saved in the video_output folder.

Note: Ensure FFmpeg is installed and added to your system PATH for audio and subtitle processing. API keys for Zonos and video generation services may be required.