l3uddz / plex_patrol

Monitor a plex server. Kick transcodes (audio or video or both), kick paused streams if not resumed within X minutes. Kick specific player's, e.g. Plex Web
GNU General Public License v3.0
98 stars 11 forks source link

Kick when quality isn't set to original/maximum #29

Open hacktek opened 4 years ago

hacktek commented 4 years ago

I have some users who refuse to change the quality to original in their clients and force transcoding even when they have a capable connection. I'd like to rain fire on them.

desimaniac commented 4 years ago

This should be enough

# instantly kick video transcodes?
KICK_VIDEO_TRANSCODES = true
hacktek commented 4 years ago

I don't want to kick due to any transcode though, I'm fine with people transcoding for valid reasons such as subs or codec support, it's the stubborn I want to get rid of.

desimaniac commented 4 years ago

So dont allow transcode if their clients can handle playing it at original quality/direct play?

Not sure what logic to use here..Maybe build up a list of all client options and get a list of what codecs it can and cant play directly? IDK. Seems like a lot of work. If anyone wants to volunteer a solution, then we can look at it.

hacktek commented 4 years ago

No, much simpler.

In Tautulli you can see the quality profile. When someone has the quality set to something that isn't original and they're transcoding because their settings are poo it says so:

"quality_profile": "4 Mbps 720p"

If the setting is correct but there's transcoding due to codecs the quality profile still says original.

"quality_profile": "Original",

See in my attachments how I was trying to play a 4K movie, it transcoded due to lack of TrueHD audio support and yet the quality profile shows that I'm keeping the original quality. This scenario is fine for non-4K content in my case and I'd like to allow it. I just want to kill those who purposely set quality levels lower than original.

Hope that makes sense.

Screenshot_20200202-161754

Screenshot_20200202-161458

hacktek commented 4 years ago

Here's an example of someone doing it wrong as they're purposely lowering the quality to 4 Mbps. This is the scenario that drives me nuts as this person has 100 Mbps at home.

Screenshot_20200202-162247~2

In part I want to get rid of this because I have an Nginx caching layer in front of Plex that works great for Direct Play content as I can cache the mkv/mp4 when it's requested but the people who do this are basically opting out of the cache for no reason (since I can't cache transcoded content in a way that can be reused by multiple people).