A robust, interactive CLI tool built in Rust to automate the creation of YouTube Shorts from long-form content. It features a full Terminal User Interface (TUI), persistent settings management, automatic session recovery, and leverages Google Gemini AI for intelligent content analysis.
- π₯οΈ Interactive TUI: Full menu-based interface for easy navigation and control.
- π€ AI-Powered Analysis: Uses Google Gemini to identify the best, most engaging moments.
- βοΈ In-App Configuration: Modify settings like output directory, usage, and cookies directly from the menu.
- π Session Recovery: Automatically resumes interrupted sessions from where you left off.
- π¨ Smart Composition: Creates layered shorts with blurred backgrounds and customizable zoom/positioning.
- πͺ Cookie Support: Integrated support for
yt-dlpcookies to handle age-restricted or premium content.
Before running this tool, ensure you have the following installed:
# Windows (with Chocolatey) choco install ffmpeg # Or download from: https://ffmpeg.org/download.html# Windows (with pip) pip install yt-dlp # Or download from: https://github.com/yt-dlp/yt-dlp#installation # Also you can install directly from here V sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp sudo chmod a+rx /usr/local/bin/yt-dlpYou will need a Google Gemini API Key to use the AI analysis features.
- Get one for free at Google AI Studio.
- The application will securely prompt you for this key on the first run.
# Clone the repository git clone https://github.com/vicentefelipechile/yt-shortmaker.git cd yt-shortmaker # Build the project cargo build --release # Run the application cargo run --releaseOn the first launch, if no API key is found, you will be prompted to enter your Google Gemini API Key. This is saved securely to your settings.
The application opens to a Main Menu with three options:
- Comenzar (Start): Begin the video processing workflow.
- Configuracion (Settings): Adjust application settings.
- Salir (Exit): Close the application.
- Select Start.
- Enter URL: Paste the YouTube link you want to process.
- Analysis: The tool downloads and analyzes the video using AI.
- Review: Moments are detected and categorized.
- Processing: The app generates high-quality vertical shorts with your configured styling.
You can customize the following directly in the app:
- Output Directory: Where files are saved.
- Auto Extract: Automatically generate shorts after analysis.
- Shorts Style: Adjust background opacity and main video zoom.
- Cookies: Path to your cookies file.
output/ βββ moments.json # Raw JSON of identified moments βββ moments.txt # Human-readable list βββ shorts/ βββ short_1_funny.mp4 βββ short_2_interesting.mp4 βββ ... Settings are stored in settings.json. While you can edit this file manually, it's recommended to use the Configuracion menu in the app.
The AI identifies moments in these categories:
- Funny: Humorous or comedic moments
- Interesting: Educational or thought-provoking content
- Incredible Play: Amazing gameplay or skillful moments
- Cinematic: Cinematic scene in game
- Other: Notable moments that don't fit above categories
# Run in development mode cargo run # Run tests cargo testMIT License - feel free to use and modify as needed.
Contributions are welcome! Please feel free to submit a Pull Request.