Skip to content

pocat-dev/core

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Auto Clipper with AI Analysis 🎬✨

Rust License: MIT GitHub issues GitHub stars

πŸš€ Intelligent video clipper powered by Gemini AI - Automatically analyze YouTube videos and create viral-worthy clips with AI-suggested timestamps.

✨ Features

  • πŸ€– AI-Powered Analysis: Gemini AI automatically identifies viral-worthy moments
  • πŸ“Ί YouTube Integration: Direct download and processing from YouTube URLs
  • ⚑ High Performance: Built with Rust for maximum speed and efficiency
  • 🎯 Smart Clipping: Generates 3-5 optimized clips (10-30 seconds each)
  • πŸ“ Flexible Configuration: Support both AI mode and manual JSON configuration
  • πŸ”’ Secure: Environment-based API key management
  • 🎨 User-Friendly: Beautiful progress indicators and emoji feedback

πŸš€ Quick Start

Prerequisites

# Ubuntu/Debian
sudo apt install rustc cargo ffmpeg yt-dlp curl

# macOS
brew install rust ffmpeg yt-dlp curl

# Windows (using Chocolatey)
choco install rust ffmpeg yt-dlp curl

Installation

  1. Clone the repository
git clone https://github.com/Hans02-Neo/clipper-rust.git
cd clipper-rust
  1. Set up environment
cp .env.example .env
# Edit .env and add your Gemini API key
  1. Build the project
cargo build --release

Usage

πŸ€– AI Mode (Recommended)

./target/release/auto-clipper "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

πŸ“ Manual Mode

./target/release/auto-clipper config.json

πŸ“– Documentation

🎬 Demo

# Download and analyze a YouTube video
$ ./target/release/auto-clipper "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

πŸ” Analyzing YouTube video...
πŸ“₯ Downloading video...
⏱️  Video duration: 213.0s
πŸ€– Getting AI analysis...
πŸ“ AI suggested clips:
{
  "input_video": "video.mp4",
  "clips": [
    {
      "start": "00:00:07",
      "end": "00:00:22",
      "output": "viral_clip_1.mp4"
    },
    // ... more clips
  ]
}
🎬 Processing 4 clips from video.mp4
βœ“ Created: viral_clip_1.mp4
βœ“ Created: viral_clip_2.mp4
βœ“ Created: viral_clip_3.mp4
βœ“ Created: viral_clip_4.mp4
πŸŽ‰ Done!

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   YouTube URL   │───▢│   yt-dlp        │───▢│   Video File    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                        β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”‚
β”‚   Gemini AI     │◀───│   AI Analysis   β”‚β—€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚
         β–Ό                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  JSON Config    │───▢│   FFmpeg        │───▢│   Viral Clips   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Clone and setup
git clone https://github.com/Hans02-Neo/clipper-rust.git
cd clipper-rust

# Install dependencies
cargo install --path .

# Run tests
cargo test

# Format code
cargo fmt

# Lint
cargo clippy

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“Š Stats

GitHub repo size GitHub code size in bytes Lines of code


Made with ❀️ by the community
Report Bug Β· Request Feature Β· Discussions

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 100.0%