Pay attention
Ignore this whole starting text below this line, the root issue is, that Plex for Android beginning of version 5.11.x up to current (on time writing this, it is 6.6.x) always forces a direct play, even if in the settings direct play got disabled. The only issue is, that Plex for Android should send to Plex Media Server, that direct play is disabled - nothing else!
See my last comment for further informations.
And now, if someone is interested, the…
old post
I’m using the following Android.xml
Profile in plex media server v1.7.2.3878, which leads to transcode of every AC3 Audio instead of direct playing (as Plex for Android on my Philips 55pus7101/12 is unable to play videos with these type of audio - it leads to a black screen / screen freeze after some seconds of play time as reported here and in many other threads).
<?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>
<VideoAudioCodec name="ac3">
<Limitations>
<UpperBound name="audio.bitrate" value="1" />
</Limitations>
</VideoAudioCodec>
</CodecProfiles>
</Client>
(Only the line starting from <VideoAudioCodec name="ac3">
differs from the original Android.xml
).
I’ve disabled Direct Play
in the settings of Plex for Android, but since the update to 5.11.0.xxx plays an video with AC3 directly instead of transcoding the audio track.
Here’s a small snippet of the plex media server log, on playing an video with ac3 sound.
Jun 09, 2017 18:41:04.083 [0x7ffb46ffe700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Jun 09, 2017 18:41:04.083 [0x7ffb46ffe700] DEBUG - Auth: authenticated user 1 as drmonty
Jun 09, 2017 18:41:04.083 [0x7ffb46ffe700] DEBUG - Auth: Came in with a super-token, authorization succeeded.
Jun 09, 2017 18:41:04.084 [0x7ffb36e21700] DEBUG - Request: [192.168.0.197:49419 (Subnet)] GET /:/timeline?bandwidth=2480&bufferedTime=98&containerKey=%2FplayQueues%2F1329&duration=2586976&guid=com.plexapp.agents.thetvdb%3A%2F%2F248837%2F1%2F1%3Flang%3Dde&key=%2Flibrary%2Fmetadata%2F9564&machineIdentifier=053ab531dd6776f35bb108776910bd8e743a0587&playQueueItemID=13621&ratingKey=9564&state=playing&time=5977 (6 live) TLS GZIP Signed-in Token (drmonty)
Jun 09, 2017 18:41:04.086 [0x7ffb36e21700] DEBUG - Client [c8b492eb121c1faf-com-plexapp-android] reporting timeline state playing, progress of 5977/2586976ms for guid=com.plexapp.agents.thetvdb://248837/1/1?lang=de, ratingKey=9564 url=, key=/library/metadata/9564, containerKey=/playQueues/1329, metadataId=9564
Jun 09, 2017 18:41:04.086 [0x7ffb36e21700] DEBUG - [Now] User is drmonty (ID: 1)
Jun 09, 2017 18:41:04.087 [0x7ffb36e21700] DEBUG - [Now] Device is Android (4K Ultra Slim LED TV powered by Android).
Jun 09, 2017 18:41:04.088 [0x7ffb36e21700] DEBUG - [Now] Profile is Android
Jun 09, 2017 18:41:04.088 [0x7ffb36e21700] DEBUG - [Now] Updated play state for /library/metadata/9564.
Jun 09, 2017 18:41:04.089 [0x7ffb36e21700] DEBUG - Statistics: (c8b492eb121c1faf-com-plexapp-android) Reporting active playback in state 0 of type 4 (scrobble: 0) for account 1
Jun 09, 2017 18:41:04.096 [0x7ffb477ff700] DEBUG - Completed: [192.168.0.197:49419] 200 GET /:/timeline?bandwidth=2480&bufferedTime=98&containerKey=%2FplayQueues%2F1329&duration=2586976&guid=com.plexapp.agents.thetvdb%3A%2F%2F248837%2F1%2F1%3Flang%3Dde&key=%2Flibrary%2Fmetadata%2F9564&machineIdentifier=053ab531dd6776f35bb108776910bd8e743a0587&playQueueItemID=13621&ratingKey=9564&state=playing&time=5977 (6 live) TLS GZIP 12ms 450 bytes (pipelined: 11)
Jun 09, 2017 18:41:12.635 [0x7ffb46ffe700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Jun 09, 2017 18:41:12.635 [0x7ffb46ffe700] DEBUG - Auth: authenticated user 1 as drmonty
Jun 09, 2017 18:41:12.635 [0x7ffb46ffe700] DEBUG - Auth: Came in with a super-token, authorization succeeded.
Jun 09, 2017 18:41:12.636 [0x7ffb3361a700] DEBUG - Request: [192.168.0.197:56337 (Subnet)] GET /:/timeline?bandwidth=2480&bufferedTime=124&containerKey=%2FplayQueues%2F1329&duration=2586976&guid=com.plexapp.agents.thetvdb%3A%2F%2F248837%2F1%2F1%3Flang%3Dde&key=%2Flibrary%2Fmetadata%2F9564&machineIdentifier=053ab531dd6776f35bb108776910bd8e743a0587&playQueueItemID=13621&ratingKey=9564&state=playing&time=5977 (6 live) TLS GZIP Signed-in Token (drmonty)
Jun 09, 2017 18:41:12.638 [0x7ffb3361a700] DEBUG - Client [c8b492eb121c1faf-com-plexapp-android] reporting timeline state playing, progress of 5977/2586976ms for guid=com.plexapp.agents.thetvdb://248837/1/1?lang=de, ratingKey=9564 url=, key=/library/metadata/9564, containerKey=/playQueues/1329, metadataId=9564
Jun 09, 2017 18:41:12.638 [0x7ffb3361a700] DEBUG - [Now] User is drmonty (ID: 1)
Jun 09, 2017 18:41:12.639 [0x7ffb3361a700] DEBUG - [Now] Device is Android (4K Ultra Slim LED TV powered by Android).
Jun 09, 2017 18:41:12.640 [0x7ffb3361a700] DEBUG - [Now] Profile is Android
Jun 09, 2017 18:41:12.640 [0x7ffb3361a700] DEBUG - [Now] Updated play state for /library/metadata/9564.
Jun 09, 2017 18:41:12.641 [0x7ffb3361a700] DEBUG - Statistics: (c8b492eb121c1faf-com-plexapp-android) Reporting active playback in state 0 of type 4 (scrobble: 0) for account 1
Jun 09, 2017 18:41:12.648 [0x7ffb477ff700] DEBUG - Completed: [192.168.0.197:56337] 200 GET /:/timeline?bandwidth=2480&bufferedTime=124&containerKey=%2FplayQueues%2F1329&duration=2586976&guid=com.plexapp.agents.thetvdb%3A%2F%2F248837%2F1%2F1%3Flang%3Dde&key=%2Flibrary%2Fmetadata%2F9564&machineIdentifier=053ab531dd6776f35bb108776910bd8e743a0587&playQueueItemID=13621&ratingKey=9564&state=playing&time=5977 (6 live) TLS GZIP 12ms 450 bytes (pipelined: 21)
Jun 09, 2017 18:41:18.978 [0x7ffb46ffe700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Jun 09, 2017 18:41:18.978 [0x7ffb46ffe700] DEBUG - Auth: authenticated user 1 as drmonty
Jun 09, 2017 18:41:18.978 [0x7ffb46ffe700] DEBUG - Auth: Came in with a super-token, authorization succeeded.
Jun 09, 2017 18:41:18.979 [0x7ffb36e21700] DEBUG - Request: [192.168.0.197:33520 (Subnet)] GET /video/:/transcode/universal/stop?autoAdjustQuality=1&hasMDE=1&location=lan&mediaBufferSize=74944&session=c8b492eb121c1faf-com-plexapp-android (6 live) TLS GZIP Signed-in Token (drmonty)
Jun 09, 2017 18:41:18.981 [0x7ffb46ffe700] DEBUG - Completed after connection close: [192.168.0.197:33520] 200 GET /video/:/transcode/universal/stop?autoAdjustQuality=1&hasMDE=1&location=lan&mediaBufferSize=74944&session=c8b492eb121c1faf-com-plexapp-android (6 live) TLS GZIP 2ms 0 bytes (pipelined: 9)
Jun 09, 2017 18:41:18.981 [0x7ffb263f8700] DEBUG - Found session GUID of c8b492eb121c1faf-com-plexapp-android in session start.
Jun 09, 2017 18:41:18.982 [0x7ffb263f8700] WARN - Got a request to stop a transcode session without a session GUID (or with an invalid one).
Jun 09, 2017 18:41:19.036 [0x7ffb477ff700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Jun 09, 2017 18:41:19.036 [0x7ffb477ff700] DEBUG - Auth: authenticated user 1 as drmonty
Jun 09, 2017 18:41:19.036 [0x7ffb477ff700] DEBUG - Auth: Came in with a super-token, authorization succeeded.
Jun 09, 2017 18:41:19.037 [0x7ffb3361a700] DEBUG - Request: [192.168.0.197:34067 (Subnet)] GET /video/:/transcode/universal/stop?autoAdjustQuality=1&hasMDE=1&location=lan&mediaBufferSize=74944&session=c8b492eb121c1faf-com-plexapp-android (6 live) TLS GZIP Signed-in Token (drmonty)
Jun 09, 2017 18:41:19.039 [0x7ffb263f8700] DEBUG - Found session GUID of c8b492eb121c1faf-com-plexapp-android in session start.
Jun 09, 2017 18:41:19.039 [0x7ffb263f8700] WARN - Got a request to stop a transcode session without a session GUID (or with an invalid one).
Jun 09, 2017 18:41:19.042 [0x7ffb46ffe700] DEBUG - Completed: [192.168.0.197:34067] 200 GET /video/:/transcode/universal/stop?autoAdjustQuality=1&hasMDE=1&location=lan&mediaBufferSize=74944&session=c8b492eb121c1faf-com-plexapp-android (6 live) TLS GZIP 5ms 195 bytes (pipelined: 1)
Jun 09, 2017 18:41:19.126 [0x7ffb46ffe700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Jun 09, 2017 18:41:19.126 [0x7ffb46ffe700] DEBUG - Auth: authenticated user 1 as drmonty
Jun 09, 2017 18:41:19.126 [0x7ffb46ffe700] DEBUG - Auth: Came in with a super-token, authorization succeeded.
Jun 09, 2017 18:41:19.127 [0x7ffb36e21700] DEBUG - Request: [192.168.0.197:49419 (Subnet)] GET /video/:/transcode/universal/decision?audioBoost=100&autoAdjustQuality=1&directPlay=0&directStream=0&directStreamAudio=0&fastSeek=1&hasMDE=1&location=lan&maxVideoBitrate=200000&mediaBufferSize=16384&mediaIndex=0&partIndex=0&path=%2Flibrary%2Fmetadata%2F9564&protocol=*&session=c8b492eb121c1faf-com-plexapp-android&subtitleSize=100&videoBitrate=200000&videoQuality=100&videoResolution=3840x2160 (6 live) TLS GZIP Signed-in Token (drmonty)
Jun 09, 2017 18:41:19.128 [0x7ffb36e21700] DEBUG - Found session GUID of c8b492eb121c1faf-com-plexapp-android in session start.
Jun 09, 2017 18:41:19.131 [0x7ffb36e21700] DEBUG - TranscodeUniversalRequest: using augmented profile Android
Jun 09, 2017 18:41:19.133 [0x7ffb36e21700] DEBUG - Downloading document http://127.0.0.1:32400/library/metadata/9564?includeBandwidths=1&X-Plex-Session-Identifier=c8b492eb121c1faf-com-plexapp-android
Jun 09, 2017 18:41:19.134 [0x7ffb36e21700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Jun 09, 2017 18:41:19.134 [0x7ffb36e21700] DEBUG - Auth: authenticated user 1 as drmonty
Jun 09, 2017 18:41:19.135 [0x7ffb36e21700] DEBUG - Auth: Came in with a super-token, authorization succeeded.
Jun 09, 2017 18:41:19.154 [0x7ffb36e21700] DEBUG - We're going to try to auto-select an audio stream for account 1.
Jun 09, 2017 18:41:19.154 [0x7ffb36e21700] DEBUG - Selecting best audio stream for part ID 17249 (autoselect: 1 language: de)
Jun 09, 2017 18:41:19.155 [0x7ffb36e21700] DEBUG - Audio Stream: 37857, Subtitle Stream: -1
Jun 09, 2017 18:41:19.158 [0x7ffb36e21700] DEBUG - Scaled up video bitrate to 6046Kbps based on 1.500000x fudge factor.
Jun 09, 2017 18:41:19.524 [0x7ffb36e21700] DEBUG - MDE: received PLEX_PROTOCOL_ANY from client, selected protocol hls
Jun 09, 2017 18:41:19.525 [0x7ffb36e21700] DEBUG - MDE: analyzing media item 17237
Jun 09, 2017 18:41:19.525 [0x7ffb36e21700] DEBUG - MDE: E1 - Vergeltung: Direct Play is disabled
Jun 09, 2017 18:41:19.525 [0x7ffb36e21700] DEBUG - MDE: E1 - Vergeltung: media must be transcoded in order to use the hls protocol
Jun 09, 2017 18:41:19.525 [0x7ffb36e21700] DEBUG - MDE: E1 - Vergeltung: no direct play video profile exists for http/mkv/h264
Jun 09, 2017 18:41:19.526 [0x7ffb36e21700] DEBUG - MDE: E1 - Vergeltung: no direct play video profile exists for http/mkv/h264/ac3
Jun 09, 2017 18:41:19.526 [0x7ffb36e21700] DEBUG - MDE: E1 - Vergeltung: no direct play video profile exists for http/mkv/h264/ac3
Jun 09, 2017 18:41:19.526 [0x7ffb36e21700] DEBUG - Vergeltung - audio.bitrate limitation applies: 384 > 1
Jun 09, 2017 18:41:19.527 [0x7ffb36e21700] DEBUG - MDE: E1 - Vergeltung: Direct Streaming is disabled, so video stream will be transcoded
Jun 09, 2017 18:41:19.527 [0x7ffb36e21700] DEBUG - MDE: E1 - Vergeltung: no remuxable profile found, so video stream will be transcoded
Jun 09, 2017 18:41:19.527 [0x7ffb36e21700] DEBUG - Scaled up video bitrate to 6046Kbps based on 1.500000x fudge factor.
Jun 09, 2017 18:41:19.528 [0x7ffb36e21700] DEBUG - MDE: E1 - Vergeltung: Audio Direct Streaming is disabled, so video's audio stream will be transcoded
Jun 09, 2017 18:41:19.528 [0x7ffb36e21700] DEBUG - MDE: Revenge - S1 E1 - Vergeltung: selected media 0 / 17237
Jun 09, 2017 18:41:19.534 [0x7ffb36e21700] DEBUG - Streaming Resource: Session 0x7ffb30141660:c8b492eb121c1faf-com-plexapp-android changed transcode slot usage to used. Used slots is now 1
Jun 09, 2017 18:41:19.534 [0x7ffb36e21700] DEBUG - Streaming Resource: Reached Decision id=9564 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=17237 part=(id=17249 decision=transcode container=mpegts protocol=hls streams=(Video=(id=37856 decision=transcode bitrate=6046 encoder=libx264 width=1280 height=720) Audio=(id=37857 decision=transcode bitrate=774 encoder=aac channels=6 rate=48000))))
Jun 09, 2017 18:41:19.541 [0x7ffb46ffe700] DEBUG - Completed: [192.168.0.197:49419] 200 GET /video/:/transcode/universal/decision?audioBoost=100&autoAdjustQuality=1&directPlay=0&directStream=0&directStreamAudio=0&fastSeek=1&hasMDE=1&location=lan&maxVideoBitrate=200000&mediaBufferSize=16384&mediaIndex=0&partIndex=0&path=%2Flibrary%2Fmetadata%2F9564&protocol=*&session=c8b492eb121c1faf-com-plexapp-android&subtitleSize=100&videoBitrate=200000&videoQuality=100&videoResolution=3840x2160 (6 live) TLS GZIP 414ms 1666 bytes (pipelined: 12)
Jun 09, 2017 18:41:19.685 [0x7ffb477ff700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Jun 09, 2017 18:41:19.686 [0x7ffb477ff700] DEBUG - Auth: authenticated user 1 as drmonty
Jun 09, 2017 18:41:19.686 [0x7ffb477ff700] DEBUG - Auth: Came in with a super-token, authorization succeeded.
Jun 09, 2017 18:41:19.686 [0x7ffb3361a700] DEBUG - Request: [192.168.0.197:53728 (Subnet)] GET /video/:/transcode/universal/start.m3u8?audioBoost=100&autoAdjustQuality=1&directPlay=0&directStream=0&directStreamAudio=0&fastSeek=1&hasMDE=1&includeCodecs=1&location=lan&maxVideoBitrate=200000&mediaBufferSize=16384&offset=5&partIndex=0&path=%2Flibrary%2Fmetadata%2F9564&protocol=hls&session=c8b492eb121c1faf-com-plexapp-android&subtitleSize=100&videoBitrate=200000&videoQuality=100&videoResolution=3840x2160 (7 live) TLS GZIP Signed-in Token (drmonty)
As you may can see, plex media server reported, that the audio track should get transcoded, as the profile defines it (also plex for android reported it App cannot direct play this item. Direct play is disabled
), but plex for android still direct play the audio and video (which lead to black screen / freeze after a few seconds of playback).
Switching back to stable 5.10.3 restores the wanted behavior.
Thanks :)!