Stuttering of video playback from DS918+

I recently picked up a DS918+, set up Plex, and began ripping my library of Blu-rays. I am currently ripping the movies with MakeMKV and leaving them untouched. I am attempting to view the movies on the Plex web client and an Apple TV 4K. For both clients I am experiencing consistent stuttering on some titles, and I am unable to figure out what is the cause. I’m currently using PMS 1.12.0.4829, Plex Web 3.37.2, and the latest tvOS (11.2 I believe).

When streaming on the Apple TV, Plex reports the video is a direct stream, and audio is transcoding DCA to AC3. For Plex Web, it’s direct stream video and transcoding DCA to AAC for audio. In both cases, the CPU utilization on the NAS is quite low; almost always <5%. This suggests, to me, that the video and audio stutter I’m experiencing are not due to a CPU bottleneck on the server.

Regarding the network, everything is wired together with gigabit cable, with a gigabit router and switch inbetween. I can transfer a 40 GB MKV from the machine running the Plex Web client to the NAS within a few minutes. I cannot easily run a speed test between the Apple TV and the NAS, but I am confident the network is not at fault here.

I downloaded the Plex server logs, but to be honest I’m not really sure what I’m looking for. I read in another thread here that this log line can sometimes be telling if the ‘speed=’ field is <1, but that’s not the case here.

Mar 11, 2018 17:21:42.152 [0xf1511b40] DEBUG - Completed: [127.0.0.1:56510] 206 PUT /video/:/transcode/session/369F5CC2-E3C8-42B2-B553-063A42883DD7/b781d1f2-73b5-4afc-89d2-a5b3e6731393/progress?progress=52.8&size=-22&remaining=100&speed=19.9 (12 live) 1ms 342 bytes

Other than that, all of the information I’ve found so far by Googling seems to suggest this is an issue with either a lack of CPU power or a network bottleneck, but neither seems to be the case here. I have not yet attempted to re-encode these files; I’d really prefer to avoid it if I can. Not all titles are experiencing this behavior; some movies play just fine under the same conditions (direct stream video, transcode DCA to AC3/AAC audio). The two movies I’ve been primarily testing with today are both H.264 video and DTS audio. One plays fine and the other does not. Both are untouched rips from MakeMKV.

Any ideas? I’d be happy to provide more logs or any other info if that will help.

Since you have the log ZIP file already handy, would you attach it here please with your next reply so I may look?

Also, if you Hover over the media you played, click the ellisis -> Get Info -> View XML, this will tell me everything PMS knows about your file. I will be able to trace what it did and why

Thanks for the response. I’ve attached the server logs and two XML files. 75.xml is a movie that is experiencing stuttering; 27.xml is a movie that is not.

There is absolutely nothing extreme about either video.
I see the transcoder running and converting at a rate 18x faster than needed for real-time playback. The slowest it gets is 12.2. This is excellent.

The ATV asks for the next segment and it’s returned in the same millisecond

Mar 11, 2018 17:52:54.545 [0xe4d11b40] DEBUG - Asked for segment 372 from session.
Mar 11, 2018 17:52:54.545 [0xf1223b40] DEBUG - Returning segment 372 from session: "/volume1/@appstore/Plex Media Server/Resources/black-h264.ts"

I concur with you the fault is not in PMS or the Synology. The only remaining parts are: a) network b) ATV c) The Plex app

I also own an ATV. Specifically , the ATV 4K (December 2017) with tvOS 11.2.6 and can throw much higher bit rates (60+) at it without issue.

This is a bit of a puzzle.

Want to do the stupid stuff and check the box? :slight_smile:

  1. restart everything
  2. Start playing lower bitrate files, increasing as you go, until you break it
  3. As soon as it stuters for the 2nd time, stop playback.
  4. Let it settle for 30 seconds. (clean up and flush logs)
  5. Gather a fresh ZIP file and attach it.

I will play around with it over the next 24 hours or so and report back with what I find.

I’m not sure if this helps at all, but interestingly the stutter points seem to be deterministically placed per client. That is, when playing back a problem movie on the Apple TV, it always stutters at the same points. If I seek around the movie (rather than always playing it from the beginning) the stutter points remain the same. The same can be said of the Plex Web client, although the stutter points differ from the Apple TV. When I play the MKV directly via VLC there is no issue, so this is not an apparent problem with the file.

Hopefully I will have more information tomorrow. Thank you for the help so far.

Interesting. Does it matter which content you’re playing?

It does matter. Let’s say I have movies A, B, and C. Movie A stutters, and will always stutter at the same points in time. Movie B stutters and is also consistent, but the stutter points are different from movie A. Movie C never stutters.

I just did some fiddling per your recommendations. I restarted the PMS service through the Synology DSM. I then restarted the Apple TV. I played a movie I knew to have issues and it was still having issues. I let it stutter a handful of times then grabbed the attached log dump. Here four movies and one TV show I was testing with, their bitrates, and whether they stutter.

Movie 1: 21205 kbps, never stutters
Movie 2: 27735 kbps, always stutters
Movie 3: 28111 kbps, always stutters
Movie 4: 27258 kbps, always stutters
Movie 5: 25441 kbps, never stutters
TV Show 1: 21569 kbps, always stutters

So it seems to me the issue is not tied to bitrate.

I’ve been using the term stutter, but using it two describe two things. One is an actual ~100ms stutter where it looks like a handful of frames were skipped, and the other is when I see one or two frames of what appear to be extremely heavy compression artifacts. The latter case seems to be more prominent around areas of the frame that are in motion. I can try to capture either or both of these in a video if that would be helpful.

From this point I can attempt to do a hard power cycle of everything involved, but if you can think of anything else that would be helpful please let me know.

Time out then.

If you’re calling Video artifacting due to the maturity level of the hardware GPU ‘stuttering’… there’s nothing we can do.
If it’s a defect in the file, respectfully, Your issue to resolve.

Not trying to point but You’re the first I’ve seen it stated this way by.
The trouble with this is none of the other players (decoders) have an ffmpeg core. They all have their own PLUS they then direct render instead of sending across the LAN.

I need to think about this a bit

You’ve lost me, unfortunately.

I mentioned earlier that I do not think this is due to a defect in the file. I can play all of the problem files directly via VLC just fine. No stuttering, no artifacting. Plus, the problems I am having manifest in different ways on different clients.

Apologies for using too broad a term earlier but I am experiencing both stuttering and artifacting in roughly equal proportions.

Regarding the GPU, the only GPU involved is on the client, right? It seems unlikely to me that both the Apple TV GPU and the GPU on my personal machine are having issues decoding H.264 video. But perhaps I’m misunderstanding what you mean.

the point i’m making about comparing VLC to Plex is that we can’t.

VLC reads the file, decodes the file, then draws each image on the glass.

PMS reads the file, decodes part of the file, changes the image stream if it must, changes the audio stream if it must, repackages all that to send to the Apple TV which then does another decode before drawing on the glass.

See the difference?

One is known as a ‘thick client’ (a smart player)
The other is known as Client-Server. The server does all the work and sends only a stream of pictures and audio to display & play

I’m looking at another user’s case and I wonder if it might apply here too.

Are you using multiple ethernet adapters plugged into your switch/router at the same time without any special networking?

The easy way to check is “Control Panel - Network - Network Interface”. Look at the IP addresses of each

See the difference?

I’ll admit that I don’t. Since the video is a direct stream in this case, it seems to me PMS is not doing any decoding of video. It’s just pulling the video stream out of the MKV container and repackaging it with the transcoded audio. So the video stream is being decoded in its entirety by the client. VLC and the Plex clients should be receiving identical video streams, shouldn’t they? You obviously know more about this than I do; I’m just trying to wrap my head around what’s happening here.

Anyway, regarding my network topology, everything in my house is connected to an unmanaged switch, which is then connected to a single router. The Apple TV is 192.168.1.182; the Synology is 192.168.1.179. Is that what you were looking for?

Most Synology units have 2 or 4 network adapters. How many do you have plugged in ?

Just the one.

Something else you should do:

Download PMS from plex.tv/downloads directly and get the 64 bit version. The 32 bit version you got from Synology is slower.

Mar 11, 2018 16:19:58.268 [0xf3111b40] INFO - Plex Media Server v1.12.0.4829-6de959918 - synology DiskStation i686 - build: linux-synology-i686 synology - GMT -04:00

I just updated per your suggestion.

Mar 11, 2018 22:58:21.755 [0x7ffada368700] INFO - Plex Media Server v1.12.0.4829-6de959918 - ubuntu PC x86_64 - build: linux-ubuntu-x86_64 synology - GMT -04:00

I restarted PMS manually after installing and am experiencing identical issues to before.

I’ve done a bit more fiddling over the past day and have not made a ton of progress. No amount of restarting of services or power cycling devices seems to help. However, I did change the settings on one particular problem movie on the Apple TV from “Play Original Quality” to “Convert Automatically” and it seems to dramatically cut down the frequency of hiccups and artifacts that I see. They are still there, but appear perhaps once per minute instead of every few seconds.

Plex shows this particular stream as “Transcoding H264 to H264” and “Transcoding DCA to AC3”. CPU on the server is sitting around 20-40% with occasional spikes to 90-100%.

Any other ideas to what is happening here?

Can you recreate and show me the new logs? I don’t know what ‘fiddling’ includes :slight_smile:

Sure thing; I’ve attached the latest log. I’ll “fiddle” more tomorrow and try to include some details of exactly what I did if that will help, along with the logs.

Thanks.

Looking at this entry

Mar 12, 2018 21:07:50.817 [0x7ffad93ff700] DEBUG - Streaming Resource: Estimated bandwidth for 8EE7469A-4CE3-4136-9CD8-2E495B49E9DA to be 105420kbps over 2.19s

Mar 12, 2018 21:07:50.817 [0x7ffad93ff700] DEBUG - Streaming Resource: Estimated bandwidth for 8EE7469A-4CE3-4136-9CD8-2E495B49E9DA to be 105420kbps over 2.19s

This doesn’t include the actual peaks or lulls. This is the average during that duration.

Followed by:

Mar 12, 2018 21:07:50.828 [0x7ffad0559700] DEBUG - Streaming Resource: Estimated bandwidth for 8EE7469A-4CE3-4136-9CD8-2E495B49E9DA to be 105306kbps over 2.20s

This is 103-105 Mbps.

Are you 100% certain you don’t have any 100 Mbps segments in your network? Some modem/routers/switches, while having gigabit interfaces can’t sustain it.
This is where my thinking is leaning.