How to install Dim
What is Dim?
Dim is an application that allows you to convert your PC into a multimedia library with your digital content. It recognizes all of the multimedia archives in it's folder, and organises different sections and clumps series together. You can think of Dim as a program to create your very own Netflix.
And... Why not only use Plex or Jellyfin?
Both have their problems. Plex is very popular because it's relatively easy to install it. But unfortunately, it's parent company keeps trying to monetize Plex. Now, to use basic features such as watching movies outside of the LAN, you have to pay. Also, the source code isn't open.
And Jellyfin? This one is open source, but has it's problems. The user interface using the web browser is very clunky. Most of the time using the browser's back button doesn't work, and jellyfin's own back button works every second time... and takes you back two pages! It's code is written in 'C#', and is absolutely huge. Definitely feel pity for those who try to compile or package the program.
Dim
Fortunately, i found Dim, which solves all the problems that i had. The web interface is fast, sleek, and easy to use. It works even better than Netflix, and the best part is it's written in Rust, which makes it almost as fast as pure C, without the risk of buffer overflows and other bugs/vulnerabilities.
Let's install Dim on Debian.
We can download the program already compiled, but it's an old version. It's also possible to install using Docker, but I don't like Docker, because it's more difficult to configure and modify the programs. It's best to compile it by oneself.
First, we install the dependancies to compile it:
apt install sqlite libssl-dev libva2 libva-dev libva-drm2 ffmpeg
The instructions have other dependancies, but we need the newer versions, which are not found in the Debian repos.
install Rust
sudo apt install curl build-essential gcc make git -y
curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs > rustup.sh
sh ./rustup.sh
If you want, you can open and analyze rustup.sh before running (as it's dangerous to blindly download and execute scripts/programs from the internet cough cough Windows+Mac)
Install nvm, node.js y yarn:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh > nvm.sh
bash nvm.sh
source $HOME/.bashrc
nvm install node
nvm use node
npm install --global yarn
Install Dim
Now that we have all the dependancies, we can compile Dim.
git clone https://github.com/Dusk-Labs/dim
I had an error of openssl when i tried to compile (ERR_SSL_EVP_UNSUPPORTED) so i included the following step:
export NODE_OPTIONS=--openssl-legacy-provider
Now that we fixed the problems, we can proceed.
cd dim
yarn --cwd ui/ && yarn --cwd ui/ build
mkdir utils && ln -nfs $(which ffmpeg) utils/ffmpeg && ln -nfs $(which ffprobe) utils/ffprobe
cd target/release
mkdir utils && ln -nfs $(which ffmpeg) utils/ffmpeg && ln -nfs $(which ffprobe) utils/ffprobe
And finally:
cargo run --features vaapi --release
When it finishes compiling, it will say 'Listening on 0.0.0.0:8000' You can verify it's working if you go to the web page http://(machine's IP):8000 (provided port 8000 is open)
If everything works, you can stop the program using Ctrl C