PMS aka. Problematic Media Server

Don’t get me wrong. I like the design and how meta data is automatically grabbed and shown for each of my media items. I use Plex every day. But since some weeks more problems occurred and now these are finally too much. I can not watch a movie. A movie that should play perfectly fine but PMS thinks it has to use its intelligence to ■■■■ around with that file.

I wanted to play the movie (XML at the end) on my Android TV but it didn’t work. I started playback and all I get is a black screen with an orange loading circle. Then I get an error message saying Playback has stopped because the connection to the Plex Media Server has been lost. Please ensure the server is available and retry. I then went on Plex Web (Chrome) and tried to play that file there. I got the error message Not enough disk space to convert this item.. I checked my server and I have 3.5 TB free. I checked the Plex Media Server log file and saw that PMS still uses /tmp for transcoding. That’s funny because I set Settings > Server > Transcoder > Transcoder temporary directory to /var/temp. I did so because / is on a tiny and slow Disk-On-Module flash drive which shouldn’t be used for temporary files at all (you know that flash drives degenerate after a given number of writes?). /var instead is on a four disk RAID 0. To fix the problem I symlinked /tmp to /var/temp. I now can play the movie in Plex Web so it should work on Android TV too. But it doesn’t.

I tried various other movies and also media I was able to play back in the past because maybe my change broke something. Everything works as before. I can play media with 2-channel AC3 audio just fine on my Android TV (Direct Play). I cannot play back any media with 6-channel AC3 audio on my Android TV because PMS wants to transcode the audio everytime but somehow fails to deliver the content to Plex on Android TV.

Well, lets use my FireTV 4K. That should work. Well, even this doesn’t work because since weeks we have audio skipping on these devices.

Conclusion:

  1. PMS ignores setting in Settings > Server > Transcoder > Transcoder temporary directory
  2. Plex on AndroidTV is unable to play back anything that gets transcoded (either audio or video or both).
  3. PMS thinks it has to transcode 6-channel AC3 (while 2-channel AC3 is fine).
  4. Plex on FireTV 4K is unusable because of audio skipping bug.

Well, I could grab my notebook, play the movie there and then ChromeCast to my AndroidTV. This will work but I don’t get 6-channel audio then, do I? No! And regardless of the audio it would be much easier and cost efficient to simply play the file on my notebook (Windows Media Player) and connect my notebook with HDMI to my TV. No Server or client then has to transcode anything.

