Plexus is a simple tool to mass re-encode your media collection. It compiles a list of your media files which do not currently contain your preferred codecs. It can then re-encode all of that media for you, even if the media is stored on remote storage (via Rclone).
I created Plexus because I needed a simple CLI tool for re-encoding all of my media, and every other solution ended up being more complex than I needed them to be.
Thank you, Mason Rowe for your support.
Robert Thomas - Lead Software Engineer at Level Zero Technology
Rather than installing the dependencies and downloading Plexus locally, you can run the Plexus Docker image:
docker run -v $HOME/.config/plexus:/config wolveix/Plexus:latest
You can automatically install Plexus by running the following line via a supported command line interface:
curl https://plexus.wolveix.com/install.sh | sudo bash
If you don't have superuser privileges or are using macOS, use this instead:
curl https://plexus.wolveix.com/install.sh | bash
Alternatively, you can manually install Plexus to a custom location on your device. You should install sudo if it doesn't already exist on your system.
Install any missing dependencies (Debian/Ubuntu):
sudo apt-get -qq -y update && sudo apt-get -qq -y upgrade
sudo apt-get -qq -y install curl ffmpeg rsync
Install any missing dependencies (CentOS):
sudo yum -q -y install epel-release
sudo yum -q -y update && sudo yum -q -y upgrade
sudo yum -q -y localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
sudo yum -q -y install curl ffmpeg ffmpeg-devel rsync
Install any missing dependencies (macOS):
brew update && brew upgrade
brew install curl ffmpeg rsync
Create all of the temporary folders required:
mkdir -p $HOME/.config/plexus $HOME/.plexus/encode/convert $HOME/.plexus/encode/converted $HOME/.plexus/rclone /tmp/plexus
Download the default config file and move it into the correct location:
curl -O
https://raw.githubusercontent.com/wolveix/plexus/master/plexus.conf
mv plexus.conf "$HOME"/.config/plexus/
Next, download the executable itself:
curl -O https://raw.githubusercontent.com/wolveix/plexus/master/plexus
Finally, correct the file permissions and move it into your respective operating system's application directory. The following example is for Linux:
chmod u+x plexus && chmod 755 plexus
sudo chown root:root plexus
sudo mv plexus /usr/bin/plexus
Plexus natively supports RClone and a custom build of FFmpeg. You can install any dependencies via Plexus' built-in install function.
This is the default config file:
audio_codec="aac"
blacklist_file="$HOME/.plexus/blacklist"
convert_dir="$HOME/.plexus/encode/convert"
converted_dir="$HOME/.plexus/encode/converted"
deinterlacing="true"
ffmpeg_binary=""
ffmpeg_threads="2"
ffmpeg_preset="faster"
ffprobe_binary=""
force_overwrite="true"
fusermount_binary=""
hardware_acceleration="false"
hardware_code="opencl"
list_file="$HOME/.plexus/list.txt"
media_container="mkv"
media_dir="/mnt/plexdrive"
mount_dir=""
rclone_binary=""
rsync_binary=""
video_codec="h264"
video_library="libx264"
Without changing any options, Plexus will create a list of your files that either don't use the MKV container, x264 video codec or the aac audio codec. You can then process this list by running the encode command which will move through the list and re-encode each file to fit the above three conditions.
Original files are replaced by default, but you can disable this by changing the force_overwrite
value to false
. You can edit the config file directly ($HOME/.config/plexus/plexus.conf
) or you can use the built-in config function by running plexus config
.
This somewhat varies depending on whether you're planning on encoding local media or media contained on an RClone remote. Firstly, specify your ideal codecs via the config
function.
Run plexus list -d /path/to/media
to start building a recursive list of your media which needs to be re-encoded.
Once the list function has finished its process, you can begin the encoding process by running plexus encode -l /path/to/list
.
Run plexus list -d /mount/path/path/to/media -m /mount/path
to start building a recursive list of your media which needs to be re-encoded.
Once the list function has finished its process, you can begin the encoding process by running plexus encode -l /path/to/list -r RCloneRemote:
.
If you run into any issues, please submit
an issue via the repo. If the issue occurs during the encode command, please run
the command again with the --verbose
flag so that we may have a better
idea of what's happening.