What is Direct Play?

Understanding how to get media files to direct play with Plex from your server will reduce the burden on your server, but also allow the server to do more with its resources. Having media direct play, instead of transcoding, is a goal for those that manage a Plex server.

Plex has been designed to allow client devices to connect to a central Plex server and stream media from that server. Streaming media to many different clients can be complex, and Plex tries to remove much of that complexity from both the server owner, and the users streaming the media.

In order to remove this complexity, Plex Media Server provides three possible outcomes for streaming: direct play, direct stream and transcoding. This article will look at the first outcome: direct play.

What is Direct Play in Plex?

What is direct play?

As mentioned above, direct play is one of the methods Plex uses to stream media to a streaming client. Out of the three methods, direct play uses the least amount of resources on the server.

The reason for the low server resource usage is because when a file is direct played, it is sent to the device without being changed. No processing is done on the server.

So how can the Plex server direct play a file to the device? The source media file needs to 100% compatible with the streaming device. This means that the source media needs to meet the following criteria:

  • Stored in a compatible file container.
  • Encoded with a compatible codec.
  • Encoded with a compatible bitrate.
  • Contains a compatible resolution.

Let's have a look at each of the above criteria so you have a better understanding on how it affects our server's ability to direct play a file to a device.

Compatible file container

A file container is where the video and audio streams are stored. A container can contain different video and audio streams, with the more common being multiple audio streams.

The most common container format is mp4. Most, if not all devices, support the mp4 container, and even Web browsers can play video and audio that are stored in the mp4 container.

Another file container supported by most devices also support another container called Matroska Video that uses the mkv extension. Unlike mp4, however, mkv files are not natively supported by Web browsers.

If you want to be sure of direct playing your files, then start with the mp4 container.

Compatible codec

A codec is used to compress the video or audio streams in media file. When a client plays the file, it must be compatible with the codec to uncompress and play the video or audio streams.

Compatible bitrate

The bitrate is the number of bits per second that would need to be transmitted to, and processed by the device, in order to play the media file. Bitrates for video and audio are usually expressed in kilobits (Kbps) or megabits (Mbps) per second.

When streaming media to a device, that device can process a certain number of bits per second. If Plex streams a media file that has a higher bitrate than the device can process, then there will be buffering because the device can't keep up with the data being sent it.

This is why the source media will need to have a bitrate that is equal to or less than the support bitrate of the device.

Compatible resolution

Most new devices sold today support 4K resolution. This means they can play media files that are 4K or less in resolution.

Older devices may only support 1080p or lower. Trying to stream a 4K movie to an older device would require Plex to transcode the media to 1080p before sending the media to the device.

In addition, Plex apps also allow a user to set the quality of the media that can be streamed to the device. If that setting is lower than what the device can support, than Plex will transcode the media to that setting, regardless of what the device can actually support.

A client that satisfies the above criteria, should be able to direct play the media file from the server. If any of the above criteria is not satisfied, then Plex will either transcode or direct stream the file.

In situations where a media file cannot be direct played from the server, there are a few options available that can make sure a client can direct play the file.

How to direct play a file from Plex?

How to direct play a file from Plex?

For media files that don't direct play to a client, there are a few options you can look at to provide the direct play functionality and avoid transcoding or direct streaming.

1. Change quality settings in the client

All clients have both a local network and remote streaming quality setting. Changing these options effects whether the Plex server can send the source file as-is to the client, or whether transcoding is needed.

By default, the remote streaming quality is set to 2 Mbps, 720p, which is much lower quality than the average high definition movie.

If you are remote streaming - meaning you are streaming from the Plex server from another network - then confirm with the server owner whether you can increase the remote streaming quality in your client.

By setting the quality streaming settings to a better quality setting, the client will have a better chance of direct playing the media file. Of course, the client must also be compatible with the criteria discussed above.

2. Optimize the source media file

The best way to ensure a file is direct played is to provide a version of the file that is compatible with the client. Plex allows multiple versions of a file to be available in Plex, allowing Plex to select the best version to send to the client.

The easiest way to create one or more versions of a movie is to create an optimized version in Plex. This functionality is built into the Plex server, and contains standard presets for various types of clients. The standard presets create media files that can be supported by many different clients, ensuring the file can be direct played by most clients.

There are as few caveats that you will need to be aware of, when using the optimize functionality in Plex:

  1. Since there will be multiple versions of the same movie, it will require more hard drive space.
  2. When creating the optimize version, the original source file will be transcoded to create the new version. The transcoding process could use 100% of the CPU, so running the process when the server is not in use would be best.
  3. When optimizing at different resolutions, Plex may select a lower resolution version to stream to a client if it is the best option based on the client's quality setting.

The following chart shows a client's streaming quality settings, and which version of a video was selected by the Plex server to stream to the client:

Client Quality Versus Streamed Quality
Client QualityStreamed Quality
Maximum25 Mbps, 4K (Original)
20 Mbps, 1080p9 Mbps, 1080p
8 Mbps, 1080p4 Mbps, 720p
3 Mbps, 720p2.1 Mbps, 720p
2 Mbps, 720p1.5, 480p

All of the streamed versions were direct played on the client. As you can see, Plex selects the highest quality that meets the client's streaming quality. In some instances, the resolution of the video was lower than the selected client quality.

3. Disable transcoding

Plex provides an option on the server to disable transcoding. This option, however, won't force Plex to direct play a file on a client as the audio may still be transcoded, and Plex can still remux the video.

I listed this option here, however, I don't recommend you enable it on your Plex server.

Using direct play with Plex is the ideal condition when streaming media files from the server to a client. Direct play uses very little resources as Plex just sends the media file to the client with no processing.

A client and media file must meet certain criteria before a file can be direct played. If the client and media file are not compatible, there are several options you can use to try and direct play the file on the client.

Subscribe
Display