A while ago, I built a script that would allow me to re-encode my entire Plex collection into x264 and AAC with native Rclone support. The script works on both Debian/Ubuntu and CentOS/Rhel. I’ve left this running over my 60TB+ GDrive collection for months at a time with no issues There’s an automated installer on the repo, so installation is as easy as entering a single line into your terminal. There’s also a built-in install function which automates the installation of each of the dependencies (including building FFmpeg from source for extended codec support).
The idea is that you build a list of your media via
plexus list -a "aac" -v "x264" -d "/path/to/media" and then encode that list via
plexus encode -a "aac" -v "x264" or with the
-r RCloneRemote: flag for direct Rclone support. A list is used (instead of in-place encoding) so that you can stop and resume encoding at any point.
You can specify different codecs via CLI flags or by using the config file:
audio_codec="aac" convert_dir="$HOME/.plexus/encode/convert" converted_dir="$HOME/.plexus/encode/converted" ffmpeg_binary="" ffmpeg_threads="2" ffmpeg_preset="faster" ffprobe_binary="" force_overwrite="true" fusermount_binary="" hardware_acceleration="false" hardware_codec="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"
If you have any feature requests or other ideas, I would love to hear them You can find the repo here: