๐ŸŽฌ mpv-webdav-loader

June 17, 2025 ยท View on GitHub

โœจ Features

๐ŸŽง Audio WebDAV & Sub WebDAV Integration

These scripts provide automatic connection of external subtitles and audio files using the WebDAV protocol. The connection is explicit due to the specified folders on the WebDAV server.

โ„น๏ธ Note: Due to MPV's limitations in searching files over HTTP, these scripts were created to facilitate video playback on Android/iPhone devices. However, they also work perfectly on Linux/Windows systems.

โš™๏ธ Configuration

๐ŸŽฎ MPV Configuration

Add the following to your mpv.conf:

# Audio file settings
audio-file-paths = RUS Sound: Rus Sound: RUS Sounds: Rus Sounds: Sound Rus: Sounds Rus
audio-file-auto = fuzzy

# Subtitle settings
sub-file-paths = RUS Subs: Rus Subs: SUBS: Subs: subs: Sub: Rus Sub
sub-auto = fuzzy
sid = no

# Script paths (customize these paths as needed)
script = /storage/emulated/0/Android/media/is.xyz.mpv/AudioWebDAV.lua
script = /storage/emulated/0/Android/media/is.xyz.mpv/SubWebDAV.lua

๐ŸŒ WebDAV Server Setup

๐Ÿง Apache WebDAV Setup (Debian/Ubuntu)

  1. Install Apache2:

    sudo apt-get update
    sudo apt-get install apache2
    
  2. Create and set permissions for WebDAV directory:

    sudo mkdir /var/www/webdav
    sudo chown -R www-data:www-data /var/www/
    
  3. Enable required Apache modules:

    sudo a2enmod dav
    sudo a2enmod dav_fs
    
  4. Configure Apache:

    • Edit the default configuration:
      sudo vi /etc/apache2/sites-available/000-default.conf
      
    • Add the following directives inside the <VirtualHost> section:
      Alias /webdav/var/www/webdav
      <Directory /var/www/webdav>
          DAV On
      </Directory>
      

    ๐Ÿ“ Configuration Details:

    • DavLockDB: Specifies the path to the WebDAV locking database
    • Alias: Links requests to http://hostname/webdav to /var/www/webdav
    • Directory: Enables WebDAV for the specified directory
  5. Enable and restart Apache:

    sudo systemctl enable apache2
    sudo systemctl restart apache2
    

๐Ÿ”ง Custom Path Configuration

  1. Edit Apache configuration:

    sudo vi /etc/apache2/apache2.conf
    
  2. Add custom directory configuration:

    <Directory /home/your_user/folder_public_html>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>
    
  3. Add www-data user to the appropriate group for folder access:

    sudo service apache2 restart
    

๐Ÿ“ธ Screenshots


Made with โค๏ธ for MPV users