Skip to content

Latest commit

ย 

History

History
162 lines (128 loc) ยท 6.32 KB

File metadata and controls

162 lines (128 loc) ยท 6.32 KB

๐ŸŽฌ FreakyBits โ€” AI Video Automation Pipeline

Fully automated short-form video pipeline that generates and uploads 6 AI-powered videos/day to YouTube Shorts and Instagram Reels โ€” zero manual work.

Pipeline Python License


๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    GitHub Actions (Free)                     โ”‚
โ”‚                  7AM + 7PM IST โ€” Daily Cron                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚   pipeline.py (Main)    โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚                  โ”‚                  โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Step 1       โ”‚  โ”‚ Step 2         โ”‚  โ”‚ Step 3        โ”‚
โ”‚ Gemini Flash โ”‚  โ”‚ Edge TTS       โ”‚  โ”‚ Pexels API    โ”‚
โ”‚ Script+Captionsโ”‚ โ”‚ Neural Voice   โ”‚  โ”‚ HD Stock Videoโ”‚
โ”‚ (Free API)   โ”‚  โ”‚ (Free)         โ”‚  โ”‚ (Free API)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚                  โ”‚                  โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚   Step 4: FFmpeg        โ”‚
              โ”‚ โ€ข 9:16 vertical crop    โ”‚
              โ”‚ โ€ข Dark cinematic filter โ”‚
              โ”‚ โ€ข Bold subtitle overlay โ”‚
              โ”‚ โ€ข Muted song mix        โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚   Step 5: Upload        โ”‚
              โ”‚ โ€ข YouTube Shorts        โ”‚
              โ”‚ โ€ข Instagram Reels       โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Features

Feature Details
Auto Script Gemini 2.5 Flash generates viral scripts with SEO titles + hashtags
Neural Voice Edge TTS (Microsoft) โ€” Christopher (EN) / Madhur (HI)
HD Video Pexels API โ€” portrait 9:16 cinematic clips
Bold Subtitles FFmpeg burns large white uppercase subtitles word-by-word
Bilingual EN โ†’ HI โ†’ EN pattern per run
4 Niches Horror ๐Ÿ‘ป Comedy ๐Ÿ˜‚ AI&Tech ๐Ÿค– Storytelling ๐Ÿ“–
Part Series Part 1 / Part 2 cliffhanger format for engagement
Topic Dedup Tracks last 500 topics โ€” never repeats
Retry Logic Exponential backoff on upload failures
Analytics Logs every upload to JSON for tracking
Free Forever Runs on GitHub Actions free tier (2x daily = ~1,200 mins/month)

๐Ÿš€ Quick Start

Prerequisites

  • GitHub account
  • Google AI Studio API key (free) โ€” aistudio.google.com
  • Pexels API key (free) โ€” pexels.com/api
  • YouTube OAuth credentials โ€” Google Cloud Console

Setup

  1. Fork this repo
  2. Add GitHub Secrets (Settings โ†’ Secrets โ†’ Actions):
Secret Description
GEMINI_API_KEY Google AI Studio key
PEXELS_API_KEY Pexels API key
YOUTUBE_CLIENT_SECRETS OAuth JSON from Google Cloud
YOUTUBE_TOKEN_B64 Base64-encoded pickle token
INSTAGRAM_TOKEN Meta Graph API token (optional)
INSTAGRAM_ACCOUNT_ID Instagram account ID (optional)
  1. Enable GitHub Actions โ€” pipeline runs automatically at 7AM + 7PM IST

๐Ÿงช Running Tests

pip install pytest
pytest tests/ -v

๐Ÿ“Š Output Stats

  • 6 videos/day (3 per run ร— 2 runs)
  • ~32 seconds per video
  • 1080ร—1920px (9:16 vertical)
  • Bilingual โ€” 4 EN + 2 HI per day

๐Ÿ› ๏ธ Tech Stack

Layer Technology
Script AI Google Gemini 2.5 Flash
Voice AI Microsoft Edge TTS (Neural)
Video Pexels HD Stock API
Assembly FFmpeg
Upload YouTube Data API v3, Instagram Graph API
CI/CD GitHub Actions
Auth Google OAuth 2.0

๐Ÿ“ Project Structure

freakybits/
โ”œโ”€โ”€ pipeline.py              # Main automation pipeline
โ”œโ”€โ”€ requirements.txt         # Python dependencies
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ test_pipeline.py     # Unit tests (pytest)
โ”œโ”€โ”€ buzzBits_output/         # Generated videos (gitignored)
โ”‚   โ”œโ”€โ”€ analytics.json       # Upload history
โ”‚   โ””โ”€โ”€ used_topics.json     # Topic deduplication store
โ””โ”€โ”€ .github/
    โ””โ”€โ”€ workflows/
        โ””โ”€โ”€ buzzBits_daily.yml  # Cron schedule

๐Ÿ”ฎ Roadmap

  • Oracle Cloud VM migration (unlimited runs)
  • Gemini Vision clip relevance scoring
  • Google Sheets analytics dashboard
  • Instagram token integration
  • Fine-tuned topic model per niche

๐Ÿ‘จโ€๐Ÿ’ป Built By

Mohammad Sahil Vahora โ€” ECE Final Year, Parul University 2026


This project demonstrates end-to-end AI pipeline engineering โ€” from LLM prompting to cloud deployment โ€” built entirely for free using open APIs and GitHub Actions.