Shield TV Player XML Profile

I was very annoyed to find after like a year of using Plex + Nvidia SHield TV that a lot of my higher quality movies were being transcoded on the fly. I found through debugging logs this is because the SHield is being matched against the generic Android.xml. I adapted it and using options from other places to add in direct play support for pretty much everything. let me know your thoughts. File goes into /var/lib/plexmediaserver/Library/Application Support/Plex Media Server on my Fedora 25 server. Name it Shield.xml. I’m not 100% certain all of these formats are supported but so far it works pretty well and I’ve noticed a HUGE difference in the quality of the picture. Especially with items like HEVC 10bit color.

<?xml version="1.0" encoding="utf-8"?>
<Client name="SHIELD Android TV">
  <Identification>
    <Header name="User-Agent" substring="SHIELD Android TV" />
  </Identification>
  <!-- Author: Plex Inc. -->
  <TranscodeTargets>
    <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" />
    <VideoProfile container="mp4" codec="h264,mpeg4" audioCodec="aac,ac3,eac3,mp3,pcm" subtitleCodec="srt,ssa,ass"/>
    <VideoProfile container="asf" codec="wmv3,wmv3,vc1" audioCodec="wmav2,wmav2,wmapro,wmavoice,pcm" subtitleCodec="srt,ssa,ass"/>
    <VideoProfile container="avi" codec="h264,msmpeg4v3,mpeg4,mjpeg" audioCodec="mp3,ac3,eac3,dca,pcm" subtitleCodec="srt,ssa,ass"/>
    <VideoProfile container="mkv" codec="h264,mpeg4,mjpeg,mpeg2video,vc1,hevc" audioCodec="mp2,mp3,ac3,eac3,dca,aac,pcm,vorbis" subtitleCodec="srt,smi,ssa,ass,subrip"/>
    <VideoProfile container="mpeg" codec="h264,mpeg1video,mpeg2video" audioCodec="mp2,mp3,ac3,eac3,aac,pcm" subtitleCodec="srt,ssa,ass"/>
    <VideoProfile container="flv" codec="h264" audioCodec="aac,ac3,eac3,mp3,pcm" subtitleCodec="srt,ssa,ass"/>
    <VideoProfile container="mpegts" codec="h264,mpeg2video,vc1" audioCodec="mp2,mp3,ac3,eac3,dca,pcm" subtitleCodec="srt,ssa,ass"/>
    <VideoProfile container="wtv" codec="mpeg2video" audioCodec="ac3,eac3,aac,pcm"/>
    <VideoProfile container="3gpp" codec="h264,mpeg4" audioCodec="aac,he-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>

Thanks.
It seems to work well also for my Android devices: a Mi Box 3 with Android TV, a Samsung Tablet with Android 7 and a OnePlus One with Android 6. No more transcoding for my HEVC.
I’ve edited the generic Android.xml profile.

I’ve been trying to figure out how to get apple lossless to play without transcoding. IT plays fine thru Kodi and the Plex plugin on my shield but not thru the Plex app.

The MusicProfile config

<MusicProfile container="mp3" codec="mp3" id="StereoMusicTranscodeProfile" />

would be better as

<MusicProfile container="flac" codec="flac" id="StereoMusicTranscodeProfile" />

to stop lossy music transcoding.

@MartinCairns said:
The MusicProfile config

<MusicProfile container="mp3" codec="mp3" id="StereoMusicTranscodeProfile" />

would be better as

<MusicProfile container="flac" codec="flac" id="StereoMusicTranscodeProfile" />

to stop lossy music transcoding.

Forcing things via config changes is never advised. There’s most likely a reason it’s not currently enabled…

@danjames92 said:
Forcing things via config changes is never advised. There’s most likely a reason it’s not currently enabled…

Generic android doesn’t support flac but the NVIDIA Shield android does support flac, my music is transcoded regardless as it’s ALAC which isn’t supported. So the only option is to transcode it to something.

is this needed if using plex media player?

@omanko_kimochi said:
is this needed if using plex media player?

No, this is a profile for when using the Plex client for playback on the Nvidia Shield

I’ve installed this and think it’s been a good improvement. Almost all my stuff is now direct playing.

I noticed the exact same thing happening about a week ago. I noticed that playback on Kodi was much better when passthrough was enabled. I don’t, however, find Kodi to be as user friendly.

I tried this workaround and immediately saw an improvement. Thanks for sharing. It would be wise for the Plex development team to include this small file with their releases to make an easy, yet very noticeable, improvement to the end user experience.

I just picked one up in able to play 4k with hdr. I was under the impression it could direct play just about anything I throw at it. Do I need to mess with these files?

@Rick Williams
I’m wondering the same, only thing with my situation is that XML file is inaccessible on my Shield because of non-root and my NAS (WD PR4100) doesn’t allow access either.

@aZOMBIEonCRACK said:
@Rick Williams
I’m wondering the same, only thing with my situation is that XML file is inaccessible on my Shield because of non-root and my NAS (WD PR4100) doesn’t allow access either.

Is your NAS Linux based maybe you can ssh in and edit the file with vim, pico or nano?

@davidbdyer said:

@aZOMBIEonCRACK said:
@Rick Williams
I’m wondering the same, only thing with my situation is that XML file is inaccessible on my Shield because of non-root and my NAS (WD PR4100) doesn’t allow access either.

Is your NAS Linux based maybe you can ssh in and edit the file with vim, pico or nano?

It’s a WD PR4100, Ubuntu? I tired SSH but could only see my drives and no other directories.

The location is supposed to be “/mnt/HD/HD_a2/plex_conf/Plex Media Server/” or maybe “/shares/Storage/.wdcache/.plexmediaserver/Application Support/Plex Media Server/”.
This is where i found the info https://support.plex.tv/hc/en-us/articles/202915258-Where-is-the-Plex-Media-Server-data-directory-located-

This profile in the original post doens’t work for me. I installed it, and when trying to playback an MKV that I could playback before the profile was installed, I get this error:

Playback was not possible. Cannot convert this item. No conversion profile found for protocol http.

I must be misunderstanding something, because I can’t seem to get this profile to do anything. Can someone please verify that you just drop exactly the posted file into /var/lib/plexmediaserver/Library/Application Support/Plex Media Server on the server? I’ve tried that and a bunch of other variations, but my server logs still indicate “Profile is Android”. Is there some other kind of restarting, cache-clearing, etc. that needs to be done? Something I’m missing?

where do I place this on a windows based Plex server?
thanks

For those who have indicated that this is no longer working for them, I have noticed that my Shield seems to now be advertising as an Android client. Therefore it seems to be using the Android.xml file. I copied the Shield.xml to Android.xml (after making a backup first) and things seem to be working OK now.

I’m noticing too that it isn’t working on Windows any longer.

If you are replacing Android.xml, make sure to only change the part below <!-- Author: Plex Inc. -->

What user agent is the Shield using now?