# hooke007/mpv_lazy architecture

> Architecture diagram of the GitHub repository hooke007/mpv_lazy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hooke007/mpv_lazy
- Repository: https://github.com/hooke007/mpv_lazy

## Overview

##### Project type and purpose
- This is an open-source “toolbox” or “lazy-package” for the Windows version of the mpv media player. Its goal is to bundle a complete, portable mpv installation with custom configurations (conf files, scripts, fonts, shaders, vs filters), installer/uninstaller batch scripts, and a Python wrapper (`umpv.py`) that orchestrates launches.

##### File structure
- Top-level:
- `.github/`, `LICENSE.MD`, `README.MD` – project metadata & docs.
- `installer/` – Windows batch scripts to install, uninstall, and switch mpv modes.
- `portable_config/` – holds all configuration artifacts:
· `_cache/` directory for mpv’s transient data.
· `fonts.conf` + `fonts/` – font resources.
· `input*.conf`, `mpv.conf`, `profiles.conf` etc. – mpv config files.
· `script-opts/` + `scripts/` – Lua/JS scripts & their option files.
· `shaders/` – GPU shader programs (.glsl).
· `vs/` – VapourSynth scripts (.vpy).
- `umpv.py`, `k7sfunc.py` – Python modules: `umpv.py` is a CLI launcher wrapping mpv with extra conveniences.
- `umpv.spec` – packaging specification, e.g., for PyInstaller or similar.

##### README for additional insights
- Confirms this repo is a “mpv player tinkering record,” with two primary branches (`main`, `lite`) and a “lazy package” (mpv-lazy) that is “extract-and-use.”

##### Detail is key
- Config files (.conf)
- Scripts (Lua/JS)
- Shaders (.glsl)
- VS filters (.vpy)
- Fonts & LUTs
- Data flow when user switches modes (batch script selects different `.conf` profiles).
- Do not over-complicate: this is a single-node, file-based packaging tool with two user-facing interfaces (batch & Python).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% User
    User["User"]:::user

    %% Entry Points
    subgraph "Installer Layer"
        direction TB
        Installer["Installer Batch Scripts"]:::exec
    end

    subgraph "Python Wrapper"
        direction TB
        Wrapper["umpv.py / k7sfunc.py"]:::exec
    end

    %% Deployment Target
    subgraph "Deployment Folder"
        direction TB
        ConfigStore["portable_config/"]:::folder
        MPVExe["mpv.exe"]:::external
    end

    %% Portable Configuration Contents
    subgraph "portable_config/" 
        direction TB
        ConfigFiles["Config Files (.conf)"]:::folder
        ScriptsOpts["script-opts/"]:::folder
        Scripts["scripts/"]:::folder
        Shaders["shaders/"]:::folder
        VS["vs/"]:::folder
        Fonts["fonts.conf & fonts/"]:::folder
        LUTs["luts/"]:::folder
        Cache["_cache/"]:::cache
    end

    %% Relationships
    User -->|"run .bat"| Installer
    User -->|"run CLI"| Wrapper
    Installer -->|"deploy config + mpv.exe"| ConfigStore
    Installer --> ConfigStore & MPVExe
    Wrapper -->|"invoke"| MPVExe
    MPVExe -->|"reads"| ConfigFiles & ScriptsOpts & Scripts & Shaders & VS & Fonts & LUTs
    MPVExe -->|"writes"| Cache

    %% Click Events
    click Installer "https://github.com/hooke007/mpv_lazy/tree/main/installer/"
    click ConfigStore "https://github.com/hooke007/mpv_lazy/tree/main/portable_config/"
    click Cache "https://github.com/hooke007/mpv_lazy/tree/main/portable_config/_cache/"
    click Fonts "https://github.com/hooke007/mpv_lazy/blob/main/portable_config/fonts.conf"
    click ConfigFiles "https://github.com/hooke007/mpv_lazy/blob/main/portable_config/mpv.conf"
    click ConfigFiles "https://github.com/hooke007/mpv_lazy/blob/main/portable_config/profiles.conf"
    click ScriptsOpts "https://github.com/hooke007/mpv_lazy/tree/main/portable_config/script-opts/"
    click Scripts "https://github.com/hooke007/mpv_lazy/tree/main/portable_config/scripts/"
    click Shaders "https://github.com/hooke007/mpv_lazy/tree/main/portable_config/shaders/"
    click VS "https://github.com/hooke007/mpv_lazy/tree/main/portable_config/vs/"
    click Wrapper "https://github.com/hooke007/mpv_lazy/blob/main/umpv.py"
    click Wrapper "https://github.com/hooke007/mpv_lazy/blob/main/k7sfunc.py"
    click Wrapper "https://github.com/hooke007/mpv_lazy/blob/main/umpv.spec"

    %% Styles
    classDef exec fill:#cce5ff,stroke:#0062cc,color:#004085
    classDef folder fill:#d4edda,stroke:#155724,color:#155724
    classDef cache fill:#fff3cd,stroke:#856404,color:#856404
    classDef external fill:#f8d7da,stroke:#721c24,color:#721c24
    classDef user fill:#e2e3e5,stroke:#6c757d,color:#383d41
```
