# VideoArchiver Cog A Red-DiscordBot cog for automatically archiving videos from monitored Discord channels. ## Features - Automatically detects and downloads videos from monitored channels - Supports multiple video hosting platforms through yt-dlp - Enhanced queue system with priority processing and performance metrics - Configurable video quality and format - Role-based access control - Automatic file cleanup - Hardware-accelerated video processing (when available) - Customizable notification messages - Queue persistence across bot restarts ## File Structure The cog is organized into several modules for better maintainability: - `video_archiver.py`: Main cog class and entry point - `commands.py`: Discord command handlers - `config_manager.py`: Guild configuration management - `processor.py`: Video processing logic - `enhanced_queue.py`: Advanced queue management system - `update_checker.py`: yt-dlp update management - `utils.py`: Utility functions and classes - `ffmpeg_manager.py`: FFmpeg configuration and hardware acceleration - `exceptions.py`: Custom exception classes ## Installation 1. Install the cog using Red's cog manager: ```bash [p]repo add videoarchiver [p]cog install videoarchiver ``` 2. Load the cog: ```bash [p]load videoarchiver ``` ## Configuration Use the following commands to configure the cog: ### Channel Settings - `[p]va setchannel `: Set the archive channel - `[p]va setnotification `: Set the notification channel - `[p]va setlogchannel `: Set the log channel - `[p]va addmonitor `: Add a channel to monitor - `[p]va removemonitor `: Remove a monitored channel ### Role Management - `[p]va addrole `: Add a role allowed to trigger archiving - `[p]va removerole `: Remove an allowed role - `[p]va listroles`: List allowed roles ### Video Settings - `[p]va setformat `: Set video format (e.g., mp4, webm) - `[p]va setquality `: Set maximum video quality (e.g., 1080) - `[p]va setmaxsize `: Set maximum file size in MB - `[p]va setconcurrent `: Set number of concurrent downloads (1-5) ### Message Settings - `[p]va setduration `: Set how long to keep archive messages - `[p]va settemplate