# plexmediaserver_crack

Unlocking *most features* on (hardware transcoding, intro/credit detection, HEVC transcoding, etc..) on Plex Media Server. Including Plex Pass features without a required subscription, and including early-access/development/Plex Ninja features. Some features are exempt (check the Windows source code for reference).

# Installation

## Windows

Note: x86-64 only. If your Plex Media Server is in "Program Files (x86)", it's an indicator of running the 32-bit version of Plex Media Server, which is not supported.

1. Download `IPHLPAPI.dll` from [the latest release](https://gitgud.io/yuv420p10le/plexmediaserver_crack/-/raw/master/binaries/IPHLPAPI.dll) and put it in your Plex Media Server's installation folder. (e.g. `C:\Program Files\Plex\Plex Media Server`)
2. Restart Plex Media Server. All features will be unlocked.
3. For persistence with updates (as long as the crack doesn't break as a result of them), set the file as read-only.

## Linux

x86-64 only.

### Native

Install `patchelf`. Can be done either via `pip` or your distribution's package manager.

```sh
sudo apt update && sudo apt install patchelf # Debian/Ubuntu/etc
sudo pacman -S patchelf # Arch
sudo yum install patchelf # Fedora/RHEL/Centos/Rocky/OpenSUSE/etc
sudo apk update && apk add --upgrade patchelf # Alpine
sudo pip install patchelf # pip; you might need --break-system-packages if installing if you're on an externally managed environment
```

The script assumes Plex Media Server is currently running.

Run the following command:

```bash
sudo sh -c "$(curl -sSL https://gitgud.io/yuv420p10le/plexmediaserver_crack/-/raw/master/scripts/crack_native.sh)"
```

Your Plex Media Server should now be restarted with all features unlocked.

For persistance with Plex updates, create the above as a bash script (run as root!) and run it manually (or, trigger it) after updates or run it as a daily cronjob.

### Docker

First, install a static build of `patchelf`:

```bash
sudo pip install patchelf # pip; you might need --break-system-packages if installing if you're on an externally managed environment

# Install from provided binaries
wget https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-x86_64.tar.gz -O /tmp/patchelf.tar.gz && \
    mkdir /tmp/patchelf && \
    tar -xvzf /tmp/patchelf.tar.gz -C /tmp/patchelf && \
    sudo cp -r /tmp/patchelf/ / && \
    rm -rf /tmp/patchelf
```

Installing `patchelf` from your distribution's package manager will provide you with a dynamically linked binary, which may fail if your Docker image has a too old version of glibc/glibcxx. You can try going with that approach, but do not ask for support if it doesn't work.

Tested on [linuxserver/docker-plex](https://github.com/linuxserver/docker-plex), but should work for all Docker setups.

The script assumes Plex Media Server is currently running, that you have a mounted `/config` volume in the container, and that your container is named `plex`.  
If your container is named differently or if your external volume is mounted elsewhere, change it at the top of the script instead of running it through this command.

Run the following command: (you can emit `sudo` if the executing user is in the `docker` group)

```bash
sudo sh -c "$(curl -sSL https://gitgud.io/yuv420p10le/plexmediaserver_crack/-/raw/master/scripts/crack_docker.sh)"
```

Your Plex Media Server should now be restarted with all features unlocked.

This will NOT persist through Docker image updates, as rebuilding the container will copy libraries freshly from the image.  
Setup the above commands as a script for an easy installation, and optionally, set it as a cronjob to run daily.

### Building

#### Windows

Build using Visual Studio 2022, C++20. You need [Zydis](https://github.com/zyantific/zydis).

#### Linux

[linuxserver/docker-plex](https://github.com/linuxserver/docker-plex)'s image uses GLIBC 2.35, and Debian stable (bookworm, as of now) is at 2.36. Use a host with an older version to build (e.g. Debian Bullseye).

### Troubleshooting

* For intro/credit detection, go to Settings -> Library -> Marker source; and select the "local detection only" option.
* If hardware transcoding (or any other feature) does not work, it should not be related to this repository. Use Google to troubleshoot why said feature doesn't work on your setup specifically.
* The "Skip Intro" button will not be displayed on clients that don't have the Plex Pass. It's a client sided limitation. I wrote a crack for the Plex client on Windows to circumvent it, at [plexpass_hook](https://github.com/yuv420p10le/plexpass_hook). The "Skip Credits" button will appear on all clients, including the free ones.

### Screenshots

![](https://i.imgur.com/6LGkLcm.png) ![](https://i.imgur.com/su02dh3.png)  
![](https://i.imgur.com/sSysxcq.png)