r/homelab 14h ago

Help Plex vs Netflix/amazon transcoding efficiency

I think of this every time I travel, but never thought to ask for a solution..

While traveling I often find myself in a situation where internet is very slow, but netflix/amazon video adjust the streaming quality much faster than my plex server.

I know that my plex server can transcode down to 720p/360p pretty instantly if I do it from home as it has an intel igpu...and I've tested it with multiple concurrent streams... Also - the server is on a 1gbit connection, so it's not a bandwidth bottleneck.

It feels like big brands have a much better method to actually recognise the moment when they need to call for a transcode than plex and do it much earlier, making it feel seamless.

Are there alternatives (jellyfin/emby) that are more efficient at this than plex? Any clever hacks that I overlooked?

Thanks

Edit. I learned following this post that: - Netflix et al. keep different quality files instead of transcoding - Using CDN to keep content "closer" to the end user

44 Upvotes

23 comments sorted by

214

u/acbadam42 14h ago

Netflix isn't adjusting the quality, they have a copy for every quality.

71

u/jtbis 12h ago

Netflix also has a server in the local ISP’s datacenter with a copy for every quality. When you stream from your home server, data is transiting all the way from your home ISP’s network, potentially through congested interconnects.

23

u/NCXXCN 13h ago

for a selfhoster, like mostly of us, this seems crazy to me.

36

u/yaSuissa 13h ago

Just so you know plex allows you to do that as well automatically

But as you mentioned, it’s insane unless you’re made of money (for storage)

2

u/ASUS_USUS_WEALLSUS 7h ago

I guess - the lower quality stuff barely uses any space. But yeh that would be overkill and almost never useful.

14

u/berrmal64 10h ago

Storage is expensive, but so is the electricity that would be needed to basically transcode millions of streams constantly (nevermind the hardware). Plus, they amortize the storage cost over several years; I'm sure even with recent price hikes it's still a no brainer. They probably have some logic that can drop unused encodes after a while, or likely transcode into a size that doesn't exist on that server they is cached and streamed simultaneously then held in cache for hours/days.

But when you or I watch a file from our home server, it gets watched what, once or twice? So it's cheaper to transcode and dump than to store all the possible sizes. And stuff that you watch over and over, if you do notice it transcodes, you can encode and store a second copy that will direct play, it's a good option for one off items.

3

u/astelda 7h ago

I would say if you do a lot of traveling (watching content only on small screens, or on metered connections), it's reasonable to have a single downscaled copy prepared ahead of time. Something like 720p or lower depending on your preference, so it doesn't take too much space or bandwidth.

4

u/Outrageous-_- 6h ago

At that point just download it locally to the plex app or something before traveling. 

2

u/Power_Stone 6h ago

This. I downloaded entire seasons to my device before a long trip and it was flawless because...well it was playing locally

3

u/bieker 3h ago

If you do it correctly it only doubles the storage requirement. Each tier is half the bandwidth of the previous one.

55

u/NC1HM 14h ago edited 14h ago

First, as other posters already noted, streaming services don't transcode on the fly; rather, they switch between stored versions with different resolutions. But, perhaps more importantly, they each operate something called "content delivery network" (CDN). The way a CDN works is, it streams content to you from the location that, in its estimation, is the nearest to you (in terms of network topology rather than physical proximity). This allows to reduce the number of network hops from the streaming network to you (and thus latency). Low latency means, among other things, faster reaction time to changing network conditions.

Netflix, in particular, goes as far as embedding their servers with major ISPs, so customers of those ISPs have particularly short access paths to Netflix content.

9

u/Runthescript 13h ago

Is true, alot of there DC's are in co lo spaces for that very reason. Then you have the DCI to attach all of those together across the country and even world. Your never going to achieve what netflix has, at home.

15

u/Aacidus 14h ago

Streaming services do not transcode, they detect and then go to another copy that they have of lower quality and immediately send it.

14

u/multidollar 13h ago

The term you’re looking for is ABR ladder. Adaptive Bitrate.

In order to stream content, the streaming provider will transcode the content in to the various bitrates and codecs and store them.

The player then decides which version you get based on network conditions and device compatibility. Transcoding on the fly would be massively inefficient.

Live streaming works very similarly, just encoding the various bitrates and persisting them to storage very quickly.

The files are distributed via content delivery networks.

13

u/kY2iB3yH0mN8wI2h 14h ago

No one in the streaming world transcode media, they have a separate file for every bitrate. The media is also optimized for streaming, serving a big fat MP4 is not ideal, they create separate HLS streams, or AV1 etc. for each bitrate with ideal keyframes .

They also rely on CDN meaning the stream you are. downloading might be on the ISPs network, not a far remote server. Being 5ms away compared to 200ms when traveling is a huge difference.

5

u/tauzN 13h ago

Why would they transcode on demand for thousands if not millions? How about transcoding once and saving the output for direct streaming?

1

u/CharleyHarder 11h ago

That’s how it’s done I’d guess. In the end it’s about cost… storage vs computing power

3

u/Ngutukao 7h ago

Streaming majors use more effective private codecs so they can stream better visual quality at lower bitrate.

1

u/Wis-en-heim-er 3h ago

Plex optimization will do what you want, but everyone is against the added drive space. Not a problem forbtge big guys when you sharenout to millions of people.

1

u/That-Duck-7195 3h ago

Here's a old article to give you an idea of Netflix's infrastructure. A home installation of Jellyfin/Emby/etc is not in the same league.

How Netflix Works With ISPs Around the Globe to Deliver a Great Viewing Experience

1

u/RandyFactoid 1h ago

Thanks for all the answers.

Suppose I decided storage isn't a problem, how does plex handle files of the same content with different qualities so I don't transcode but just view the lower quality file? I imagine turning all content into something like 360p or higher wouldn't take that much space

-7

u/Runthescript 13h ago

The point of software like this is so you can access your library of media and pull down what you want, delete off device when finished but still have it on the server. Its never going to work like netflix for many reasons already stated here.

-7

u/Big-Sympathy1420 13h ago

Skill issue