How does a video or music file get to the client and can this be controlled?

I have a setup where I have all media on a NAS and a separate Plex server in case anything needs to be transcoded for specific clients. Don’t want Plex on the NAS for a number of reasons, performance being one of them.
I’ve had a quick look and can’t find a description of how Plex works in this scenario. What I’d like to understand is when a client asks for a video (or music) and Plex somehow determines whether the client can handle the native format stored on the NAS does the client get directed straight to the file on the NAS in this scenario or is the Plex server reading everything and then punting it back out to the client over the network?
…and whichever way it works, is it possible to force it to have direct access or via Plex server access only?

Having a separate NAS and PMS does make some sense in some situations. A NAS doesn’t need heavy horsepower to just serve up files to a local network, tanscoding by a PMS can require some ponies under the hood. Here is my hypothetical;

  1. A NAS, it could be commercially manufactured one or a home built one. It has low specs because it’s only doing one thing, being a NAS and serving up files to your local network.
  2. A PMS, it could be anything, a Windows PC, Linux PC, Nvidia Shield what ever, I will use a Windows PC as an example.
  3. You would map the NAS storage to the Windows PC as network shares with file explorer and configure PMS to use those shares for it’s library. With this setup any Plex Client that wants to connect to your PMS and stream your content (that is stored on the NAS) will be sent out, and/or transcoded by the Windows PC with PMS installed on it.

When a Plex client, either on your local network or someone on the other side of the earth, wants to stream from your PMS, the Windows PC/PMS will get the data from your NAS (the mapped network storage) and send it to that client. Weather it is a direct stream to a local Plex client or transcoded and sent to a remote client the data will always go NAS>PMS>Client.

In-So-Far-As direct access to files on your NAS. I am assuming you mean streaming locally on your home network. For that to work you would need to access the NAS storage directly with your client IE; you have a laptop and have mapped the NAS storage as a network drive just like mapping the NAS to your PMS. That is how I had things setup when I was using Windows Media Center, each Home Theater PC played files directly from my NAS and I used PMS to stream them to my phone on the train to and from work.

Hope this helps.

1 Like

No

Yes

No, not within the Plex ecosystem.

Thanks both.

I thought that might be the case. It would be the simple way to implement.
I just wondered whether, once the media selection was made at the client, it was checked by the system (PMS and end client) that the client had capability to a) handle original media format and b) be able to physically access the media file (including security) and if yes the client could automatically stream the file direct to save network bandwidth. Other than recording some of the positional and completion metadata for the client’s user back to the PMS there would be no more requirement to load the PMS and this would reduce network load.

The reason I asked is that I’ve got three or four clients now that use the PMS locally and once two or more are simultaneously showing video there are occasional glitches on some videos. Nothing is ever being transcoded for in house viewing and I’ve got a 100MB minimum network link wired to all points (1GB to NAS and 40% of network) so I’m trying to work out what might be causing this. Videos are fine streamed direct from NAS using PC, Android tablet and Android phone. Many other things to look at but first stop was the network loading. - I’d assumed that PMS would be trying to optimise network usage during playback but it appears not.

I’ve tried running PMS on commercial home NAS before but performance was frankly awful and updates weren’t regular. I’ve also got about 15TB spread across 2 NAS, one commercial, one XigmaNAS with disk space to grow the collection for the next 5 years so I’m not about to create a PMS with tons of disk space.

This is conjecture, but I think there are a bunch of reasons it doesn’t work that way.

For Plex to “refer” clients to another URL, it would need to know how to format the URL, the clients would need to support the protocol, and somehow have credentials to access it.

But clients don’t support all of the same fileserver protocols, and sharing credentials would be hard, and it would only be useful in a perfect LAN + Direct Play scenario.

And Plex already has to be in the media transfer pipeline for most use cases.

The “extra” network load is into the PMS, which typically shouldn’t be an issue. The traffic volume from the NAS and out to the clients stays the same.

Are you talking about extremely high-quality raw Blu-ray rips? This can be problematic, but otherwise, if your videos are Direct Streaming, smooth local playback should definitely be possible.

What does the Plex Server status/dashboard look like during playback?

I’d assumed that PMS would be trying to optimise network usage during playback but it appears not.

it does try to do that in certain situations, see link, but if you are DirectPlaying everything there is no attempt by plex (generally) to optimise network usage

https://support.plex.tv/articles/115007570148-automatically-adjust-quality-when-streaming/

Volts -
for the general case I can understand why the design decision might be taken not to even attempt what seems on the face to be a string and glue solution to get a connection. I was just asking 'cos it’s nice to know :slight_smile:

On the specific issue, it’s kind of weird because it’s one or two series that maybe got recorded and archived for personal posterity i.e. I know which files they are and while they don’t “glitch” in the same places necessarily during playback they can reasonably reliably produce one to three glitches per half hour show. I can use the same client devices through DLNA and I don’t see a problem (or direct on PC with e.g. VLC or MPC) so I think that rules out the NAS and end devices, but there’s still the PMS, network and software stacks and PLEX bits. To be clear the end devices are Samsung TVs and their apps. Two series of Samsung so the client appears to be different as well, but I’m not 100% sure.
The files are all .ts recorded on humax devices and never transcoded, simply trimmed with a lossless editor. They’re 1920x1080 HD but that should be absolutely fine as you say.

Plex server is flat as a pancake CPU wise when all this is going on. As I say, no transcoding and no effort. The only time it does anything is when indexing after I’ve dumped some new files on the server or when I occasionally discover a naming issue that requires me to force a rescan of a library or two to rework a TV series or when I copy something to a really old phone for offline viewing. 90% of the content is HD or SD and all my devices bar that phone have HD or larger screens so transcoding just doesn’t happen here.

  • I always know when it’s working - it’s an old dell XPS desktop and the fans fire up like a jet engine taking off:-)

I did wonder whether there was anything else going on on the PMS but I can’t see why it would or why it would interfere.

Both - I presume that what you refer to as Direct Streaming or DirectPlaying is what Plex calls passing the video stream straight through the PMS.

Are there any docs around that describe in more detail how PMS does what it does or are these kept locked away in developer land

Anyway, thanks again for the info.

Hahahah, indeed. :airplane:

Direct Playing means that the file is transmitted to the player 100% as-is. It’s a direct download, and the player is responsible for parsing the container, demuxing the streams, decoding the video and audio and subtitles, etc. Plex is a very simple web server in this case. In some ways this is ideal, but it only works if the client can 100% play the original file as-is.

Direct Streaming means the video and audio streams are extracted from the original file, repacked and remuxed into something the client is capable of parsing. The video stream itself isn’t decoded/re-encoded on the server, just repackaged. This also isn’t very much work for the server, and can greatly improve playback compatibility.

https://support.plex.tv/articles/200250387-streaming-media-direct-play-and-direct-stream/

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.