Skip to content

Nirmit-Angane/AutoShorts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฌ AutoShorts Studio

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.


๐Ÿ“ Project Structure

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)

โš™๏ธ Setup

1. Install Dependencies

pip install -r requirements.txt

Requires FFmpeg installed and added to the system PATH. Additionally, some features use Playwright which requires installing browser binaries (playwright install chromium).

2. Configure Settings

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

3. First-Time Chrome Login

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.


๐Ÿš€ Running the App

python main.py

๐ŸŽฌ Features

๐Ÿค– AI Video Generator (ai_video_code/)

What it does: Fully automated end-to-end pipeline: topic โ†’ AI script โ†’ voiceover โ†’ stock footage โ†’ compiled MP4 โ†’ uploaded to YouTube.

๐ŸŽฎ Ball Battle (ball battle code/)

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.

โ“ AI Quiz (AI Quiz code/)

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.

๐Ÿ“ AI Text Video (AI Text Video generator/)

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.

๐ŸŒ Custom HTML Video Maker (Custom Html code/)

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.

๐Ÿ“ค Custom File Upload (ui/components/sidebar.py)

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.


๐Ÿ”ง How the UI Routes Features

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

๐Ÿ› ๏ธ Tech Stack

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

About

AutoShorts Studio ๐Ÿš€ AI-powered YouTube Shorts with quizzes, facts, and visual content โ€” all fully automated using code. New videos daily. Follow for more ๐Ÿ”ฅ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors