Skip to content
prefect421Public

About

MVidarr - The Music Video Management System

Resources

Contributing

Stars

47 stars

Watchers

1 watching

Forks

Latest commit

 

History

2,004 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MVidarr

A comprehensive music video management and discovery platform that helps you organize, discover, and stream your music video collection with intelligent artist management and advanced search capabilities.

Artist Screen

✨ Key Features

  • 🎯 Advanced Artist Management - Multi-criteria search and bulk operations
  • 🔍 Comprehensive Video Discovery - Dual-source integration (MusicBrainz + YouTube)
  • 🖼️ Advanced Thumbnail Management - Multi-source search and cropping
  • 📁 Intelligent Organization - Automatic folder creation and cleanup
  • 🔎 Advanced Search System - Real-time suggestions and filtering
  • ⚡ Bulk Operations - Multi-select editing and batch processing
  • 📺 Video Streaming - Built-in player with transcoding support
  • 💚 System Health Monitoring - Comprehensive diagnostics
  • ⚙️ Database-Driven Settings - Complete configuration management
  • 📥 Download Management - Queue visualization and progress tracking
  • 🎨 Modern UI - Left sidebar navigation with theme system
  • 📺 MvTV Continuous Player - Cinematic mode for uninterrupted viewing
  • 🎭 Genre Management - Automatic genre tagging and filtering
  • 🔐 User Authentication - Role-based access control with security features
  • 🎨 Advanced Theme System - 6 built-in themes with export/import functionality

🚀 LATEST: v1.1.9 - Bug Fixes + Frontend Security Hardening

Released: November 24, 2026

  • 🔒 Security: titles, artist names and descriptions are now escaped everywhere they are rendered (a crafted YouTube title could previously inject script into a logged-in session); a CI check blocks new unescaped output
  • 🛡️ Data fixes: metadata refresh no longer overwrites a video's YouTube ID (#634); playlist sync no longer fails on videos with more than 2.1 billion views (#630); imports and downloads go to the artist's folder (#629)
  • ⏰ Scheduler: the schedules you set in Settings now take effect within about 5 minutes with no restart (#631); the Playlist Sync Interval setting works; schedule times are UTC
  • ⬇️ Downloads: always merged to MP4 instead of MKV (#633); playlist "Auto-download new videos" uses MVidarr's own downloader (#632)
  • 🖥️ UI: the Edit Video form saves every field and can move the file to the artist's folder (#635); bulk edit works (#636); MvTV filters work (#628); a wrong Last.fm match can be corrected on the artist page (#640); the Videos page no longer freezes loading many thumbnails
  • 🧹 Optional library repairs (dry run by default, back up first): scripts/fix_youtube_ids.py, scripts/fix_misfiled_videos.py, scripts/remux_mkv_to_mp4.py. See scripts/README.md
  • 📝 Behind a reverse proxy? After rebuilding, make sure TRUSTED_PROXY_HOSTS is still set for your proxy. See Troubleshooting.

📜 View the full changelog for v1.1.9's complete notes and every earlier release.

🚀 Quick Start

Docker Deployment (Recommended)

Simple 3-Container Architecture:

  • mvidarr - FastAPI application + Celery worker (managed by supervisord)
  • mariadb - Database
  • redis - Cache and job queue

Installation Steps:

  1. Clone the repository:

    git clone https://github.com/prefect421/mvidarr.git
    cd mvidarr
  2. Create your environment file:

    cp .env.example .env
  3. Edit .env with your configuration:

    nano .env  # or use your preferred editor

    Required settings:

    • DB_PASSWORD - Set a secure database password
    • MYSQL_ROOT_PASSWORD - Set a secure root password
    • SECRET_KEY - Generate with: openssl rand -hex 32
    • MUSIC_VIDEOS_PATH - Path to your music video collection
  4. Start MVidarr:

    docker-compose up -d
  5. Access the application:

    • Open your browser to http://localhost:5000
    • Default login: admin / mvidarr (change immediately)
    • Complete the first-run setup wizard

Docker Images:

  • Latest: ghcr.io/prefect421/mvidarr:latest
  • Specific version: ghcr.io/prefect421/mvidarr:v1.0.4

What's Running:

  • All background jobs (Celery) run automatically inside the main container
  • Supervisord manages both FastAPI and Celery processes
  • Simple, efficient, and optimized for home users

Manual Installation

Prerequisites:

  • Python 3.12+
  • MariaDB 11.4+ (recommended)
  • FFmpeg (for video processing)

Installation:

# Clone and setup
git clone https://github.com/prefect421/mvidarr.git
cd mvidarr
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

# Start FastAPI application
python fastapi_app.py

Production Service:

# Install as systemd service (recommended)
sudo cp mvidarr.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable mvidarr.service
sudo systemctl start mvidarr.service

# Check service status
sudo systemctl status mvidarr.service

Access: http://localhost:5000

📚 Documentation

Getting Started

Advanced Topics

🏗️ Architecture

MVidarr is built with modern, high-performance architecture:

  • Backend: FastAPI (Python 3.12+) with async operations and advanced features
  • API Layer: Comprehensive FastAPI with versioning, request logging, and auto-generated clients
  • Template System: Async Jinja2 templates with performance optimization and caching
  • WebSocket Support: Native FastAPI WebSockets for real-time features
  • Background Jobs: Celery + Redis for reliable metadata enrichment and processing
  • Database: MariaDB 11.4+ with async connection pooling and optimization
  • Frontend: Modern HTML5/CSS3/JavaScript with ES6+ async patterns
  • Performance: Multi-layer caching (Memory + Redis), compression, and optimization
  • Testing: Enterprise-grade validation and load testing frameworks
  • Media Processing: FFmpeg, yt-dlp for video downloading and processing
  • Authentication: Secure user management with role-based access control
  • Security: bcrypt password hashing, session management, audit logging
  • Containerization: Optimized Docker Compose with multi-stage builds, automated monitoring, and multi-stage production images

🔧 Configuration

Configuration is managed through:

  • Database settings (preferred for production)
  • Environment variables
  • Docker Compose environment files

The Docker Compose stack (docker-compose.yml) is entirely configured through the .env file you copy from .env.example — see the Configuration Guide for the full variable reference. Key ones:

# Database password (DB_HOST=mariadb is fixed by docker-compose.yml, not user-set)
DB_PASSWORD=secure_password
MYSQL_ROOT_PASSWORD=secure_root_password

# Application security
SECRET_KEY=your-secret-key

# External APIs (optional — can also be set later via the Settings UI)
YOUTUBE_API_KEY=your-youtube-key

# Redis auth (optional; Celery/Redis URLs are derived from this automatically)
REDIS_PASSWORD=your-redis-password

# Reverse proxy (required if accessing over HTTPS through nginx/Traefik/etc.)
# Without this, pages behind the proxy can fail to load with a browser
# "mixed active content" error. See docs/CONFIGURATION_GUIDE.md for a gotcha
# when the proxy shares a Docker host with MVidarr.
TRUSTED_PROXY_HOSTS=your-proxy-ip-or-hostname
CORS_ALLOWED_ORIGINS=https://your-domain.example.com

🛡️ Security

MVidarr includes comprehensive security features:

  • Multi-user authentication with role-based access (Admin, Manager, User, ReadOnly)
  • Secure password hashing with bcrypt
  • Session management with secure tokens and expiration
  • Account lockout protection against brute force attacks
  • Password reset functionality with secure tokens
  • Audit logging for user actions and system events
  • SQL injection prevention with parameterized queries and ORM
  • Docker security with non-root containers and isolated networking

🎯 Use Cases

  • Personal Music Video Collections - Organize and stream your collection
  • Music Discovery - Find new videos through integrated search
  • Media Center Integration - Works with Plex and other media servers
  • Home Entertainment - MvTV mode for continuous viewing
  • Music Research - Advanced search and filtering capabilities

🤝 Contributing

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

Development Setup

  1. Fork the repository
  2. Create a virtual environment: python -m venv venv
  3. Activate it: source venv/bin/activate (Linux/macOS) or venv\Scripts\activate (Windows)
  4. Install dev dependencies: pip install -r requirements.txt
  5. Run tests: pytest

📄 License

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

🙏 Acknowledgments

  • yt-dlp - Video download and processing
  • MusicBrainz - Music video metadata database
  • YouTube API - Video discovery and streaming
  • FastAPI - Web framework
  • MariaDB - Database engine

📞 Support

  • Documentation: Check the docs/ directory
  • Issues: Report bugs via GitHub Issues
  • Community: Join our discussions

MVidarr v1.0.4 - Built with ❤️ for music video enthusiasts

About

MVidarr - The Music Video Management System

Resources

Contributing

Stars

47 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages