Full Installation

Virtual environment

It is preferable to install mendevi in a virtual environment. Please refer to the pyenv main page. It is possible to use python3-venv or conda as well.

Install pyenv

First install the python dependencies then install pyenv.

sudo apt install libedit-dev libncurses5-dev
sudo apt install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl git libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
sudo dnf install openssl11-devel --allowerasing
sudo dnf install gcc make patch zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel xz-devel
yay -S ncurses5-compat-libs
curl https://pyenv.run | bash
CONTENT=$'export PYENV_ROOT="$HOME/.pyenv"\ncommand -v pyenv > /dev/null || export PATH="$PYENV_ROOT/bin:$PATH"\neval "$(pyenv init -)"\neval "$(pyenv virtualenv-init -)"'
grep -q "$CONTENT" ~/.bashrc || echo "$CONTENT" >> ~/.bashrc
source ~/.bashrc

You could install dependencies by using Homebrew.

brew install ncurses
brew install openssl readline sqlite3 xz zlib tcl-tk
brew install pyenv

Warning

Windows is crap, so be prepared for a tedious and buggy installation! You should forget Microchiotte-Windaube and go straight to Linux before you pull out all your hair!

Good luck with the official guide.

If it fails, this debug link may help you.

Configure pyenv

Create the virtual environment.

pyenv update
env PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations --with-lto" PYTHON_CFLAGS='-march=native -mtune=native' \
pyenv install -v 3.14
pyenv virtualenv 3.14 mendevi
pyenv activate mendevi
pip install uv

Dependencies

ffmpeg

If you want the latest version, please build it Build ffmpeg.

mendevi has hard dependency on the FFmpeg package. You should install it first, please refer to the FFmpeg download page.

sudo apt install ffmpeg
sudo apt install python-dev-is-python3 pkg-config
sudo apt install libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
sudo dnf install ffmpeg
sudo pacman -S ffmpeg
sudo zypper install ffmpeg
sudo pkg install ffmpeg

You could install the FFmpeg by using Homebrew.

brew install ffmpeg pkg-config

Warning

I refuse to believe that you have gone through the previous steps. As you are stubborn and stupid, I must remind you that the game is not yet won! It is still not too late to listen to the voice of wisdom, which is telling you to get rid of this massive piece of Windows shit for ever.

It is important to configure your environment variable to hook ffmpeg to mendevi. You can try to follow this guide for example.

lshw

To get the full environment information, mendevi use tha system package lshw.

sudo apt install lshw
sudo dnf install lshw
sudo pacman -S lshw

perf

To access the RAPL sensors.

if ! sudo apt install -y linux-perf; then
    sudo apt install -y linux-tools-common linux-tools-generic linux-tools-$(uname -r)
fi
sudo dnf install perf
sudo pacman -S perf

transmission (optional)

To be able to automatically retrieve and share datasets and videos. For more informations, please have a look on the transmission webpage.

sudo apt install transmission-daemon
sudo dnf install transmission-daemon

You could install transmission by using Homebrew.

brew install transmission transmission-cli

Ensure that transmission-daemon is installed correctly with the good permissions:

echo '======== CHECK AND FIX "transmission-daemon" INSTALLATION ========'

# find transmission-daemon user
trans_user=$(systemctl show -p User transmission-daemon.service | cut -d= -f2)

# create a common group with $USER and $trans_user
if getent group transshare > /dev/null; then
    echo 'ok - the group transshare already exists'
else
    echo "create a transshare group with $USER and $trans_user..."
    sudo groupadd transshare
    sudo usermod -aG transshare "$USER"
    trans_user=$(systemctl show -p User transmission-daemon.service | cut -d= -f2)
    sudo usermod -aG transshare "$trans_user"
    sudo systemctl restart transmission-daemon  # apply the effect
    echo '    done'
fi

# set the transshare group permissioin to ~/.cache/mendevi
mkdir -p ~/.cache/mendevi
if ! sudo -u $trans_user ls ~/.cache/mendevi/ &>/dev/null; then
    echo 'give the permission in ~/.cache/mendevi for transshare...'
    sudo chgrp -R transshare ~/.cache/mendevi/
    sudo chmod -R g+w ~/.cache/mendevi/
    sudo find ~/.cache/mendevi/ -type d -exec chmod 2775 {} \;
    sudo find ~/.cache/mendevi/ -type f -exec chmod ug+rw {} \;
    sudo chmod o+x ~/
    sudo chmod o+x ~/.cache/
    echo '    done (perhaps reboot required)'
else
    echo "ok - $trans_user can access to ~/.cache/mendevi"
fi

# make transmission-daemon working
if [ -n "$(transmission-remote -l 2>/dev/null)" ]; then
    echo 'ok - transmission-daemon seems to be reachable'
else
    echo 'attempted transmission repair...'
    sudo systemctl stop transmission-daemon
    sudo sed -i 's|Type=notify|Type=simple|g' /lib/systemd/system/transmission-daemon.service
    sudo sed -i 's|--log-level=error|--log-level=info|g' /lib/systemd/system/transmission-daemon.service
    sudo sed -i 's|"rpc-authentication-required": true|"rpc-authentication-required": false|g' /etc/transmission-daemon/settings.json
    # sudo sed -i "s|User=$trans_user|User=$USER|g" /lib/systemd/system/transmission-daemon.service
    sudo systemctl daemon-reload
    sudo systemctl start transmission-daemon
    echo "type 'systemctl status $trans_user' to check the status"
fi

# enable transmission-daemon
if [ "$(systemctl is-enabled transmission-daemon 2>/dev/null)" = "disabled" ]; then
    echo 'enable transmission-daemon service...'
    sudo rm -f /etc/systemd/system/multi-user.target.wants/transmission-daemon.service
    sudo systemctl enable transmission-daemon
    echo '    done'
else
    echo 'ok - transmission-daemon is enabled'
fi

# open graphical interface in a web browser
xdg-open http://localhost:9091/transmission/web/

pyav (optional)

Although it is installed automatically, it is better to install av manually to avoid redundancy with ffmpeg. Please refer to the PyAv installation guide.

uv pip -v install av --no-binary av
uv pip -v install av --no-binary av

On MacOS you may have issues with regards to Python expecting gcc but finding clang. Try to export the following before installation:

export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future
uv pip -v install av --no-binary av

Warning

I see that you insist on using Windows, this step is the most critical, good luck!

On Windows you must build from source in order to indicate the location of ffmpeg, pleas follow the PyAv windows installation guide and good luck!

cuda (optional)

If you have a GPU, please install CUDA or ROC then follow the PyTorch installation guide. Without CUDA or ROC, the software is not able to use the GPU (CPU only).

Follow the official NVIDIA CUDA Installation Guide for Linux. Or the non official guide.

# if cuda avalaible
if apt-cache show cuda-drivers >/dev/null 2>&1; then
    # detect available versions
    NVIDIA_DRIVER_VERSION=$(sudo apt show cuda-drivers 2>/dev/null | awk '/Version:/ {print $2}' | head -n1 | cut -d'-' -f1)
    echo "NVIDIA detected dirver version: $NVIDIA_DRIVER_VERSION"
    DRIVER_BRANCH=${NVIDIA_DRIVER_VERSION%%.*}

    # install cuda
    # sudo apt remove --purge 'nvidia-*' cuda* && sudo apt update
    sudo apt install linux-headers-$(uname -r)
    sudo apt install cuda-drivers-${DRIVER_BRANCH}
    sudo dkms build -m nvidia -v ${NVIDIA_DRIVER_VERSION}
    sudo dkms install -m nvidia -v ${NVIDIA_DRIVER_VERSION}

    # verification
    nvidia-smi

    # install nvcc
    if ! command -v nvcc &> /dev/null; then
        sudo apt install cuda-toolkit
        # add the toolkit into the path
        if ! grep -q "/usr/local/cuda/bin" ~/.bashrc; then
            echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc
            echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
        fi
        source ~/.bashrc
    fi
else
    echo "cuda-driver package not found"
    echo "please add the nvidia repository"
    echo "https://linuxcapable.com/how-to-install-cuda-on-debian-linux/"
fi

It is not well supproted, you can try to follow this bsd link.

Warning

Windows is crap, so be prepared for a tedious and buggy installation! You should forget Microchiotte-Windaube and go straight to Linux before you pull out all your hair!

It is important to configure your environment variable to hook cuda to PyTorch. Good luck with the official guide.

vamf (optional)

If you want to have acces to the Netflix VMAF quality metric, please install it!

sudo apt install meson nasm
git clone https://github.com/Netflix/vmaf/ ~/vmaf_git
cd ~/vmaf_git
meson setup libvmaf libvmaf/build --buildtype release -Denable_float=true
sudo ninja -vC libvmaf/build install
cd -
rm -rf ~/vmaf_git

Installation

Basic Installation

To install a minimal version of mendevi, follow Simple Installation. Overwise, you can follow Building From Source (For devellopers) for a full installation.

Building From Source (For devellopers)

To install the lastest development version from GitLab source, clone mendevi using git and install it using uv pip:

git clone https://gitlab.inria.fr/rrichard/mendevi.git ~/mendevi_git
cd ~/mendevi_git
pyenv activate mendevi  # to be sure to be in a virtual env
uv pip install -e .[doc,test]
mendevi test  # to test if the installation is ok

You can now also compile documentation locally Build Documentation and run the benchmark testing (after the previous step).

Build Documentation

You can compile the documentation yourself after Full Installation by simply typing mendevi doc or:

cd docs/ && make clean && make html && cd -
firefox docs/build/html/index.html