Default All Clients to Max Internet Streaming

The priorities of Plex are really troubling and do not spell a bright future for the people among us who just wanna watch their own media.

7 Likes

Least we got a new logo!

8 Likes

Maybe this will help since they don’t care about us, Plex you are not being very environmentally conscious. Screwing your users AND the planet lol

Energy Usage

Unnecessary Plex transcodes > Bitcoin mining

3 Likes

Any chance you could share your solution with us?

I’ve tried doing the same by having the plex server behind an nginx reverse proxy and manipulating the bitrate information that is sent, but have not had any luck yet.

If this application were open source, it’d be done in a day.

You know. Because it’s a critical feature the community wants and needs.

So embarrassing.

1 Like

It’s a year later. How’s the egg?

2 Likes

Moldy.

Rotten.

5 Likes

:slight_smile:

Plex is something I use every day and share with my friends and family. I come back to this thread and call out how long we’ve been waiting not because I get a kick out of it, but because I really want this platform to address a pain point that (clearly) a large number of users share.

Any updated timeline?

2 Likes

Unfortunately not. I ask about it periodically, and I’m pretty sure we’ve past one of the things which was blocking progress, so that’s good.

13 Likes

Thank you for the update ! :slight_smile:

What are the biggest roadblocks now?

1 Like

Justify to the investors why they want to spend dev hours on something that doesn’t bring any money in.
I’d really like to know what’s the technical impediment, because I doubt there’s one.

4 Likes

You can control the remote streaming quality of clients using cloudflare workers. I’ve been doing this for the past 1.5-2 years. This of course is assuming your running your plex server/setup through cloudflare already.
Of course it requires a pinch of black magic since it isn’t natively supported by plex. But, I don’t see how it could be such a big difficulty for plex to implement if you can already do this through cloudflare workers.

1 Like

How so?

I have my worker script on my github, check it out. GitHub - zmike808/Plex-Blackmagic: A cloudflare worker for plex that uses blackmagic to change default client bitrates! it’s been forever since I’ve touched it but it’s still working strong.

It just does some basic remote quality modifications, but you can get more in depth or force all to a certain quality, just requires simple/minor tweaks to the logic.

If you’re not familiar with coding let me know what scenario you’re looking for and I can help out.

EDIT: just looked at the forks and it looks like someone forked my code and cleaned it up a bit, may want to check that out as well.

2 Likes

Thanks. I was mostly curious what Cloudflare had to do with it - what the underlying method was.

@eygraber

Here is the solution for nginx reverse proxy for Android/Roku. This will force original quality.

Tested WORKING on Roku Streaming Stick+ and Firestick 4k. Does not work on Android Mobile (will force higher bitrate but will always transcode anyways) Forcing directPlay=1 gives a transcoder permission error when the bitrate is set below maximum. If anyone figures it out for Android mobile let me know. If somebody else could do Apple TV I’m sure others would appreciate it. It might work it might not. Fortunately (LOL) I don’t own one.

Put the below code inside your “location / { }” directive.

# Android force original bitrate
if ($http_user_agent ~ (^|.*)Android(.*)) { set $tempargs ${args}-ANDROID; }
if ($tempargs ~ (^|.*)&directStream=0(.*)-ANDROID) { set $tempargs $1&directStream=1$2-ANDROID; }
if ($tempargs ~ (^|.*)&videoQuality=(\d+)(.*)-ANDROID) { set $tempargs $1$3-ANDROID; }
if ($tempargs ~ (^|.*)&maxVideoBitrate=(\d+)(.*)-ANDROID) { set $tempargs $1$3-ANDROID; }
if ($tempargs ~ (^|.*)&videoBitrate=(\d+)(.*)-ANDROID) { set $tempargs $1$3-ANDROID; }
if ($tempargs ~ (^|.*)&videoResolution=(\d+)x(\d+)(.*)-ANDROID) { set $tempargs $1$4-ANDROID; }
if ($tempargs ~ (^|.*)-ANDROID) { set $args $1; }

# Roku force original bitrate
if ($http_user_agent ~ (^|.*)Roku(.*)) { set $tempargs ${args}-ROKU; }
if ($tempargs ~ (^|.*)&directStream=0(.*)-ROKU) { set $tempargs $1&directStream=1$2-ROKU; }
if ($tempargs ~ (^|.*)&videoQuality=(\d+)(.*)-ROKU) { set $tempargs $1$3-ROKU; }
if ($tempargs ~ (^|.*)&maxVideoBitrate=(\d+)(.*)-ROKU) { set $tempargs $1$3-ROKU; }
if ($tempargs ~ (^|.*)&videoBitrate=(\d+)(.*)-ROKU) { set $tempargs $1$3-ROKU; }
if ($tempargs ~ (^|.*)&videoResolution=(\d+)x(\d+)(.*)-ROKU) { set $tempargs $1$4-ROKU; }
if ($tempargs ~ (^|.*)-ROKU) { set $args $1; }

You’re welcome.

I separated each device even though they are configured the same incase I need to do platform specific tweaks.

If you want to enable this for just remote users you could probably verify X-Forwarded-For header does not match a private IP range. Although an nginx reverse proxy is really only needed for remote users so this would only be for fun or if you wanted to limit it to specific users/devices using other HTTP headers.

Unfortunately nginx doesn’t support nested IF statements so the code is more bulky than I wish it to be…

YES, there are other ways these directives could be set up. I’m well aware.

For example, if you wanted to force a specific bitrate see below. NOTE: if you don’t set the bitrate high enough it will still change it but then it also forces a transcode so set those bitrates high to avoid the transcode!

if ($tempargs ~ (^|.*)&maxVideoBitrate=(\d+)(.*)-ROKU) { set $tempargs $1&maxVideoBitrate=YOURBITRATE$3-ROKU; }
if ($tempargs ~ (^|.*)&videoBitrate=(\d+)(.*)-ROKU) { set $tempargs $1&videoBitrate=YOURBITRATE$3-ROKU; }
4 Likes

Very nice! Would this work when using cloudflared as well?

EDIT: Scratch that, working perfectly, thanks for this!

One thing i’ve noticed is it seems to Transcode everything including the audio, is that unavoidable?

See my solution above. It’s for nginx but if you applied the same concept in the cloudflare solution to just DROP the paramaters as my example shows instead of setting their values to something new as it does now it will force original quality.

Or set the bitrate ridiculously high… like 600000000. lol…

2 Likes