Seeking advice: what is at fault for dvr recording dropped frames, stuttering, pixelization?

Server Version#:1.18.xxx (latest) but also prior versions
Player Version#: latest but also prior versions

My configuration:
Plex server and player running on Nvidia Shield 16GB with attached 2Tb Western Digital Passport usb 3.0 drive and an Hauppauge WinTV-Dual HD tuner. Shield direct connected to internet router (not wireless)

I primarily use my Plex/Shield as a DVR. Over the past year I have been using it I have consistently had problems with the following:
a) partial or dropped recordings – seemingly plex having trouble acquiring an available tuner. Seems more likely to happen if 2 recordings start at the same time.
b) pixelation, dropped frames, garbled audio, stuttering in recordings typically in the last 5-10 minutes of a program. I.e. most of the recording/playback is fine except near the end. Note: this is in the recording/file itself not a playback issue. Also, it is not an antenna/transmission problem as a secondary recorder (non-plex/shield) records these programs fine.

Logs don’t seem to provide any hints as to what is going on.

Anyone have opinions or advice on whether one or all of the components in my system is the culprit?

I.e. was the Hauppuage tuner a bad choice? Do those using HDHomeRun have any similar problems? Do others using Hauppuage seeing these types of problems?

Or is it possible that the WD Passport drive becomes a bottleneck and a faster drive might fix it?

Or is the Shield not really up to the task (though it seems to be for most cases).

Or is Plex somehow part of the problem?

In general I have been happy with Plex particularly since the releases over the summer addressed many common glitches and I am hopeful the knowledge base out there will have some suggestions/answers for me.

I’m sorry nobody replied. Although I don’t use your setup, I can answer a couple of your questions.

If Plex is recording pixelation, dropped frames, and garbled audio fairly consistently in the last part of your recordings, then I’m going to guess that it’s receiving the video that way. If your logs are free of significant ERRORs then start swapping out hardware starting at the Hauppauge. If they let you call them up, ask them about it. Maybe see if there’s a diagnostics program for it.

I recently had a user where the log said Plex was marking their HDHomerun as a dead device, and it turned out to be the hardware.

Because Hauppauge has been around for 20 years making tuners, I would trust them to make great things and stand behind them.

When you said you had an external USB drive that might cause problems spinning up from sleep, but not garbled video and audio.

Shields are decent. They have enough horsepower to not stutter.

Plex could be at fault but not likely from the symptoms. You could get some debug logs if you want me to have a look. I would be scanning for words like

error
fail
exception
sqlite3

Here is an update of what I have tried/learned so far. Note: I have the benefit of having 2 identical systems: i.e. 2 shields each with the same hauppage tuner and same model external hard drive. Problem is/was occurring consistently on only 1 of these units. These units as well as an old DTVDVR Pal are all al colocated and split off the same antenna. I almost never get any pixelation on the DTVDRV (it also has 2 tuners builtin) and is basically 100% reliable. One plex/shield will occasionally have pixelation issues while the other has pretty consistently been having issues all fall particularly when recording 2 shows at once.

  1. First attempted fix: I added a distribution amplifier to boost the signal as it was split across devices. This significantly reduced the random pixelation throughout recordings but had no effect on the pixelation, dropped frames, etc that starts in the last 3-5 minutes of a recording and occurs in 10-15 second intervals. Potential lesson learned: The Hauppauge tuners aren’t as sensitive as that in the DTVPal or TV and though receiving a strong signal are helped by a signal boost when on a split line.

  2. To see if the tuner was causing the problems I was getting at the end of recordings I swapped the tuners between the two Shields (remember one worked okay while the other didn’t). This had no effect. After the swap the Shield having the problem continued to have the problem while the other didn’t. Potential Lesson learned: It isn’t the tuner.

  3. Because I use my Shields/Plex pretty exclusively as a DVR, the “bad” PMS is different from the good one in that it has recorded at least twice as many shows over the course of last year and hence had many shows deleted after they were watched. I moved the external drive to my PC and checked its health. It was heavily fragmented. I defragmented the disk earlier in the week. And in the first experiment I ran yesterday didn’t have a problem. I also noticed that Skip ahead 30 seconds and FF seemingly happen much faster then before though obviously a limited test case.

