Skip to content

executiveusa/AFRO-CLIPZ

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AfroMations | AI Documentary Studio

Deploy on Railway Deploy to Render

Transform your footage into stories β€” AI-powered documentary and clipping studio for Seattle/Washington creators.

Built on AFRO-CLIPZ: Multimodal AI clipping that lets you clip any moment from any video using visual, audio, and sentiment cues.

Quick Deploy

πŸ“– Deploy Now Guide β€” One-click deployment to Railway, Render, or Docker

✨ New: Zero-Secrets Railway Deployment

This repository now includes a complete zero-secrets deployment architecture that allows you to deploy on Railway (or Coolify) without requiring any API keys or secrets!

πŸš€ Quick Deploy

Deploy to Railway in one click:

  • βœ… No secrets required
  • βœ… Works immediately
  • βœ… Free tier optimized
  • βœ… Auto-scaling protection

Features:

  • πŸ” Zero-secrets architecture with safe stubbing
  • πŸ’° Cost protection and automatic monitoring
  • πŸ”§ Maintenance mode with auto-migration
  • 🌐 Multi-platform support (Railway, Coolify, VPN)
  • πŸ“Š Resource usage guardrails

πŸ“– Full Deployment Guide | βœ… Deployment Checklist

Resources

hqdefault

Properties

Advanced Video Analysis

Harness cutting-edge technology to analyze every aspect of your video. Our state-of-the-art system evaluates each frame, combining visual, audio, and sentiment cues to identify objects, scenes, actions, sounds, emotions, texts, and more. Each scene is rated for its potential virality, giving you insights into what makes your content compelling.

Customizable Video Clipping

Tailor your video clips to your exact needs. Whether you're looking to compile highlights from a sports game or showcase the best moments from a travel vlog, simply enter your prompts. We'll personalize your clips, automatically capturing key moments to align with your vision.


πŸš€ Deployment Options

Railway (Recommended)

Deploy with zero configuration:

# Install Railway CLI
npm install -g @railway/cli

# Login and deploy
railway login
railway init
railway up

βœ… Zero-Secrets Mode (Default)

  • No API keys needed
  • Mock AI responses
  • Safe for demos
  • Free tier friendly

βœ… Full Integration Mode (Optional)

  • Set GROQ_API_KEY environment variable
  • Real AI processing
  • Production ready

πŸ“– Railway Deployment Guide

Coolify (Self-Hosted)

Deploy on your own infrastructure:

# Follow setup guide
# Configure git repository
# Deploy with one click

πŸ“– Coolify Setup Guide

Hostinger VPN (Advanced)

Deploy behind VPN for enhanced security:

πŸ“– VPN Deployment Guide


πŸ’° Cost Protection

Built-in guardrails prevent runaway costs:

  • βœ… Resource usage monitoring
  • βœ… Automatic shutdown on limit
  • βœ… Maintenance mode activation
  • βœ… Migration to Coolify guidance

Configuration:

ENABLE_COST_MONITORING=true
FREE_TIER_LIMIT_MB=500
AUTO_SHUTDOWN_ON_LIMIT=true

πŸ” Secret Management

Zero-Secrets Architecture

The application works without any API keys:

  • External integrations safely stubbed
  • Mock responses for testing
  • No secrets in repository
  • Safe for public deployment

Adding Real API Keys (Optional)

  1. Get API Key

  2. Set Environment Variable

    # Railway
    railway variables set GROQ_API_KEY=gsk_your_key_here
    
    # Coolify
    # Add via dashboard: GROQ_API_KEY=gsk_your_key_here
    
    # Local
    export GROQ_API_KEY=gsk_your_key_here
  3. Redeploy

    • Application automatically switches to full AI mode
    • Real processing enabled
    • No code changes needed

πŸ“– Secret Management Guide


πŸ“¦ Installation & Usage

Local Development

# Clone repository
git clone https://github.com/executiveusa/AFRO-CLIPZ.git
cd AFRO-CLIPZ

# Install dependencies
pip install -r requirements.txt

# Run application (enhanced version with zero-secrets)
python app_enhanced.py

# Or run original version
python app.py

Environment Setup

# Copy template
cp .env.example .env

# Edit .env with your settings
nano .env

# Key variables:
# - GROQ_API_KEY: Your API key (or 'stub-key' for stub mode)
# - WHISPER_MODEL: base, small, medium, large
# - FREE_TIER_LIMIT_MB: Memory limit for cost protection

Usage

# Basic usage
from app_enhanced import main
main()

# With custom query
import os
os.environ['USER_QUERY'] = "Find all clips about artificial intelligence"
main()

πŸ“š Documentation


πŸ”§ Configuration Files

  • railway.toml - Railway deployment configuration
  • railway.json - Service definitions
  • nixpacks.toml - Build configuration
  • Procfile - Process definitions
  • .env.example - Environment variables template
  • .gitignore - Excludes secrets from git
  • maintenance.html - Maintenance mode page

πŸ› οΈ Features

Core Features

  • 🎬 AI-powered video clipping
  • πŸŽ™οΈ Automatic transcription with Whisper
  • πŸ€– Intelligent segment selection with LLM
  • βœ‚οΈ Automated video editing
  • 🎨 Smooth transitions and effects

Deployment Features

  • πŸš€ Zero-secrets architecture
  • πŸ’° Cost protection guardrails
  • πŸ”§ Automatic maintenance mode
  • 🌐 Multi-platform support
  • πŸ“Š Resource monitoring
  • πŸ”„ Migration automation

Advanced Features

  • πŸ” Master secrets management
  • 🌍 VPN deployment support
  • πŸ“ˆ Usage tracking
  • 🚨 Auto-shutdown on limits
  • πŸ“‹ Migration checklists

πŸ” How It Works

  1. Transcription

    • Extract audio from video
    • Generate transcript with Whisper
    • Segment by timestamps
  2. AI Analysis (with API key) / Mock Selection (without)

    • Analyze transcript against user query
    • Select relevant conversations
    • Identify optimal clip boundaries
  3. Video Editing

    • Extract selected segments
    • Apply smooth transitions
    • Combine into final video
    • Export with original quality

πŸ†˜ Troubleshooting

Application Won't Start

# Check Python version
python3 --version  # Should be 3.12+

# Check dependencies
pip install -r requirements.txt

# Check logs
railway logs  # On Railway

API Not Working

# Verify API key is set
echo $GROQ_API_KEY

# Check stub mode indicator in logs
# Look for: "⚠️ STUB MODE: Using mock AI responses"

# Set real API key
export GROQ_API_KEY=gsk_your_key_here

Memory Limit Exceeded

# Increase limit
railway variables set FREE_TIER_LIMIT_MB=1000

# Or migrate to Coolify
# See COOLIFY_MIGRATION.md

πŸ“Š System Requirements

Local Development

  • Python 3.12+
  • FFmpeg
  • 2GB+ RAM
  • 2GB+ disk space

Railway Deployment

  • Free tier: 512MB RAM
  • Recommended: Hobby tier (2GB RAM)

Coolify Deployment

  • VPS with 2GB+ RAM
  • Docker support
  • Ubuntu 20.04+ recommended

🀝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create feature branch
  3. Make changes
  4. Test thoroughly
  5. Submit pull request

πŸ“„ License

See LICENSE file for details.


πŸ™ Credits


πŸ“ž Support


Status: βœ… Production Ready (Zero-Secrets Mode)

Last Updated: 2025-12-04

About

Clip any moment from any video with prompts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 91.8%
  • HTML 7.1%
  • Other 1.1%