This script allows you to stop streams that use trancoding. Prohibits the use of plex web and Plex Media Player. Allow all users to transcode for SD streams
Python3 / requests (usually included with python3)
Tautulli (fantastic app that you should be using and must for this script anyway)
PlexPass
The script checks every 20 seconds streams activities.
run
user:~/plex-kill-transcode-streams$ sudo pip install -r requirements.txt
In this file you need to edit this line: "cd /YOURPATH/killstreamloop.sh && python3 killstream.py"
Specifically you need to edit this part: "/YOURPATH/Tautulli_IP_Enforcer"
Edit the file "authorized.txt" and add the username id followed by a semicolon and the limit of unique IP addresses that are allowed.
For example:
52252389
56428612
will allow 2 precise accounts to transcode streams for this Plex server. If a user is not in the text file then they can't transcode streams. They have to use direct stream or direct play.
Tautulli run the script when a stream starts, resumes or when a stream changes its transcode decision.
user:~/plex-kill-transcode-streams$ sudo pip install -r requirements.txt
Edit environment variables and volume
user:~/plex-kill-transcode-streams$ docker build -t stoptranscode .
user:~/plex-kill-transcode-streams$ docker run -e TAUTULLI_PORT=8080 -e TAUTULLI_IP=x.x.x.x -e TAUTULLI_API=YOURAPIKEY -v /home/data:/data stoptranscode
Edit docker-compose.yml and run
user:~/plex-kill-transcode-streams$ docker-compose up -d
Script based on https://github.com/Dosk3n/Tautulli_IP_Enforcer