Force Plex to Download/Sync Videos Without Transcoding

One of the craziest oversights with the otherwise excellent Plex media server is the fact that you cannot download/sync some videos to Android or iOS without Plex automatically transcoding them – even if you choose to sync at “original” quality and even if your device could play them as-is.

Primarily this affects H.265/HEVC videos, but may affect some of your H.264 media as well.

The reason for the limitation is that Plex uses an overly conservative profile of Android and iOS devices that assumes your device can (or that you would only want to) playback H.264 at 1080p. You would think this wouldn’t be a problem if you select the “Original” quality when syncing in the app… but, Plex ignores that choice and transcodes anyway.

There are quite a few threads dedicated to the issue on the Plex support forums and elsewhere:
https://forums.plex.tv/t/allow-sync-without-transcoding/31916
https://forums.plex.tv/t/sync-support-for-hevc-x265-converting-to-x264-to-then-download-is-ridiculous/392317

Fortunately there is a workaround. It has been mentioned partially in the forum replies, but I just wanted to break it out here so it’s a little easier to follow.

What you need to do is to edit the device profile on the Plex server for the type of device you’re streaming to. Where you find the profile XML files will be different based on the platform your server is running on. For a Synology NAS, they’re here:

/volume1/@appstore/Plex Media Server/Resources/Profiles

In that directory, locate the profile XML file you want to change. All of my client devices are Android, so I’ll modify Android.xml.

Here’s the original file:

<?xml version="1.0" encoding="utf-8"?>
<Client name="Android">
  <!-- Author: Plex Inc. -->
  <TranscodeTargets>
    <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac" context="streaming" />
    <VideoProfile container="mp4" codec="h264" audioCodec="aac" context="static" />
    <MusicProfile container="mp3" codec="mp3" id="StereoMusicTranscodeProfile" />
    <PhotoProfile container="jpeg" />
  </TranscodeTargets>
  <DirectPlayProfiles>
    <VideoProfile container="mp4" codec="h264,mpeg4" audioCodec="aac" />
    <MusicProfile container="mp4" codec="aac" />
    <MusicProfile container="mp3" codec="mp3" />
    <MusicProfile container="flac" codec="flac" />
    <MusicProfile container="ogg" codec="vorbis" />
    <PhotoProfile container="jpeg,gif,bmp,png" />
  </DirectPlayProfiles>
  <ContainerProfiles>
    <VideoContainer name="mp4">
      <Limitations>
        <Match name="part.optimizedForStreaming" value="1" />
      </Limitations>
    </VideoContainer>
  </ContainerProfiles>
  <CodecProfiles>
    <VideoCodec name="*">
      <Limitations>
        <UpperBound name="video.width" value="1920" isRequired="true" />
        <UpperBound name="video.height" value="1080" isRequired="true" />
        <NotMatch name="video.anamorphic" value="1" />
      </Limitations>
    </VideoCodec>
    <VideoCodec name="h264">
      <Limitations>
        <Match name="video.profile" list="baseline|main|high" />
      </Limitations>
    </VideoCodec>
    <VideoAudioCodec name="aac">
      <Limitations>
        <UpperBound name="audio.channels" value="2" />
      </Limitations>
    </VideoAudioCodec>
  </CodecProfiles>
</Client>

And here’s what I’ve changed it to:

<?xml version="1.0" encoding="utf-8"?>
<Client name="Android">
  <!-- Author: Plex Inc. -->
  <TranscodeTargets>
    <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac" context="streaming" />
    <VideoProfile container="mp4" codec="h264" audioCodec="aac" context="static" />
    <MusicProfile container="mp3" codec="mp3" id="StereoMusicTranscodeProfile" />
    <PhotoProfile container="jpeg" />
  </TranscodeTargets>
  <DirectPlayProfiles>
    <VideoProfile container="mp4" codec="*" audioCodec="*" />
    <VideoProfile container="mkv" codec="*" audioCodec="*" />
    <MusicProfile container="mp4" codec="aac" />
    <MusicProfile container="mp3" codec="mp3" />
    <MusicProfile container="flac" codec="flac" />
    <MusicProfile container="ogg" codec="vorbis" />
    <PhotoProfile container="jpeg,gif,bmp,png" />
  </DirectPlayProfiles>
  <ContainerProfiles>
  </ContainerProfiles>
  <CodecProfiles>
  </CodecProfiles>
</Client>

Once you’ve updated the file, restart the Plex server. Now your H.265 videos will download to your Android device in their original format without any transcoding as long as you choose “Original” quality. Note: you can still choose a lower bitrate/resolution if you actually do want to download a transcoded version.

Here’s the 2 changes made to the XML:

  1. Add a direct play (aka no transcoding) profile for mkv, and make both it and the mp4 profile apply to all codes.
  2. Remove the codec limitations for resolution, non-anamorphic videos, H.264 profile and number of AAC audio channels.

By removing codec limitations we’re no longer telling Plex it needs to transcode our mp4 and mkv videos – no matter what codec, resolution, encoding profile, etc.

The caveat is that this configuration profile applies to both offline sync as well as streaming from the UPnP server. So if you’re using older or less powerful devices, you may run into some playback compatibility issues. Personally, I’d rather address those as they come up and just remove as many restrictions as possible to begin with.

Hope this helps improve your download and sync experience with Plex!

Leave a Reply

Your email address will not be published. Required fields are marked *