Skip to content

matt-ebrahim/catflix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Catflix Banner

Catflix: AI-Generated Cat Entertainment

An automated pipeline that generates and uploads engaging animated videos designed specifically for cats. Perfect for keeping your feline friends entertained!

Overview

Catflix uses Python and procedural animation to create hypnotic bug animations that capture cats' natural hunting instincts. The system can automatically generate videos and upload them to YouTube for a continuous stream of cat entertainment.

Features

  • 🐛 Procedural Animation: Generates random bug movements that mimic real prey behavior
  • 🎬 Video Generation: Creates high-quality MP4 videos with sound effects
  • 🤖 Automation: Can be scheduled to generate and upload videos automatically
  • 🐱 Cat-Optimized: Designed based on what cats find most engaging
  • 🎵 Audio Integration: Adds subtle sound effects to enhance engagement

Installation

Prerequisites

  • Python 3.8 or higher
  • FFmpeg (for video generation)
  • (Optional) YouTube API credentials for automatic uploads

Setup

  1. Clone the repository:

    git clone https://github.com/matt-ebrahim/catflix.git
    cd catflix
  2. Create conda environment:

    conda env create -f environment.yml
    conda activate catflix

    Or using pip:

    pip install -r requirements.txt
  3. Install FFmpeg:

    • Windows: Download from ffmpeg.org
    • Mac: brew install ffmpeg
    • Linux: sudo apt-get install ffmpeg

Usage

Generate a Video

python video_generator.py

This will create an animated video in the output/ directory.

Configuration

You can customize the video generation by modifying parameters in video_generator.py:

# Video settings
VIDEO_WIDTH = 1920
VIDEO_HEIGHT = 1080
VIDEO_DURATION = 60  # seconds
FPS = 30

# Animation settings
NUM_BUGS = 5
BUG_SIZE = 20
SPEED_RANGE = (2, 8)

YouTube Upload (Optional)

To enable automatic YouTube uploads:

  1. Set up YouTube API credentials (see YouTube API Setup)
  2. Configure your credentials:
    export YOUTUBE_CLIENT_ID="your-client-id"
    export YOUTUBE_CLIENT_SECRET="your-client-secret"
  3. Run with upload flag:
    python video_generator.py --upload

Project Structure

catflix/
├── assets/              # Static assets (sounds, images)
├── output/              # Generated videos (gitignored)
├── video_generator.py   # Main video generation script
├── environment.yml      # Conda environment
├── requirements.txt     # Pip requirements
└── README.md

How It Works

  1. Bug Generation: Creates multiple "bugs" with random starting positions
  2. Movement Patterns: Each bug follows a semi-random path that mimics natural prey movement
  3. Video Rendering: Uses MoviePy to render smooth animations at 30 FPS
  4. Audio Mixing: Adds subtle sound effects to enhance the experience
  5. Export: Saves as high-quality MP4 file

Examples

Sample generated videos can be found in the examples/ directory.

Cat Testing Results

Tested on multiple cats with positive results:

  • ✅ Increased engagement time
  • ✅ Natural hunting behaviors triggered
  • ✅ Safe alternative to screen scratching

Contributing

Contributions welcome! Ideas for improvements:

  • Different animation patterns (fish, birds, lasers)
  • More sound effect variations
  • Machine learning to optimize based on cat engagement
  • Integration with cat cameras for automatic playback

License

MIT License - feel free to use this to entertain your cats!

Credits

Created by Matt Ebrahim

Disclaimer

Always supervise your cat when using screen-based entertainment. Ensure your screen is properly secured to prevent damage.

About

Generate and upload simple animated videos for cats using Python. This project automates the creation of fly/bug-style videos and uploads them daily to YouTube as cat-entertainment content.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages