Skip to content
Documentation

Building from Source

If you prefer to compile Media Sort yourself, you will need the Rust toolchain (version 1.96 or later) and Clang (needed to build bindings via libmpv-sys). Media Sort also requires libmpv at runtime for video playback support.


Before compiling, install the required compiler tools and development libraries:

Terminal window
sudo pacman -S clang mpv cmake dav1d

On x86_64, also install nasm (needed for the vendored libjpeg-turbo SIMD build):

Terminal window
sudo pacman -S nasm
Terminal window
sudo apt install clang libclang-dev libmpv-dev libasound2-dev libxkbcommon-dev libwayland-dev libx11-dev libvulkan-dev cmake nasm libdav1d-dev

Install Xcode Command Line Tools and Homebrew dependencies:

Terminal window
xcode-select --install
brew install mpv dav1d cmake

Install the following prerequisites:

  • Rust toolchain (1.96 or later)
  • Microsoft Visual Studio Build Tools (for the MSVC linker)
  • LLVM / Clang
  • mpv development files via vcpkg:
    Terminal window
    vcpkg install mpv
  • meson and ninja via pip, and nasm (x64/x86 only) via Chocolatey (needed for the vendored libjpeg-turbo SIMD build):
    Terminal window
    pip install meson ninja
    choco install nasm

  1. Clone the project repository:

    Terminal window
    git clone https://github.com/Lolle2000la/Media-Sort.git
    cd Media-Sort
  2. Compile the workspace using Cargo:

    Terminal window
    cargo build --release
  3. The compiled binary will be generated under the target directory:

    Terminal window
    ./target/release/media-sort-gui

After building, libmpv must be installed on your system for video playback. Without it, Media Sort still functions for images and audio, but in-app video and GIF playback will be disabled. Video files are still detected and browsable, though thumbnails will not be available for them.

For faster video thumbnails, Media Sort can also use ffmpeg when it is available. Official Windows and macOS packages bundle it automatically; on Linux you can install it via your package manager. It is optional — without it, video thumbnails fall back to mpv.