Sorry if I may sound a bit angry but actually I am angry. I just wanted to watch a movie and experienced more and more problems and instead of using Plex for what it is made for I have to write this. However I’m more angry about the fact that I have to wait weeks to get the problems fixed and until then I cannot watch any 6-channel AC3 media item. Hell, even my smartphone supports 6-channel AC3 …

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="Filme" librarySectionUUID="7d3e4b45-f075-4193-8ee7-00cf08c71282" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1475532206"> <script/> <Video ratingKey="48629" key="/library/metadata/48629" guid="com.plexapp.agents.imdb://tt0090605?lang=de" librarySectionID="1" studio="Twentieth Century Fox Film Corporation" type="movie" title="Aliens - Die Rückkehr" titleSort="Alien 2" originalTitle="Aliens" contentRating="de/16" summary="Nach der ersten Begegnung Ripleys mit dem Alien sind 57 Jahre vergangen. Ziellos treibt sie sich immernoch im Kälteschlaf befindlich durchs All. Zufällig wird sie entdeckt und wieder zurück zur Erde gebracht. Ihren Berichten über die Ereignisse mit dem Alien wird zunächst wenig Glauben geschenkt, doch als der Kontakt zu dem mittlweile bevölkerten, aus dem ersten Teil bekannten Planeten abbricht, wird Ripley gebeten zusammen mit einem Trupp Space-Marines nach dem Rechten zu sehen. Sie kommen zu spät - die komplette Kolonie wurde von den Aliens überrannt und das Einsatzteam muss es mit der Übermacht aufnehmen..." rating="7.6" year="1986" tagline="Es gibt Orte im Universum, wo man nicht allein hingeht." thumb="/library/metadata/48629/thumb/1470446432" art="/library/metadata/48629/art/1470446432" duration="9266976" originallyAvailableAt="1986-11-12" addedAt="1435226440" updatedAt="1470446432" chapterSource="agent" primaryExtraKey="/library/metadata/278730"> <Media videoResolution="1080" id="126781" duration="9266976" bitrate="16270" width="1920" height="1040" aspectRatio="1.85" audioChannels="6" audioCodec="ac3" videoCodec="h264" container="mkv" videoFrameRate="24p" videoProfile="high"> <Part accessible="1" exists="1" id="132102" key="/library/parts/132102/1455455249/file.mkv" duration="9266976" file="/media/nas/Public/Videos/Filme/Alien 2 (1986).mkv" size="18846748614" container="mkv" deepAnalysisVersion="1" indexes="sd" requiredBandwidths="37172,31455,25584,22325,21059,20636,19015,17679" videoProfile="high"> <Stream id="267185" streamType="1" default="1" codec="h264" index="0" bitrate="14218" language="English" languageCode="eng" bitDepth="8" cabac="1" chromaSubsampling="4:2:0" codecID="V_MPEG4/ISO/AVC" duration="9266975" frameRate="23.976" frameRateMode="cfr" hasScalingMatrix="0" height="1040" level="40" pixelFormat="yuv420p" profile="high" refFrames="4" scanType="progressive" width="1920"/> <Stream id="267186" streamType="2" selected="1" default="1" codec="ac3" index="1" channels="6" bitrate="640" language="Deutsch" languageCode="ger" audioChannelLayout="5.1(side)" bitDepth="16" bitrateMode="cbr" codecID="A_AC3" dialogNorm="-31" duration="9266976" samplingRate="48000" title="Dolby Digital"/> <Stream id="267187" streamType="2" codec="ac3" index="2" channels="6" bitrate="640" language="English" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="16" bitrateMode="cbr" codecID="A_AC3" dialogNorm="-31" duration="9266976" samplingRate="48000" title="Dolby Digital"/> <Stream id="267188" streamType="2" codec="ac3" index="3" channels="6" bitrate="448" language="Español" languageCode="spa" audioChannelLayout="5.1(side)" bitDepth="16" bitrateMode="cbr" codecID="A_AC3" dialogNorm="-31" duration="9266976" samplingRate="48000" title="Dolby Digital"/> <Stream id="267189" streamType="3" forced="1" codec="pgs" index="4" language="Deutsch" languageCode="ger" codecID="S_HDMV/PGS" format="pgs" title="Forced"/> <Stream id="267190" streamType="3" codec="pgs" index="5" language="Deutsch" languageCode="ger" codecID="S_HDMV/PGS" format="pgs" title="Closed"/> <Stream id="267191" streamType="3" codec="pgs" index="6" language="English" languageCode="eng" codecID="S_HDMV/PGS" format="pgs" title="Closed"/> <Stream id="267192" streamType="3" forced="1" codec="pgs" index="7" language="Español" languageCode="spa" codecID="S_HDMV/PGS" format="pgs" title="Forced"/> <Stream id="267193" streamType="3" codec="pgs" index="8" language="Español" languageCode="spa" codecID="S_HDMV/PGS" format="pgs" title="Closed"/> <Stream id="1079004" key="/library/streams/1079004" streamType="3" codec="srt" language="English" languageCode="eng" format=""/> <Stream id="1079005" key="/library/streams/1079005" streamType="3" codec="srt" language="Español" languageCode="spa" format=""/> <Stream id="1079003" key="/library/streams/1079003" streamType="3" codec="srt" language="Deutsch" languageCode="ger" format=""/> </Part> </Media> <Genre id="198" tag="Horror"/> <Genre id="16" tag="Action"/> <Genre id="20" tag="Thriller"/> <Genre id="197" tag="Science Fiction"/> <Director id="481" tag="James Cameron"/> <Writer id="482" tag="James Cameron"/> <Producer id="495" tag="Gale Anne Hurd"/> <Country id="151" tag="United Kingdom"/> <Country id="28" tag="USA"/> <Role id="185" tag="Sigourney Weaver" role="Lieutenant Ellen Ripley" thumb="http://image.tmdb.org/t/p/original/bcDb0vbfWZBHo1QEh9oQVRs3vx2.jpg"/> <Role id="483" tag="Carrie Henn" role="Rebecca "Newt" Jorden" thumb="http://image.tmdb.org/t/p/original/6MrxgxZoiUDA8k0GUwLuBcXN03B.jpg"/> <Role id="484" tag="Michael Biehn" role="Corporal Dwayne Hicks" thumb="http://image.tmdb.org/t/p/original/sTk3ltlHRvRg5quheWBxaLdLgC8.jpg"/> <Role id="336" tag="Lance Henriksen" role="L. Bishop" thumb="http://image.tmdb.org/t/p/original/wf4Pr9RxsHGd0O9fLPiB3Al8IVC.jpg"/> <Role id="485" tag="Paul Reiser" role="Carter J. Burke" thumb="http://image.tmdb.org/t/p/original/fr53dQQrDGfETgbliCktwKqteRU.jpg"/> <Role id="9" tag="Bill Paxton" role="Private W. Hudson" thumb="http://image.tmdb.org/t/p/original/53Ln1wTC0OCLzBF4HNlwhMXYgOU.jpg"/> <Role id="486" tag="William Hope" role="Lieutenant S. Gorman" thumb="http://image.tmdb.org/t/p/original/46N4dSYShHnRTcbqD7Fzfjnmvvq.jpg"/> <Role id="487" tag="Jenette Goldstein" role="Private J. Vasquez" thumb="http://image.tmdb.org/t/p/original/wCcO7cqHJVtnfRlvAJvo7jKd6Bq.jpg"/> <Role id="488" tag="Al Matthews" role="Sergeant A. Apone"/> <Role id="489" tag="Mark Rolston" role="Private M. Drake" thumb="http://image.tmdb.org/t/p/original/bsh3cqDNwVvux4NdaY1Bj4S7mNS.jpg"/> <Role id="490" tag="Colette Hiller" role="Corporal C. Ferro"/> <Role id="491" tag="Daniel Kash" role="Private D. Spunkmeyer" thumb="http://image.tmdb.org/t/p/original/b6lvtpkTRHHcv4YMW3FnGRtyXJ4.jpg"/> <Role id="492" tag="Cynthia Dale Scott" role="Corporal C. Dietrich" thumb="http://image.tmdb.org/t/p/original/cBrZS9bmSrRclBVHG6QeSuUj1Q9.jpg"/> <Role id="493" tag="Ricco Ross" role="Private R. Frost" thumb="http://image.tmdb.org/t/p/original/ep1gfuShCdZghxBGBtNWhWTxWpp.jpg"/> <Role id="494" tag="Tip Tipping" role="Private T. Crowe"/> <Field name="titleSort" locked="1"/> <Field name="thumb" locked="1"/> <Extras size="1"> <Video ratingKey="278730" key="/library/metadata/278730" guid="iva://api.internetvideoarchive.com/2.0/DataService/VideoAssets(47)?lang=en&bitrates=80,212,450,600,750,1500,8000&duration=120&adaptive=1&dts=0" type="clip" title="Aliens" summary="" index="1" year="1999" thumb="/library/metadata/278730/thumb/1470446432" duration="120000" originallyAvailableAt="1999-09-27" addedAt="1470446432" extraType="1"> <Media videoResolution="720" id="574208" duration="120000" bitrate="1500" width="1280" height="720" aspectRatio="1.78" audioCodec="aac" videoCodec="h264" container="mp4" premium="1"> <Part id="588845" duration="120000" container="mp4" key="/services/iva/assets/47/video.mp4?bitrate=1500" optimizedForStreaming="1"> <Stream id="1140941" streamType="1" codec="h264" index="0" bitrate="1500" height="720" width="1280"/> <Stream id="1140942" streamType="2" selected="1" codec="aac" index="1" channels="2" language="English" languageCode="eng"/> </Part> </Media> <Media videoResolution="480" id="574209" duration="120000" bitrate="750" width="640" height="480" aspectRatio="1.33" audioCodec="aac" videoCodec="h264" container="mp4" premium="1"> <Part id="588846" duration="120000" container="mp4" key="/services/iva/assets/47/video.mp4?bitrate=750" optimizedForStreaming="1"> <Stream id="1140943" streamType="1" codec="h264" index="0" bitrate="750" height="480" width="640"/> <Stream id="1140944" streamType="2" selected="1" codec="aac" index="1" channels="2" language="English" languageCode="eng"/> </Part> </Media> <Media videoResolution="480" id="574210" duration="120000" bitrate="450" width="640" height="480" aspectRatio="1.33" audioCodec="aac" videoCodec="h264" container="mp4" premium="1"> <Part id="588847" duration="120000" container="mp4" key="/services/iva/assets/47/video.mp4?bitrate=450" optimizedForStreaming="1"> <Stream id="1140945" streamType="1" codec="h264" index="0" bitrate="450" height="480" width="640"/> <Stream id="1140946" streamType="2" selected="1" codec="aac" index="1" channels="2" language="English" languageCode="eng"/> </Part> </Media> </Video> </Extras> </Video> </MediaContainer>

