Casvt / Plex-scripts

Plex, the arr's and tautulli scripts coming from user requests
GNU General Public License v3.0
338 stars 30 forks source link

stream_upgrader.py - add feature to auto downgrade if transcoding #126

Closed splitsec2 closed 2 years ago

splitsec2 commented 2 years ago

In what file should the feature be added? stream_upgrader.py

What is the feature request? Downgrade the stream's video (resolution) when there is a LOWER resolution one available wherever it may be if the client/server determine it needs to be transcoded

(e.g. you start streaming a 4K movie and the server/client determines it needs to transcode to 1080p or worse 720p/4mb and you have a lower resolution version in a different library so the script will change the stream to that version).

The idea is someone tries to play a hi-res version of a file but their client or settings needs it to be transcoded to a lower resolution and a lower resolution file is available switch to streaming the lower res file instead. (Even if the client still needs it transcoded, at least the server won't be transcoding 4K to 720p/4mbs it would be doing the lighter lift of going from 1080p/10mbs to 720p/4mbs or something)...

Casvt commented 2 years ago

Request completed (and more)! Your feature has been added but also a lot of other things:

You can find the script here: https://github.com/Casvt/Plex-scripts/blob/main/stream_control/stream_controller.py. For your purpose, set process_direction to 'down'. Enjoy!