# VideoArchiver Cog for Red-DiscordBot A powerful video archiving cog that automatically downloads and reposts videos from monitored channels. Features hardware-accelerated compression, multi-video processing, and support for multiple video platforms. ## Features - **Automatic Video Processing** - Monitors specified channels for videos - Supports multiple video platforms through yt-dlp - Hardware-accelerated compression (NVIDIA, AMD, Intel, ARM) - Configurable video quality and format - Automatic file size optimization for Discord limits - Default maximum file size: 8MB - Default video format: MP4 - Default video quality: High - Support for MP4, WebM, and MKV formats - **Video Archive Database** - Track and store archived video information - Query archived videos by original URL - Get Discord links for previously archived videos - Optional database functionality (disabled by default) - Automatic database management and cleanup - Persistent video history tracking - URL-based video lookup - **Modular Queue System** - Priority-based processing with state persistence - Efficient resource management and monitoring - Real-time performance metrics and health checks - Automatic cleanup and memory optimization - Default concurrent downloads: 2 (configurable 1-5) - Maximum queue size: 1000 items - Automatic retry on failures (3 attempts with 5-second delay) - Queue state persistence across bot restarts - Enhanced error recovery - **Progress Tracking** - Real-time download progress monitoring - Compression progress tracking - Hardware acceleration statistics - Detailed error tracking and analysis - Memory usage monitoring - Success rate calculations - Automatic cleanup of temporary files - Enhanced logging capabilities - **Channel Management** - Flexible channel monitoring (specific channels or all) - Separate archive, notification, and log channels - Customizable message templates - Configurable message duration (0-168 hours) - Enhanced error logging - **Access Control** - Role-based permissions - Site-specific enabling/disabling - Admin-only configuration commands - Per-guild settings - Enhanced permission checks ## Installation 1. Install the cog: ```bash [p]repo add Pac-cogs https://github.com/pacnpal/Pac-cogs [p]cog install Pac-cogs videoarchiver ``` 2. Load the cog: ```bash [p]load videoarchiver ``` ## Commands All commands support both prefix and slash command syntax: ### Core Video Archiver Commands (va_) - **`va_settings`**: Show current video archiver settings - **`va_format `**: Set video format - **`va_quality <144-4320>`**: Set maximum video quality (in pixels) - **`va_maxsize <1-100>`**: Set maximum file size (in MB) - **`va_concurrent <1-5>`**: Set number of concurrent downloads - **`va_toggledelete`**: Toggle deletion of local files after reposting - **`va_duration <0-168>`**: Set message duration in hours (0 for permanent) - **`va_template