Is it possible that a heavily fragmented external hard drive will run into performance bottlenecks when recording 2 shows at the same time and then gearing up to start 2 more right after these shows end? Is this a possible cause of my problems in the last few minutes of a show? In my case its too early to tell but I would like to hear others experiences?

Any chance the Plex team could add support to occasionally defragment a drive especially on the Shield as it would be nice of this is the problem that the drive just be kept healthy vs having to shut things down for a day so I can defrag on a PC.

Great job doing the hardware swap and narrowing down the issue. Are you still of the mind that fragmentation was the cause? I could understand dropped frames, but it didn’t occur to me that the system would lower the bit rate if the drive couldn’t keep up.

It might help to know that a hard drive will not drop data because it is fragmented, it will write whatever data is passed to it, if heavily fragmented it will just take a bit longer.

Plex will allocate itself a buffer in memory to receive the TV data to smooth out and cope with delays writing the data to the disk, but this buffer isn’t an unlimited size, especially given the memory available on the Nvidia Shield, so if you get more data arriving in the buffer faster than it is being emptied you get what is called a buffer overflow and so data gets lost.

I don’t know how Plex decides on the size of buffer to allocate itself, it might ask the operating system how much memory is free and then decide, if this is the case, unless both the Nvidia Shields have been reset to factory defaults and then have exactly the same software re-instated, each box may have a difference in how much free memory there is. You might be able to see this under the system information. The bad box might simply have less memory for the buffer. Defragmenting the hard-drive may appear to help in this case if it speeds things up a bit, but the problem may just return or not be resolved fully.

Also networking issues can cause dropped packets, if they are Wi-Fi connected, that could easily see one box having a better signal than the other. If they are hard-wired on Ethernet, then swapping cables around might help for testing, as a faulty Ethernet cable could see packets dropping, despite appearing to working all okay.

Hope that helps.

I agree with you both that defragmentation is likely treating a symptom rather than the cause of the problem. It sounds more reasonable that Plex is unable to either fill or pull from the buffer (or something else in its pipeline of work taking the tuner data and writing it to disk untranscoded) because it is busy dong something else. Fragmentation was something that was identifiable and fixable by me and seems to clearly be part of the bottleneck that was preventing Plex from running smoothly as it got busier. On the Plex side I don’t see any logging or other tools that let’s me figure out what and how it is getting resource constrained when this situation arises. If anyone knows of any or has ideas please let me know. If the Plex team is following this maybe you can consider adding additional logging information that can provide more insight in a future release?

Finally, though I do not know how to determine if there is difference in buffer/memory sizes on the 2 Shields they should be close if not the same. Both machine are running the same version of Shield/Android software and Plex/Plex Media Server. Both have had no additional apps (other than those preinstalled) installed on them.

So for now I will occasionally defragment my drives and hope that treating the symptom reduces/eliminates my problems. I am using Western Digital Elements 2TB drives. If anyone knows similar non-SSD drives that are USB powered that yield much better rad/write performance please let me know as I might consider swapping to that instead.

I think those drives should be plenty fast enough fragmented or not. It might help to reformat them with a largest allocation/block size you can.

I’ve been using a fairly sedate 2TB Seagate laptop drive for some time, and many occasions it has been recording 4 TV channels simultaneously and it works perfectly (although this isn’t using Plex and is on a Windows PC), but shows the hard-drive shouldn’t be an issue.

The problem on the SHIELD is you seem limited in what you can observe during processing particularly in resource use. As I said I was able to swap tuners to rule them out. And I was able to determine one disk was more fragmented than the other. Beyond that I seem limited to the debug logs which I find largely indecipherable and doesn’t seem to contain this type of information.

If you have thoughts on what the issue(s) might be and/or additional steps I can use to determine from a resource standpoint what is going on internally please let me know.

By the way when I defragmented the drive I did a full defrag, one that co-located file blocks and consolidated all blocks to the start of the drive. However I didn’t check what the default block size was and so I could investigate further whether I can use a larger block size and whether it helps.

When I look at the WD Passport USB 3.0 online, they look like they have no power supply, and they get power from the port. I would try adding a VAVA USB-C hub in the chain so that power is not drawn from the Shield. I would also try an SSD drive, even a thumb drive, to show whether the problem occurs on a different piece of hardware. I’d also investigate whether the WD Passport has some internal settings that are default but not good for a server, settings like sleep that you need their WD Utilities to adjust.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.