Log files from the server and client would likely be more beneficial than the XML for the media file - those logs will specify the reasoning for any issues or streaming decisions PMS makes. Also, what sort of hardware are you running PMS on? That can sometimes make a difference

EDIT: saw your sig for hardware

Attached is the Server log with Debugging enabled.

  1. PMS is using /tmp because it thinks it can’t write to /var/temp. In fact everybody has full access to /var/temp. FIXED
  2. PMS thinks it has to transcode audio because DEBUG - MDE: Aliens - Die Rückkehr (1986): Direct Play is disabled and DEBUG - Aliens - Die Rückkehr - audio.bitrate limitation applies: 640 > 448
  3. Playback is not possible because PMS creates m4s files and the client tries to open 00000.ts

After some more testing I noticed that playback of transcoded content is in general possible.

  1. If media item contains a 2-channel audio (or 6-channel audio with equal or less than 448 kbps) playback is in direct play and even transcoded playback is possible.
  2. If media item contains a 2-channel audio (or 6-channel audio with equal or less than 448 kbps) and you manually select a 6-channel audio with more than 448 kbps then still the 2-channel audio (or 6-channel audio with equal or less than 448 kbps) is used.
  3. If media item contains only 6-channel audio with more than 448 kbps playback is not possible at all, neither as Direct Play nor as Transcoded
  4. Setting “Direct Play” to Force does not help at all.

Something has a huge problem with 6-channel audio with more than 448 kbps. It looks like it’s Plex on Android TV.