How to Avoid Transcoding

Learning how to avoid transcoding movie files from your Plex server is a common question, as it can cause issues if multiple movies are being transcoded at the same time. There are three methods that Plex Media Server will use to stream content to a device: direct play, direct stream, and transcoding, and out of the three methods, transcoding is used if Plex can't find a compatible movie file to stream to a device.

If you have a server that isn't capable of transcoding then your clients may be presented with a "This Server is not Powerful Enough to Convert Video" message on their screen.

Direct play is the preferred method, as it uses the least amount of resources on the server. The next best option is Direct stream because it uses little system resources but more than direct play. Transcoding, however, can use up to 100% of the CPU, depending on what is being transcoded. The goal of managing a Plex server is to transcode as little as possible.

How to Avoid Transcoding

While you can try to have your Plex Media Server and clients direct play as much content as possible, there may be times when that isn't possible, and transcoding happens.

The reason that transcoding happens is that many devices that can stream content from Plex, the devices may not be able to play the movie because it doesn't support the video/audio codec. This causes Plex to convert the video/audio codec to something the streaming device can play. This is known as transcoding.

There are mobile devices or older media-playing devices, that may require content to be streamed at 720p or less, and can't direct play movies that have video content that is 1080p and higher.

So with such a varied array of devices, how can you go about managing your movie files so they require less transcoding? The best way is to provide movie files that are compatible with a wide variety of devices.

Recommended movie file specifications

While different devices can play different types of movie files, there is a good specification that can be used for high-quality movies, that can play on a good number of media streaming devices.

Simply ripping your Blu-rays directly to your Plex Media server produces a large file with a high bitrate.

Such a large file with a high bitrate will mean some of your streaming clients may need to transcode the movie.

The specification is as follows:

  • Container: mp4
  • Resolution: 1920x1080 or lower
  • Video codec: H.264 (level 4.0 or lower)
  • Framerate: 30 fps (bit depth: 8)
  • Audio Codec: AAC (2 channels)
  • Bitrate: 20 Mbps or lower

While the above specifications are good for a majority of media streaming devices, they may not be compatible with some devices - such as older, low-end, or mobile devices. This would cause Plex to transcode the movie file, using up resources on the Plex server.

In addition, the Plex server contains client profiles containing the direct play and transcode targets for many different Plex clients. These profiles provide specifications for which media formats can be direct played, and what formats and codecs will be used to transcode the media.

A simple solution to avoid transcoding, and have more of your media direct played, is to take a page from Netflix: provide multiple versions of your movie files. If any of your movies have similar specifications as the recommended specifications, then you have a good starting point for the next section.

Optimizing movie files

The easiest way to create multiple versions of your movie files is to have Plex create the files for you. Keep in mind that this will cause high CPU usage, so you should think about doing this when your Plex server is not being used to stream media.

To have Plex create another, optimized, version of a movie file, do the following:

  1. Open Plex from your Web browser, and ensure the user you select has access to administer the Plex instance.
  2. Select the library on the left that contains the movies that you wish to optimize. If all your movies aren't displayed, click the Library link at the top.
  3. Hover your mouse over the movie you wish to optimize, then click the three dots in the bottom left corner of the movie poster.
  4. Click the Optimise... option from the menu that appears. The Optimise dialog (shown below) is displayed on the screen.
    Plex Optimise Dialog
    Plex Optimize dialog
  5. Select one of the options in the dropdown list if you wish to use one of the templated profiles. They are good for quick optimizations that should work for the selected device. The list includes:
    • Optimized for Mobile (4 Mbps 720p): This profile will limit the video to 720p and will transcode audio to AAC 2.0 if needed.
    • Optimized for TV (8 Mbps 1080p): The video will be limited to 1080p, and the audio will be transcoded to AAC 2.0 or AC3.
    • Original Quality: This produces an MP4 file, with the video or audio being transcoded if either is found to be incompatible with the MP4 container.
    • Custom: This setting provides a bit more control over the file, such as device type, and bitrate. There are many options, which I won't list here, but you can use the list to determine the optimized version of the file you wish to have. The screenshot below shows the additional dropdown list that is displayed when you select the Custom option.
      Plex Optimise Dialog - Custom Setting
      Plex Optimize dialog with custom setting selected
  6. Once you are satisfied with the quality options of the optimized file, you can then specify the location of the new file. I usually keep the new file in the same folder as the original, to avoid having too many files and folders everywhere on my hard drive.
  7. Once everything looks good, click the Optimise button at the bottom of the dialog, and Plex will begin to create the new file. Depending on the optimization settings, it could take some time to create and new file.

After performing the above steps, Plex should then display a number in the upper-right corner of the movie poster that indicates the number of versions of the movie that exists. When someone selects a movie to stream, Plex will use heuristics to determine which version of the movie to stream to the device. If one of the versions matches what the device supports, then it should direct play on the device instead of transcoding the file.

Subscribe
Display