Skip to main content
This guide covers how to install and use the AI YouTube Shorts Generator on systems without an NVIDIA GPU. CPU mode supports all features but with slower transcription speeds.
CPU transcription is 5-10x slower than GPU mode. A 5-minute video may take 3-5 minutes to transcribe on CPU vs. 30 seconds on GPU.

System Requirements

  • CPU: Modern multi-core processor (Intel i5/AMD Ryzen 5 or better)
  • RAM: 8GB minimum, 16GB recommended
  • Python: 3.10 or higher
  • Storage: 2GB for dependencies + space for video files
  • OS: Windows 10/11, Ubuntu 20.04+, or macOS 11+
CPU mode requires significantly more RAM than GPU mode. Ensure you have at least 8GB available, especially for longer videos.

Installation by Platform

Windows CPU Installation

1

Install FFmpeg

Option 1: Using Chocolatey (Recommended)
# Run PowerShell as Administrator
choco install ffmpeg -y
Option 2: Using Scoop
scoop install ffmpeg
Option 3: Manual Installation
2

Install ImageMagick

choco install imagemagick -y
Configure ImageMagick policy:Edit C:\Program Files\ImageMagick-7.x.x-Q16-HDRI\config\policy.xmlFind:
<policy domain="path" rights="none" pattern="@*"/>
Change to:
<policy domain="path" rights="read|write" pattern="@*"/>
3

Create Virtual Environment

# Navigate to project directory
cd AI-Youtube-Shorts-Generator

# Create virtual environment
python -m venv venv

# Activate virtual environment
.\venv\Scripts\Activate.ps1
If you get an execution policy error, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
4

Install CPU PyTorch

IMPORTANT: Install PyTorch first with CPU support:
pip install torch --index-url https://download.pytorch.org/whl/cpu
5

Install Other Dependencies

pip install -r requirements-cpu.txt
6

Configure API Key

Create a .env file in the project root:
OPENAI_API=your_openai_api_key_here

Verify Installation

Confirm CPU mode is active:
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
Expected output:
CUDA available: False
If this shows True, you accidentally installed the GPU version of PyTorch. Uninstall and reinstall from the CPU index.

CPU Requirements File

The requirements-cpu.txt file excludes all NVIDIA CUDA packages that are in the standard requirements.txt. Key differences:
Excluded packages:
  • All nvidia-* packages (CUDA runtime, cuDNN, etc.)
  • GPU-specific PyTorch wheels
Included packages:
  • CPU-only versions of core dependencies
  • faster-whisper==1.0.1 - CPU-compatible transcription
  • torch (installed separately from CPU index)
  • All other standard dependencies (OpenCV, MoviePy, LangChain, etc.)
Total size: ~800MB of Python packages (vs. ~4GB with CUDA)

Full Requirements List

The requirements-cpu.txt includes:
# Key packages
faster-whisper==1.0.1      # Speech-to-text transcription
langchain==0.3.25          # LLM framework
langchain-openai==0.3.0    # OpenAI integration
moviepy==1.0.3             # Video editing
opencv-python==4.8.1.78    # Computer vision
pytubefix==9.1.1           # YouTube downloads
python-dotenv==1.0.1       # Environment variables

# And 70+ supporting dependencies...
PyTorch must be installed separately from the CPU index before installing requirements-cpu.txt.

Performance Comparison

Typical processing times for a 5-minute YouTube video:
TaskGPU (CUDA)CPU
Download10-30s10-30s
Audio extraction2-5s2-5s
Transcription30-60s3-5 min
Highlight selection5-10s5-10s
Video processing20-40s25-50s
Total1-2 min4-7 min
Longer videos (15-30 minutes) can take 15-30 minutes to transcribe on CPU. Consider processing overnight for large batches.

Running in CPU Mode

Usage is identical to GPU mode:

Interactive Mode

python main.py

Command-Line Mode

python main.py "https://youtu.be/VIDEO_ID"

Batch Processing

xargs -a urls.txt -I{} python main.py --auto-approve {}
The application automatically detects CPU mode and adjusts accordingly. No code changes are needed.

Optimization Tips

1

Close Background Applications

Free up RAM by closing unnecessary programs, especially browsers with many tabs.
2

Process Shorter Videos First

Start with 2-5 minute videos to get faster results. The highlight selection works best with 5-15 minute source videos anyway.
3

Use Batch Processing Overnight

For multiple videos, use the --auto-approve flag and run overnight:
xargs -a urls.txt -I{} sh -c 'python main.py --auto-approve {} && sleep 10'
4

Monitor Resource Usage

Watch CPU and memory usage:Linux/macOS:
htop
Windows: Open Task Manager (Ctrl+Shift+Esc)

Switching Between CPU and GPU

If you later add an NVIDIA GPU:
1

Uninstall CPU PyTorch

pip uninstall torch
2

Install CUDA Toolkit

Follow NVIDIA’s installation guide for your OS.
3

Install GPU PyTorch

pip install torch --index-url https://download.pytorch.org/whl/cu118
4

Install Full Requirements

pip install -r requirements.txt

Troubleshooting CPU Installation

Issue: Still Using GPU Libraries

If you see CUDA-related errors after CPU installation:
# Verify no NVIDIA packages are installed
pip list | grep nvidia
Should return nothing. If packages are listed:
pip uninstall $(pip list | grep nvidia | awk '{print $1}') -y

Issue: Out of Memory Errors

If transcription fails with memory errors:
  1. Close other applications to free RAM
  2. Process shorter video segments (< 5 minutes)
  3. Increase system swap space (Linux) or virtual memory (Windows)

Issue: Very Slow Performance

If CPU transcription is taking excessively long:
  1. Check CPU usage: Should be near 100% during transcription
  2. Disable power saving: Ensure your system isn’t throttling CPU
  3. Consider alternatives: The AI Clipping API offers faster cloud processing
For occasional use, CPU mode works fine. For frequent processing or longer videos, GPU acceleration or a cloud API may be more practical.

When to Use CPU Mode

CPU mode is ideal for:
  • 💻 Laptops without dedicated GPUs
  • 🖥️ Desktop systems with AMD or Intel graphics
  • 🍎 Apple Silicon Macs (M1/M2/M3)
  • 📦 Minimal installation footprint (~800MB vs. ~4GB)
  • 🧪 Testing and development
Consider GPU mode for:
  • ⚡ Frequent video processing
  • 📹 Long-form content (15-30 minute videos)
  • 🏭 Batch processing many videos
  • ⏱️ Time-sensitive workflows
All features work identically in both modes. The only difference is processing speed.

Alternative Solutions

If CPU performance is insufficient:
  1. AI Clipping API: muapi.ai/playground/ai-clipping
    • No installation required
    • Faster processing
    • Better highlight selection algorithms
  2. Google Colab: Run the tool on free GPU instances
    • Requires adapting the code for notebook format
    • Free tier has usage limits
  3. Cloud VM with GPU: AWS, GCP, or Azure instances
    • Rent by the hour
    • Use the standard GPU installation

Build docs developers (and LLMs) love