Plex: Difference between revisions

From miki
Jump to navigation Jump to search
 
(25 intermediate revisions by the same user not shown)
Line 2: Line 2:
* Plex Forums - https://forums.plex.tv/
* Plex Forums - https://forums.plex.tv/
* NAS Compatibility [https://docs.google.com/spreadsheets/d/1MfYoJkiwSqCXg8cm5-Ac4oOLPRtCkgUxU0jdj3tmMPc/edit#gid=1274624273]
* NAS Compatibility [https://docs.google.com/spreadsheets/d/1MfYoJkiwSqCXg8cm5-Ac4oOLPRtCkgUxU0jdj3tmMPc/edit#gid=1274624273]

;Plex Add-ons
* [https://github.com/pannal/Sub-Zero.bundle/ Sub-zero] — an alternative to built-in subtitle finder.

;Tools
* [https://www.filebot.net/ Filebot] A tool to rename media according to media center naming schemes (support Plex, Kodi...).


== Install ==
== Install ==
Line 10: Line 16:
flatpak remote-add --if-not-exists plex-media-player https://flatpak.knapsu.eu/plex-media-player.flatpakrepo
flatpak remote-add --if-not-exists plex-media-player https://flatpak.knapsu.eu/plex-media-player.flatpakrepo
flatpak install plex-media-player tv.plex.PlexMediaPlayer
flatpak install plex-media-player tv.plex.PlexMediaPlayer

... doesn't seem to work great on Debian Buster at least.

=== Kodi Plex Add-On ===
* Select add-on from videos add-on.
* Sign in to account.
* In settings, '''enable direct play''' and '''enable h265'''.
* Optionally, set add-on '''to autostart''' when Kodi starts.


== Configuration ==
== Configuration ==
See also Shield TV and Wolverine.
See also [[Shieldtv]] and [[Configuration NAS Wolverine]].

=== Plex App on NVidia Shield TV Pro ===
* Audio Passthrough:
:* Set to '''HDMI''' because it amplifies AC3 audio.
:* {{red|Todo}}: Note that passthrough is not advised [https://support.plex.tv/articles/212072167-audio-configuration-guide-plex-media-player/], so maybe we should reconsider that.

* Video quality - Adjust automatically:
:* Currently set to '''OFF'''.
:* {{red|Todo}}: Does that influence the quality of transcode?


=== Plex Server ===
* Connect: http://captain:32400/
* Server - Settings - Library - Disable media deletion.
* Server - Settings - Library - Disable media deletion.
* Languages - Prefer subtitles in Français.
* Languages - Prefer subtitles in Français.
Line 40: Line 65:
* Make sure H365 is enabled if supported.
* Make sure H365 is enabled if supported.
* Set plex add-on to autostart when Kodi starts (to avoid to navigate to that add-on every time).
* Set plex add-on to autostart when Kodi starts (to avoid to navigate to that add-on every time).

=== Prevent transcode with AC3 / EAC3 audio on Nvidia Shield TV ===
Although the NVidia shield TV supports AC3 / EAC3 natively, it is transcoded by the support [https://forums.plex.tv/t/native-nvidia-shield-plex-app-wont-direct-play-4k-eac3/616436], [https://www.reddit.com/r/PleX/comments/f8eo85/plex_app_on_shield_tv_refuses_to_direct_play/]

To prevent that:
* Use Plex add-on in Kodi, instead of the Plex app on the shield.
* ???

More on DirectPlay:
* https://www.reddit.com/r/PleX/comments/f8eo85/plex_app_on_shield_tv_refuses_to_direct_play/


=== Naming convention ===
=== Naming convention ===
Line 102: Line 117:


== Troubleshooting ==
== Troubleshooting ==
=== Issue with playing Lucy ===
=== Collect logs ===
;Plex Player
* Trying to play Lucy (H265 HEVC AC3) on Shield TV -> can't play (error).
* Enable network logging [https://support.plex.tv/articles/201573117-android-android-tv-fire-tv-logs/].
* Looking at the server log, we see there are errors in the transcoder.
* Visit the given URL to collect the log (eg. http://192.168.1.88:32500/logging)
* We also see that server says directplay is disabled

1382:Dec 20, 2020 00:42:18.545 [23009] DEBUG - [Transcode] MDE: Lucy (2014): Direct Play is disabled
.Plex Server
1383:Dec 20, 2020 00:42:18.545 [23009] DEBUG - [Transcode] MDE: Lucy (2014): media must be transcoded in order to use the hls protocol
* Go to server page, manage, console or troubleshooting and click Download logs.
* When forbidding transcoding on server, shield refuses to play as well (with another msg, but that basically says server tried to transcode but was refused to).

* It seems transcoding is forced with Shield Plex App because of AC3 audio / E-AC3 audio [https://www.reddit.com/r/PleX/comments/f8eo85/plex_app_on_shield_tv_refuses_to_direct_play/], [https://forums.plex.tv/t/native-nvidia-shield-plex-app-wont-direct-play-4k-eac3/616436].
=== General workaround tips ===
* One solution is to use Plex addon on Kodi [https://forums.plex.tv/t/native-nvidia-shield-plex-app-wont-direct-play-4k-eac3/616436].
When encountering an issue:
:* Maybe another solution is to install Plex beta app from Plex.
* Try to disable subtitles to see if issue is related to the subtitles.
* In Kodi addon:
:* Select appropriate Plex Server.
* Try Kodi Plex add-on.
* Try changing the Plex server.
:* Make sure direct play is enabled (default).
:* Enable H265 direct play (disabled by default).
:* Optionally, set Plex addon to autostart (when kodi starts, so that to jump to Plex addon directly).
* ... Turns out that the audio track had a delay, so likely was corrupted in some way.


=== Rewind / FF issues ===
=== Rewind / FF issues ===
Line 128: Line 140:


=== 30s startup delay ===
=== 30s startup delay ===
See [[Plex issue 30s delay]].
* Symptom: when launching media, 30s (32 in fact) of spinning wheel before media shows up. During that time, dashboard doesn't show any connection.
* Relevant tickets [https://forums.plex.tv/t/nvidia-shield-tv-pro-2019-very-slow-plex-app-since-8-2-1-firmware/656558/14], [https://forums.plex.tv/t/shield-tv-beta-20-to-30-second-delay-when-playing-media/655246].
* Seems to occur only when doing Direct Stream on the Plex App on Shieldh TV Pro.
* When transcoding (can be forced by disabling HDMI passthrough on Plex App), delay is only 8s on Shield TV Pro.
:* Can't reproduce this anymore. Audio passthrough disabled doesn't trigger transcode when using AC3 anymore (saw a quick update message before playing the media).
* On Web browser, delay is less than 3s, direct or not.
* On Kodi addon, delay is ?.


Fix:
Some tests:
* Disable opportunistic lock on the NAS.
* Select movie.
* Select version
* Play from start.
* When Direct Play, try both Shield as server, and Wolverine.


=== MP4 container with VOBSUB subtitles triggers transcode ===
* Shield App:
Test case: any DVD converted with Handbrake, using e.g. MP4 container, H264, any audio, VOBSUB subtitles.
:* Dec 26, 2020 17:33
:* 1080p, 1.9Mbps: Interstellar 1080p H264 AAC stereo .MP4: '''Direct Play AV, 3s''' (+SRT subtitles)
:* SD, 1.7Mbps: Interstellar 480p H264 AC3 5.1 .MKV: ''''''
:* SD, 1.5Mbps: Interstellar 480p H264 AAC 5.1 .MKV: ''''''
:* SD, 1.4Mbps: Interstellar 480p H265 AC3 5.1 .MKV: ''''''
:* Dec 26, 2020 17:36:35


Workaround:
* Shield Kodi:
* Use '''Kodi add-on'''.
:* Note: on Kodi, even when there is a delay, the play request shows up immediately on the dashboard. Looking in the log, we don't see the same 30s delay between the <code>Content-Length</code> requests.
* Use '''MKV''' container.
:* Dec 26, 2020 17:37:51
:* 1080p, 1.9Mbps: Interstellar 1080p H264 AAC stereo .MP4: '''Direct Play AV, 3s''' (+SRT subtitles)
::* Note that in the logs, we see transcode messages, even though it direct plays.
Dec 26, 2020 19:11:35.247 [4977] DEBUG - [Transcode] MDE: Interstellar (2014): no direct play video profile exists for http/mp4/h264
Dec 26, 2020 19:11:35.247 [4977] DEBUG - [Transcode] MDE: Interstellar (2014): no direct play video profile exists for http/mp4/h264/aac
Dec 26, 2020 19:11:35.247 [4977] DEBUG - [Transcode] MDE: Interstellar (2014): transcoding selected subtitle stream
Dec 26, 2020 19:11:35.247 [4977] DEBUG - [Transcode] MDE: Interstellar (2014): selected media 0 / 183
:* SD, 1.7Mbps: Interstellar 480p H264 AC3 5.1 .MKV: '''Direct Play AV, 20s''' (+SRT subtitles!)
:* SD, 1.5Mbps: Interstellar 480p H264 AAC 5.1 .MKV: '''Direct Play AV, 20s''' (+SRT subtitles!)
:* SD, 1.4Mbps: Interstellar 480p H265 AC3 5.1 .MKV: ''''''
:* Dec 26, 2020 17:40:24


=== MKV container with PGS subtitles triggers transcode ===
* Shield App with Shield Server:
Test case: {{file|[zza]Lucy.2014.BDRIP.1080p.x265.AC3.mkv}}.
:* Start &mdash; Dec 26, 2020 21:24:34
:* Delay One Brave-H264-AAC2ch.mkv: '''DP 30s''' (same with VOBSUB)
:* Delay Two Brave-H264-AAC2ch-mp4weboptim.m4v: '''DP 2s''' (no VOBSUB available :-( )
:* Delay Three Brave-H264-AAC5.1ch.mkv: '''DP 30s''' (same with VOBSUB)
:* Delay Four Brave-H264-AAC5.1ch-mp4weboptim.m4v: '''DP 2s''' (no VOBSUB available :-( )
:* Delay Five Brave-H264-AC32ch.mkv: '''DP 30s''' (same with VOBSUB)
:* Delay Six Brave-H264-AC32ch-mp4weboptim.m4v: '''DP 2s''' (no VOBSUB available :-( )
:* Delay Seven Brave-H264-AC35.1chpassthrough.mkv: '''DP 30s''' (same with VOBSUB)
:* Delay Eight Brave-H264-AC35.1chpassthrough-mp4weboptim.m4v: '''DP 2s''' (no VOBSUB available :-( )
:* Delay Nine Brave-H264-AC35.1chrecoded.mkv: '''DP 30s''' (same with VOBSUB)
:* Delay Ten Brave-H264-AC35.1chrecoded-mp4weboptim.m4v: '''DP 1s''' (no VOBSUB available :-( )
:* End &mdash; Dec 26, 2020 21:32:52
:* DelayTwo One - Bad Teacher-AAC2ch.mkv: '''DP 30s''' (same with VOBSUB)
:* DelayTwo Two - Bad Teacher-AAC2ch-mp4weboptim.m4v: '''DP 2s''', but if playing VOBSUB, '''transcode V (and bad quality)''' (transcode reason: Direct Play was attempted but failed, fallen back to transcoding)
:* DelayTwo Three - Bad Teacher-AAC5.1ch-mp4weboptim.m4v: '''DP 2s''', but if playing VOBSUB, '''transcode V (and bad quality)''' (transcode reason: Direct Play was attempted but failed, fallen back to transcoding)
:* DelayThree One - Brave - H264-AACstereo-MP4.m4v: '''DP 2s''' (MP4 but not web optimized) But if playing VOBSUB, '''transcode V (and bad quality)''' (transcode reason: Direct Play was attempted but failed, fallen back to transcoding)!
:* DelayThree Two - Brave - H264-AC3passthrough-MP4.m4v: '''DP 2s''' (MP4 but not web optimized). But if playing VOBSUB, '''transcode V (and bad quality)''' (transcode reason: Direct Play was attempted but failed, fallen back to transcoding)!


Workaround:
* Shield App with Shield Server, with local library:
* Use '''Kodi add-on'''.
:* Bad Teacher H264 AC3 5.1.mkv: '''DP 2s''' (same with VOBSUB)


=== Quality quite bad when transcoding on Shield ===
* Shield Kodi with Shield Server:
* transcoding quality is quite low (using shield plex app and shield plex server)
:* Start &mdash; Dec 26, 2020 21:38:41
* Note: in App, Video Quality, Adjust automatically is set to OFF, but Home streaming is set to Maximum.
:* Delay One Brave-H264-AAC2ch.mkv: '''DP 20s'''
:* Delay Two Brave-H264-AAC2ch-mp4weboptim.m4v: '''DP 2s'''
:* Delay Three Brave-H264-AAC5.1ch.mkv: '''DP 20s, but doesnt play''' (goes into ''Playing Next'' screen)
:: We get the following errors. But we get the same when it works, except the <code>curl_easy_perform</code> one.
Dec 26, 2020 21:42:28.038 [10513] Error — Error issuing curl_easy_perform(handle): 28
Dec 26, 2020 21:42:30.098 [10358] Error — [Transcode] ClientProfileExtra: missing protocol parameter
Dec 26, 2020 21:42:30.098 [10358] Warning — [Transcode] ClientProfileExtra: ignoring directive: append-transcode-target-audio-codec(type=videoProfile&context=streaming&audioCodec=ac3)
Dec 26, 2020 21:42:30.099 [10358] Warning — [Transcode] TranscodeUniversalRequest: at least one profile extra directive could not be read
Dec 26, 2020 21:42:51.601 [10633] Error — Unknown metadata type: folder
Dec 26, 2020 21:42:51.693 [10634] Warning — SLOW QUERY: It took 210.000000 ms to retrieve 51 items.
:* Delay Four Brave-H264-AAC5.1ch-mp4weboptim.m4v: '''DP 2s'''
:* Delay Five Brave-H264-AC32ch.mkv: '''DP 20s, but doesnt play'''
:* Delay Six Brave-H264-AC32ch-mp4weboptim.m4v: '''DP 2s'''
:* Delay Seven Brave-H264-AC35.1chpassthrough.mkv: '''DP 20s, but doesnt play'''
:* Delay Eight Brave-H264-AC35.1chpassthrough-mp4weboptim.m4v: '''DP 2s'''
:* Delay Nine Brave-H264-AC35.1chrecoded.mkv: '''DP 20s, but doesnt play'''
:* Delay Ten Brave-H264-AC35.1chrecoded-mp4weboptim.m4v: '''DP 2s'''
:* End &mdash; Dec 26, 2020 21:54:33
:* DelayTwo One - Bad Teacher-AAC2ch.mkv: '''DP 20s'''
:* DelayTwo Two - Bad Teacher-AAC2ch-mp4weboptim.m4v: '''DP 2s'''
:* DelayTwo Three - Bad Teacher-AAC5.1ch-mp4weboptim.m4v: '''DP 2s'''
:* DelayThree One - Brave - H264-AACstereo-MP4.m4v: '''DP 2s''' (MP4 but not web optimized). If playing VOBSUB, '''DP 2s''' also!
:* DelayThree Two - Brave - H264-AC3passthrough-MP4.m4v: '''DP 2s''' (MP4 but not web optimized). If playing VOBSUB, '''DP 2s''' also!


=== Miscellaneous issues log ===
* Shield App with Shield Server, with HDMI passthrough disabled:
* {{green|'''Invalid'''}} ''Enhanced'' - French SRT subtitles not showing
:* ... This was our trick to trigger anymore when using AC3, but this doesn't work anymore.
:* Because the SRT file was empty / corrupted.
* {{green|'''Invalid'''}} ''Lucy'' ({{file|[zza]Lucy.2014.BDRIP.1080p.x265.AC3.mkv}}, MKV, H265, AC3 audio, PGS and SRT subtitles) - Cannot play AC3 audio, keep transcoding it and fails.
:* Not related to AC3 but to PGS subtitles, which trigger transcode. In addition, there was an issue in that media (audio delay).
:* Playing with '''PGS subtitles''' trigger transcode, which fails (so transcode not due to using AC3 as initially thought [https://www.reddit.com/r/PleX/comments/f8eo85/plex_app_on_shield_tv_refuses_to_direct_play/], [https://forums.plex.tv/t/native-nvidia-shield-plex-app-wont-direct-play-4k-eac3/616436]).
1382:Dec 20, 2020 00:42:18.545 [23009] DEBUG - [Transcode] MDE: Lucy (2014): Direct Play is disabled
1383:Dec 20, 2020 00:42:18.545 [23009] DEBUG - [Transcode] MDE: Lucy (2014): media must be transcoded in order to use the hls protocol
:* Note Plex addon on Kodi has better support for subtitles and audio in general [https://forums.plex.tv/t/native-nvidia-shield-plex-app-wont-direct-play-4k-eac3/616436].
* {{green|'''Invalid'''}} Keep transcoding AC3 media.
:* Does not seem to be the case in our DVD tests. The delay is due to something else.
* {{red|'''Issue'''}} Transcoding quality is quite bad even though quality is set to maxium (using Shield TV Pro for transcoding)
:* In the dashboard, we see that often times the bitrate is quite low (1Mb, sometimes less, or a small 2Mb). Why can't we boost the quality of the transcode to the max (say 4Mb)? Disabling HW support does not change much on this.
* {{green|'''Workaround'''}} ''Ghost in the Shell'' ({{file|Ghost in a Shell.m4v}}, HEVC, AAC LC, VOBSUB), transcode when enabling subtitles.
:* Known issue, due to MP4 container.


=== Reset / Retore Plex Server on NVIDIA Shield ===
* Shield App with Synology Server:
+ Reference: [https://www.reddit.com/r/PleX/comments/p7qke6/restoring_database_backup_of_nvidia_shield_plex/ Reddit post]
:* End &mdash; Dec 26, 2020 23:09:xx
:* Delay One to Ten: '''Direct Play 2s delay'''. Same with VOBSUB.
:* End &mdash; Dec 26, 2020 23:11:45
:* DelayThree One - Brave - H264-AACstereo-MP4.m4v: '''DP 2s''' (MP4 but not web optimized) But if playing VOBSUB, '''Cannot play media''' (because transcode disabled)!
:* DelayThree Two - Brave - H264-AC3passthrough-MP4.m4v: '''DP 2s''' (MP4 but not web optimized). But if playing VOBSUB, '''Cannot play media''' (because transcode disabled)!


This might be necessary if the Plex Media Server on the NVIDIA Shield refuses to start (eg. after a Shield FW upgrade).
* Shield Kodi with Synology Server:
:* Start &mdash; Dec 26, 2020 23:15:21
:* Delay One to Ten: '''Direct Play 2s delay'''. Same with VOBSUB.
:* End &mdash; Dec 26, 2020 23:18:35
:* DelayTwo One - Bad Teacher-AAC2ch.mkv: '''DP 2s''' (same with VOBSUB)
:* DelayTwo Two - Bad Teacher-AAC2ch-mp4weboptim.m4v: '''DP 2s''' (same with VOBSUB)
:* DelayTwo Three - Bad Teacher-AAC5.1ch-mp4weboptim.m4v: '''DP 2s''' (same with VOBSUB)
:* DelayThree One - Brave - H264-AACstereo-MP4.m4v: '''DP 2s''' (MP4 but not web optimized). If playing VOBSUB, '''DP 2s''' also!
:* DelayThree Two - Brave - H264-AC3passthrough-MP4.m4v: '''DP 2s''' (MP4 but not web optimized). If playing VOBSUB, '''DP 2s''' also!


;Clear data and/or cache
Relevant logs analysis:
* This steps is necessary to recover the PMS app.
* We get a <code>Failed to stream media, client probably disconnected after 5505024 bytes: 104 - Connection reset by peer</code>. Initially thought it was linked to 30s delay, but we get it everytimes.
* In Shield settings, clear the Plex app '''cache''' (NOT THE DATA), and the PMS app '''data''' (note that PMS is a system app).
<pre>
49122:Dec 26, 2020 16:53:12.388 [22929] DEBUG - Auth: authenticated user 1 as m.xelp@immie.org
49123:Dec 26, 2020 16:53:12.388 [32247] DEBUG - Request: [192.168.1.88:42344 (Subnet)] GET /library/parts/12486/1608848836/file.mkv?autoAdjustQuality=0&hasMDE=1&location=lan&mediaBufferSize=74944 (8 live) TLS Signed-in Token (m.xelp@immie.org) (range: bytes=0-)
49124:Dec 26, 2020 16:53:12.404 [32247] DEBUG - Content-Length of /storage/WOLVERINE/family/movie/_tests/Interstellar (2014) - x265.mkv is 1746637281 (of total: 1746637281).
49125:Dec 26, 2020 16:53:12.620 [22929] DEBUG - Auth: authenticated user 1 as m.xelp@immie.org
49126:Dec 26, 2020 16:53:12.620 [31709] DEBUG - Request: [192.168.1.88:42346 (Subnet)] GET /library/parts/12486/1608848836/file.mkv?autoAdjustQuality=0&hasMDE=1&location=lan&mediaBufferSize=74944 (9 live) TLS Signed-in Token (m.xelp@immie.org) (range: bytes=1746378705-)
49127:Dec 26, 2020 16:53:12.626 [31709] DEBUG - Content-Length of /storage/WOLVERINE/family/movie/_tests/Interstellar (2014) - x265.mkv is 258576 (of total: 1746637281).
49128:Dec 26, 2020 16:53:42.665 [22929] DEBUG - Failed to stream media, client probably disconnected after 5505024 bytes: 104 - Connection reset by peer
49129:Dec 26, 2020 16:53:42.665 [22929] DEBUG - Completed after connection close: [192.168.1.88:42344] 206 GET /library/parts/12486/1608848836/file.mkv?autoAdjustQuality=0&hasMDE=1&location=lan&mediaBufferSize=74944 (7 live) TLS 30276ms 5505024 bytes (range: bytes=0-)
49130:Dec 26, 2020 16:53:42.680 [22929] DEBUG - Completed: [192.168.1.88:42346] 206 GET /library/parts/12486/1608848836/file.mkv?autoAdjustQuality=0&hasMDE=1&location=lan&mediaBufferSize=74944 (7 live) TLS 30059ms 258576 bytes (range: bytes=1746378705-)
49131:Dec 26, 2020 16:53:42.780 [22929] DEBUG - Auth: authenticated user 1 as m.xelp@immie.org
49132:Dec 26, 2020 16:53:42.781 [31709] DEBUG - Request: [192.168.1.88:42350 (Subnet)] GET /library/parts/12486/1608848836/file.mkv?autoAdjustQuality=0&hasMDE=1&location=lan&mediaBufferSize=74944 (7 live) TLS Signed-in Token (m.xelp@immie.org) (range: bytes=5006-)
49133:Dec 26, 2020 16:53:42.795 [31709] DEBUG - Content-Length of /storage/WOLVERINE/family/movie/_tests/Interstellar (2014) - x265.mkv is 1746632275 (of total: 1746637281).
49134:Dec 26, 2020 16:53:43.252 [22929] DEBUG - Auth: authenticated user 1 as m.xelp@immie.org
49135:Dec 26, 2020 16:53:43.252 [31709] DEBUG - Request: [192.168.1.88:42352 (Subnet)] POST /playQueues?includeChapters=1&continuous=0&includeLoudnessRamps=1&repeat=0&extrasPrefixCount=0&type=video&shuffle=0&uri=server%3A%2F%2F315dbe1ac5eab4b3b25956e1907bba687927fecf%2Fcom.plexapp.plugins.library%2Flibrary%2Fmetadata%2F183&key=%2Flibrary%2Fmetadata%2F183 (7 live) TLS GZIP Signed-in Token (m.xelp@immie.org)
</pre>
* When on Kodi Add-on, we get this msg every 5s, even when no movie playing:
Dec 26, 2020 17:39:52.399 [22928] DEBUG - Auth: authenticated user 1 as m.xelp@immie.org
Dec 26, 2020 17:39:52.399 [2609] DEBUG - Request: [192.168.1.61:59608 (Subnet)] GET /statistics/bandwidth?timespan=6 (17 live) GZIP Signed-in Token (m.xelp@immie.org)
Dec 26, 2020 17:39:52.411 [22928] DEBUG - Completed: [192.168.1.61:59608] 200 GET /statistics/bandwidth?timespan=6 (17 live) GZIP 12ms 1514 bytes (pipelined: 19)
* When streaming ends, we get:
Dec 26, 2020 21:57:29.759 [11396] DEBUG — Streaming Resource: Terminated session 0x29fdd71598:440ac09a-635c-4e98-971b-720a0905387e with reason Client stopped playback.

Relevant analysis:
* When using MP4 (web optimized) container, there is no thumbnail when movie is not identified, but there is one when using .MKV container.
* AC3/AAC loudness difference:
:* With HDMI passthrough, loudness is bigger for AC3 than for AAC. When HDMI passthrough is disabled, AC3 and AAC have same loudness, which is same as AAC with HDMI passthrough.
:* This doesn't occur with Kodi add-on (probably because no HDMI passthrough).

=== Miscellaneous issues ===
* 'Enhanced' - French SRT subtitles not showing
:* Because the SRT file was empty / corrupted.
* 'Lucy' - Cannot play AC3 audio. Turns out there was an issue in that track anyway (delay).
* Keep transcoding AC3 media.
:* Does not seem to be the case in our DVD tests. The delay is due to something else.
* When transcoding on Shield TV server, the quality is quite bad. Why can't we boost the quality of the transcode to the max (say 4Mb)?


;Restore PMS backup
;Ghost in the Shell (Anime)
* In Plex app, wait for PMS server to restart, and move the PMS storage location to '''user accessible''' internal storage.
* Direct Play without subtitles, but transcode with subtitles.
* Then In Nvidia shield storage settings, enable file transfer via network.
* MP4, but still 30s delay when using shield server.
* Also, stop the PMS server by forcing a stop (note that PMS is a system app).
* From remote PC, go to {{file|smb://xxx.xxx.xx.x/internal/Plex Media Server/Database Backups}} folder, if it exists (otherwise you don't have any backup). Copy the file there to another location.
* Rename the latest backup files to have them look like:
:* {{file|com.plexapp.plugins.library.db}}
:* {{file|com.plexapp.plugins.library.blobs.db}}
* Go to the PMS internal storage at {{file|//xxx.xxx.xx.x/internal/android/data/com.plexapp.mediaserver.smb/Plex Media Server/Plug-in Support/Databases}} (this requires to move the PMS storage location as said in the first step). Remove the files there, and copy there the two renamed files above.
* Restart the Plex application (might also need to restart the Nvidia Shield), and wait for the PMS to restart.
* Visit the PMS server on local network (http://xxx.xxx.xx.x/32400)
:* check that the libraries are restored.
:* trigger a '''refresh of all metadata''' to have all arts restored.


== To Do ==
== To Do ==
* Shield TV - Play with Shield audio passthrough settings. See if that enables the direct play of AC3.
* '''Done''' Shield TV - Play with Shield audio passthrough settings. See if that enables the direct play of AC3. &mdash; AC3 is supported wether HDMI passthrough is enabled or not.

Latest revision as of 21:05, 16 September 2022

Links

Plex Add-ons
  • Sub-zero — an alternative to built-in subtitle finder.
Tools
  • Filebot A tool to rename media according to media center naming schemes (support Plex, Kodi...).

Install

Plex Media Player on Linux

See https://knapsu.eu/plex/. Use flatpak. Dependency on KDE [2].

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists kdeapps --from https://distribute.kde.org/kdeapps.flatpakrepo
flatpak remote-add --if-not-exists plex-media-player https://flatpak.knapsu.eu/plex-media-player.flatpakrepo
flatpak install plex-media-player tv.plex.PlexMediaPlayer

... doesn't seem to work great on Debian Buster at least.

Kodi Plex Add-On

  • Select add-on from videos add-on.
  • Sign in to account.
  • In settings, enable direct play and enable h265.
  • Optionally, set add-on to autostart when Kodi starts.

Configuration

See also Shieldtv and Configuration NAS Wolverine.

Plex App on NVidia Shield TV Pro

  • Audio Passthrough:
  • Set to HDMI because it amplifies AC3 audio.
  • Todo: Note that passthrough is not advised [3], so maybe we should reconsider that.
  • Video quality - Adjust automatically:
  • Currently set to OFF.
  • Todo: Does that influence the quality of transcode?

Plex Server

  • Connect: http://captain:32400/
  • Server - Settings - Library - Disable media deletion.
  • Languages - Prefer subtitles in Français.

How-To

Fix film metadata / bad matching

  • Go in server library.
  • Select movie, then Fix match....

If movie has several versions available, and one of these is not correct:

  • Select first split apart.

See also this post about upgrading the matching agent.

Use Plex add-on in Kodi

Advantage of using the Kodi add-on is that it has (currently) better direct play support (in particular AC3 audio).

To install Plex add-on in Kodi [4],[5]:

  • Go to Kodi add-on menu
  • Select Download, Videos Add-Ons.
  • Select Plex.
  • Install.

Some settings to consider:

  • Make sure direct play is enabled.
  • Make sure H365 is enabled if supported.
  • Set plex add-on to autostart when Kodi starts (to avoid to navigate to that add-on every time).

Naming convention

References [6]

Recommended folder structure:

   /Media
      /Movies
         movie content
      /Music
         music content
      /TV Shows
         television content
Basic Naming - separate folder
   /Movies
      /Avatar (2009)
         Avatar (2009).mkv
      /Batman Begins (2005)
         Batman Begins (2005).mp4
         Batman Begins (2005).en.srt
         poster.jpg
Basic Naming - standalone files (slower scanning)
   /Movies
      Avatar (2009).mkv
      Batman Begins (2005).mp4
Split across multiple files
Use MovieName (release year) – Split_Name.ext, where Split_Name is cdX, discX, diskX, dvdX, partX or ptX.
   /Movies
      /The Dark Knight (2008)
         The Dark Knight (2008) - pt1.mp4
         The Dark Knight (2008) - pt2.mp4
Subtitles
Must enable the local media assets scanner. Recommended formats are SRT, SMI, SSA (or ASS).
Use
  • MovieName (Release Date).[Language_Code].ext or
  • Movies/MovieName (Release Date).[Language_Code].ext
  • Movies/MovieName (Release Date).[Language_Code].forced.ext
   /Movies
      Avatar (2009).mkv
      Avatar (2009).en.srt
   
   /Movies
      /Avatar (2009)
         Avatar (2009).mkv
         Avatar (2009).eng.ass

Troubleshooting

Collect logs

Plex Player

.Plex Server

  • Go to server page, manage, console or troubleshooting and click Download logs.

General workaround tips

When encountering an issue:

  • Try to disable subtitles to see if issue is related to the subtitles.
  • Try Kodi Plex add-on.
  • Try changing the Plex server.

Rewind / FF issues

  • At least have that issue on Chrome / Debian Buster, with ShieldTV embedded player.
  • Trying fix:
  • Trying the official player from https://plex.tv, click launch.
  • Trying to enable Settings -> Plex Web -> Debug -> Use alternate streaming protocol for video playback. -> Much better!

30s startup delay

See Plex issue 30s delay.

Fix:

  • Disable opportunistic lock on the NAS.

MP4 container with VOBSUB subtitles triggers transcode

Test case: any DVD converted with Handbrake, using e.g. MP4 container, H264, any audio, VOBSUB subtitles.

Workaround:

  • Use Kodi add-on.
  • Use MKV container.

MKV container with PGS subtitles triggers transcode

Test case: [zza]Lucy.2014.BDRIP.1080p.x265.AC3.mkv.

Workaround:

  • Use Kodi add-on.

Quality quite bad when transcoding on Shield

  • transcoding quality is quite low (using shield plex app and shield plex server)
  • Note: in App, Video Quality, Adjust automatically is set to OFF, but Home streaming is set to Maximum.

Miscellaneous issues log

  • Invalid Enhanced - French SRT subtitles not showing
  • Because the SRT file was empty / corrupted.
  • Invalid Lucy ([zza]Lucy.2014.BDRIP.1080p.x265.AC3.mkv, MKV, H265, AC3 audio, PGS and SRT subtitles) - Cannot play AC3 audio, keep transcoding it and fails.
  • Not related to AC3 but to PGS subtitles, which trigger transcode. In addition, there was an issue in that media (audio delay).
  • Playing with PGS subtitles trigger transcode, which fails (so transcode not due to using AC3 as initially thought [8], [9]).
1382:Dec 20, 2020 00:42:18.545 [23009] DEBUG - [Transcode] MDE: Lucy (2014): Direct Play is disabled
1383:Dec 20, 2020 00:42:18.545 [23009] DEBUG - [Transcode] MDE: Lucy (2014): media must be transcoded in order to use the hls protocol
  • Note Plex addon on Kodi has better support for subtitles and audio in general [10].
  • Invalid Keep transcoding AC3 media.
  • Does not seem to be the case in our DVD tests. The delay is due to something else.
  • Issue Transcoding quality is quite bad even though quality is set to maxium (using Shield TV Pro for transcoding)
  • In the dashboard, we see that often times the bitrate is quite low (1Mb, sometimes less, or a small 2Mb). Why can't we boost the quality of the transcode to the max (say 4Mb)? Disabling HW support does not change much on this.
  • Workaround Ghost in the Shell (Ghost in a Shell.m4v, HEVC, AAC LC, VOBSUB), transcode when enabling subtitles.
  • Known issue, due to MP4 container.

Reset / Retore Plex Server on NVIDIA Shield

+ Reference: Reddit post

This might be necessary if the Plex Media Server on the NVIDIA Shield refuses to start (eg. after a Shield FW upgrade).

Clear data and/or cache
  • This steps is necessary to recover the PMS app.
  • In Shield settings, clear the Plex app cache (NOT THE DATA), and the PMS app data (note that PMS is a system app).
Restore PMS backup
  • In Plex app, wait for PMS server to restart, and move the PMS storage location to user accessible internal storage.
  • Then In Nvidia shield storage settings, enable file transfer via network.
  • Also, stop the PMS server by forcing a stop (note that PMS is a system app).
  • From remote PC, go to smb://xxx.xxx.xx.x/internal/Plex Media Server/Database Backups folder, if it exists (otherwise you don't have any backup). Copy the file there to another location.
  • Rename the latest backup files to have them look like:
  • com.plexapp.plugins.library.db
  • com.plexapp.plugins.library.blobs.db
  • Go to the PMS internal storage at //xxx.xxx.xx.x/internal/android/data/com.plexapp.mediaserver.smb/Plex Media Server/Plug-in Support/Databases (this requires to move the PMS storage location as said in the first step). Remove the files there, and copy there the two renamed files above.
  • Restart the Plex application (might also need to restart the Nvidia Shield), and wait for the PMS to restart.
  • Visit the PMS server on local network (http://xxx.xxx.xx.x/32400)
  • check that the libraries are restored.
  • trigger a refresh of all metadata to have all arts restored.

To Do

  • Done Shield TV - Play with Shield audio passthrough settings. See if that enables the direct play of AC3. — AC3 is supported wether HDMI passthrough is enabled or not.