An automated YouTube Shorts generation and upload desktop application built with PyQt6. Supports multiple content features, each self-contained in its own folder but orchestrated by a unified GUI.
YTSFlow/
โ
โโโ main.py # App entry point โ launches the PyQt6 GUI
โโโ settings.json # Shared config (API keys, Chrome profile path)
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
โ
โโโ ui/ # Shared GUI layer (all features use this)
โ โโโ styles.py # Global QSS dark-theme stylesheet
โ โโโ main_window.py # Main window, routing, signal handling
โ โโโ settings_dialog.py # Settings popup (API keys, chrome path)
โ โโโ components/
โ โโโ sidebar.py # Left panel: feature cards + settings + generate button
โ โโโ preview.py # Right panel: video preview + activity log
โ
โโโ core/ # Shared utilities (used by all features)
โ โโโ config.py # Loads/saves settings.json; exposes config_manager
โ
โโโ ai_video_code/ # ๐ค AI Video Generator feature
โโโ ball battle code/ # ๐ฎ Ball Battle feature
โโโ AI Quiz code/ # โ AI Quiz Generator feature
โโโ AI Text Video generator/ # ๐ AI Text Video Generator feature
โโโ Custom Html code/ # ๐ Custom HTML Video Maker feature
โ
โโโ outputs/ # Generated AI Videos saved here (.mp4)
โโโ assets/ # Static app assets (icons, etc.)
โโโ shared_chrome_profile/ # ๐ Shared Chrome profile (login once, all features reuse)
pip install -r requirements.txtRequires FFmpeg installed and added to the system PATH. Additionally, some features use Playwright which requires installing browser binaries (playwright install chromium).
Edit settings.json or use the in-app Settings dialog:
| Key | Description |
|---|---|
groq_api_key |
Groq API key for AI script / question generation |
pexels_api_key |
Pexels API key for stock footage |
chrome_profile_path |
Absolute path to shared Chrome profile folder |
voice_engine |
TTS engine โ EdgeTTS (default) |
background_music |
true / false |
All features share one Chrome profile at shared_chrome_profile/. On first run for uploading, Chrome will open and ask you to log into your YouTube/Google account. After that, login is remembered permanently โ no re-login needed across features.
python main.pyWhat it does: Fully automated end-to-end pipeline: topic โ AI script โ voiceover โ stock footage โ compiled MP4 โ uploaded to YouTube.
What it does: Generates physics-based ball vs ball battle videos using a browser-based HTML5 canvas game engine, records them, and uploads automatically to YouTube.
What it does: Generates educational & trivia shorts. Uses Groq to formulate questions, EdgeTTS to read them out with a countdown, and MoviePy to render the quiz visually with background music and effects.
What it does: Generates highly dynamic, code-syntax highlighted, and glassmorphism-styled educational slides. It orchestrates precise audio timings per slide, generates an interactive HTML sequence, records it headless via Playwright, and encodes to MP4 with FFmpeg.
What it does: Allows users to upload their own standalone HTML animation files. The app headless-records the HTML into smooth 1080x1920 60fps video files via Playwright.
What it does: Allows users to select any .mp4, optionally utilize Groq AI to enhance its title and description metadata, and automatically push it to their YouTube channel using the persistent automation session.
ui/main_window.py listens for the generate_requested signal from the sidebar. Work is pushed to background QThread workers so the GUI remains flawlessly smooth:
| Feature Key | Handler | Method |
|---|---|---|
ai_video |
start_ai_video() |
Spawns AIVideoPipeline QThread |
ball_battle |
start_ball_battle() |
Spawns ball battle code/main.py via QProcess |
ai_quiz |
start_ai_quiz() |
Spawns AIQuizPipeline QThread |
ai_text_video |
start_ai_text_video() |
Spawns AITextVideoPipeline QThread |
custom_html |
start_custom_html() |
Spawns CustomHtmlPipeline QThread |
| Layer | Technology |
|---|---|
| GUI | PyQt6 |
| AI Prompting | Groq API (LLaMA 3) |
| Text-to-Speech | Edge TTS (Microsoft Neural) |
| Stock Footage | Pexels API |
| Video Editing | FFmpeg & MoviePy |
| Headless Recording | Playwright API |
| Browser Automation | Selenium WebDriver + ChromeDriver |
| Web Engine | HTML5 Canvas + CSS3 Glassmorphism + Vanilla JS |