When viewing certain recorded programmes on my Apple TV (4th gen), Plex playback is freezing the video often.
I had been running the latest public 1.12 version for some time and today installed the latest beta 1.13.0.5003 as I saw there were some improvements concerning transcoding and codecs.
However, the upgrade to 1.13 made no difference.
The CPU load is well below 20% and 15% of memory is used when I did the last test. During the test I noticed the following issues:
after pressing play the image immediately freezes whilst the audio is playing for about 18 sec
at around 35 sec there is a brief moment where the video freezes
at 2:04 you see some rendering artefacts
at 2:28 the video freezes briefly
at 2:36 there is the most noticeable issue as the video freezes util about 2:44
at 3:16 there are some rendering artefacts for a few secs
I have attached XML of the programme and a zip of my logs. The test starts a few secs after 17:19 UK time (GMT+1).
One thing I noticed with the new beta version is that this in the Plex Medi Server log:
Plex Media Server.log:May 06, 2018 17:19:08.449 [0x7fd73b047700] DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Plex Media Server.log:May 06, 2018 17:19:08.450 [0x7fd73b047700] DEBUG - TPU: hardware transcoding: final decoder: , final encoder:
Whereas with 1.12 I see this in the logs:
Plex Media Server.4.log:May 05, 2018 23:41:57.662 [0x7fbd170e9700] DEBUG - TPU: hardware transcoding: using hardware decode accelerator vaapi
Plex Media Server.4.log:May 05, 2018 23:41:57.663 [0x7fbd170e9700] DEBUG - TPU: hardware transcoding: zero-copy support present
Plex Media Server.4.log:May 05, 2018 23:41:57.663 [0x7fbd170e9700] DEBUG - TPU: hardware transcoding: not using zero-copy because video is interlaced
Plex Media Server.4.log:May 05, 2018 23:41:57.663 [0x7fbd170e9700] DEBUG - TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Only when I reduce the home streaming quality to 4 Mbps, 720p does the reporting play without the issues; CPU load increases at that point noticeably but still keeps well below 50%.
I’ve just tried watching the same programme with the Apple TV Plex player set to 20 Mbps, 1080p and it plays fine without freezes. FYI, the test I performed at 17:19 was with the quality setting set ti Original.
I’ve attached log of the latest test, which was at mourned 20:15 UK time.
Now I can see this in the Plex Media Server log:
Plex Media Server.log:May 06, 2018 20:14:08.631 [0x7fd740fff700] DEBUG - TPU: hardware transcoding: using hardware decode accelerator vaapi
Plex Media Server.log:May 06, 2018 20:14:08.632 [0x7fd740fff700] DEBUG - TPU: hardware transcoding: zero-copy support present
Plex Media Server.log:May 06, 2018 20:14:08.632 [0x7fd740fff700] DEBUG - TPU: hardware transcoding: not using zero-copy because video is interlaced
Plex Media Server.log:May 06, 2018 20:14:08.632 [0x7fd740fff700] DEBUG - TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
I just checked my Apple TV settings and found that I doesn’t have a setting for 1080i - there’s a 1080p 50Hz and 1080p 60Hz.
I also checked the spec of my TV and found that it supports 1080i and 1080p.
The setting on the Apple TV was 1080p 50Hz and I changed it to 1080p 60Hz just to see if it made any difference, but when watching the problematic programme it still failed to play properly.
The Plex app has to rely on the native Apple TV and therefore is not able to handle interlaced without transcoding it on the server first and that leads to the issue of your NAS not being able to keep up due to it’s lack of CPU power and so on.
This is what must be happening. Plex tries to transcode the programme from 1080i to 1080p on my NAS since the header has that “interlaced” tag set and Apple TV can only play 1080p.
I understand now that the real issue the fact that my TV recordings are coming in as 1080i (interlaced) and therefore it has to be transcoded by software rather than hardware. What I don’t understand though is what determines if something can be transcoded by hardware what can’t. Is the fact that the deinterlacing can’t be done by hardware a limitation of Plex, my Synology DS718+ NAS, or both?
One way around it is to pre-transcode the recordings. The best way to do this automatically would be to setup an optimisation task on my TV library. However, this raises a new issue. My recordings always default to the audio with audio transcription. That means any new recordings would be transcribed with the audio transcription.
Is there a way to trigger the optimisation from the command line and add a parameter for the audio?
I played around with some of the command line tools but can’t get them tot work, e.g.
admin@mySynology:/volume1/@appstore/Plex Media Server$ ./Plex\ Media\ Scanner --tree --file "/volume1/media/tv-archive/Have I Got a Bit More News for You (2010)/Season 55/Have I Got a Bit More News for You (2007) - S55E04 - Episode 4.ts"
./Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /volume1/@appstore/Plex Media Server/libavcodec.so.58)
./Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /volume1/@appstore/Plex Media Server/libavcodec.so.58)
./Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /volume1/@appstore/Plex Media Server/libavutil.so.56)
./Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /volume1/@appstore/Plex Media Server/libavutil.so.56)
./Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /volume1/@appstore/Plex Media Server/libgnsdk_dsp.so.3.07.7)
./Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /volume1/@appstore/Plex Media Server/libgnsdk_dsp.so.3.07.7)
./Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /volume1/@appstore/Plex Media Server/libgnsdk_fp.so.3.07.7)
./Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /volume1/@appstore/Plex Media Server/libgnsdk_fp.so.3.07.7)
Error: Invalid item list.
My primary use for Plex is as a DVR for TV programmes. I hardly ever watch live TV.
I see what you’re saying about using a Mac/PC but I’d rather do all the processing on my NAS even if it takes longer. I might record 1 or 2 programmes a night which should give my NAS plenty of time to pre-transcode them. I also would like to have this done automatically, but right now I can’t use the automation by triggering the optimisation from the TV library as this would transcode it with the wrong audio (with audio description). That’s why I’m looking at the command line option. Even better would be to be able to set a default audio in Plex (see https://forums.plex.tv/discussion/245220/default-language-by-library-and-series#latest).
BTW, I’m already using Infuse as this is the only way to watch programmes that haven’t been pre-transcoded, but the UI isn’t as good as the Plex one although i do like the genre section in Infuse…
I have a 718+, but not Apple TV. Have you enabled the Plex server setting for “Use hardware acceleration when available” (settings, server, transcoder, advanced)?
With that setting enabled, my Nvidea Shield never burps when watching either live or recorded shows.
Everything is configured as it should be. The problem is that the programmes are coming in as 1080i and the Apple TV can only do 1080p; therefore, the NAS must transcode but it cannot do it using the hardware transcoder because de-interlacing cannot be done by hardware.
WTF - my NAS is doing some serious indexing with CPU load close to 100% for hours, at the same time, I am recording 2 HD programs using Plex DVR, doing some pre-transcoding of HD programmes, and now I’m watching a 1080i program and it plays smoothly on my Apple TV:
Has DSM updated since you installed 1.13.0 ? If so, you’ve been caught by what we all get caught by. Synology erases the Plex rules.
Fear not:
Install the SPK and reinstall fixes it for all versions prior to 1.13.1
In 1.13.1, You now only need restart PMS and it will fix itself. It took me some doing to work that magic but it’s done. You can see it in the release notes (#8402)
Hi Chuck - I think you misunderstood; I was asking how my NAS could manage to stream an interlaced HD programme to my Apple TV without problems when at the same time the CPU was being hammered by
indexding
2 HD programmes being recorded
a HD programme was being optimised, i.e. de-interlaced and transcoded
Here is a graph showing the load history of the CPU:
The red line shows roughly where I started watching the programme (about 21:30). As you can see the CPU has been working at near 100% for hours due to the indexing.
My understanding was that de-interlacing cannot be done by hardware and therefore I am surprised that my DS was able to stream the interlaced programme to my Apple TV as Direct Stream:
scanType="interlaced"
I thought this was not possible.
BTW, my DS was last updated over a month ago. Since then, I have installed Plex many times. I last upgraded to 1.13.0 on 10 MAY.
I use the AppleTV 4K (5th generation) but believe my method also works for the 4th generation as well.
Infuse Pro 5 app on the AppleTV. (it does cost a few $$ but is the premier player for ATV)
Have it connect to your Plex server just like you would any player app.
Now you can play through it with the following benefits:
A. All the metadata is cached locally from PMS
B. It is a DirectPlay client to Plex
C. The 4K model does 4K -> 2K in-the-box transcoding and is flawless.
D. It does all the deinterlacing in-the-box.
Summary: Your NAS goes back to being a NAS with Plex serving up media and metadata while it does all the work.
Thanks for checking @trumpy81 - when I was looking at the log I could only see that Direct Play wasn’t happening when at the same time my screenshot showed that it was:
May 15, 2018 21:31:47.685 [0x7fc471a23700] DEBUG - MDE: E2 - Episode Two: no direct play video profile exists for http/mpegts/h264
May 15, 2018 21:31:47.687 [0x7fc471a23700] DEBUG - Streaming Resource: Reached Decision id=190 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. No direct play video profile exists for protocol http, with container mpegts, and video codec h264. Transcode=1001,Direct play not available; Conversion OK.) media=(id=190 part=(id=191 decision=transcode container=mpegts protocol=hls streams=(Video=(id=526 decision=copy width=1920 height=1080) Audio=(id=528 decision=copy channels=2 rate=48000))))
May 15, 2018 21:31:47.740 [0x7fc4861a1700] DEBUG - MDE: E2 - Episode Two: Direct Play is disabled
May 15, 2018 21:31:47.740 [0x7fc4861a1700] DEBUG - MDE: E2 - Episode Two: media must be transcoded in order to use the hls protocol
May 15, 2018 21:31:47.740 [0x7fc4861a1700] DEBUG - MDE: E2 - Episode Two: no direct play video profile exists for http/mpegts/h264
May 15, 2018 21:31:47.740 [0x7fc4861a1700] DEBUG - MDE: E2 - Episode Two: no direct play video profile exists for http/mpegts/h264/ac3
May 15, 2018 21:31:47.741 [0x7fc4861a1700] DEBUG - Streaming Resource: Reached Decision id=190 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=190 part=(id=191 decision=transcode container=mpegts protocol=hls streams=(Video=(id=526 decision=copy width=1920 height=1080) Audio=(id=528 decision=copy channels=2 rate=48000))))
Where do you see in the log that direct play is active?