Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Bug: Plex App does not buffer, does not load more than a few megabytes of the video at a time.

MrTempleMrTemple Members, Plex Pass Posts: 35 Plex Pass
edited June 28 in Apple TV

Edit: I'm bumping this response to the very top of this post. This is not a network issue, it is a PMS buffer issue.

@bryananderson said:
figured I would run nload (network load) on my PMS, so you can visually see the buffering behavior. Same 1080p high bitrate movie used in all tests. You can see the Plex client on ATV gets small chunks of the stream in bursts then sits idle, whereas all other clients get a steady stream.

Apple TV - Plex Client:

Apple TV - VLC Client using Plex DLNA Server:

Apple TV - Infuse Client using Plex DLNA Server:

Mac - Plex Media Player:

Since everyone is blaming the native player, I figured I would try playing the same file on the ATV via iTunes Home Sharing. If you can make it out, the transfer rate is higher (similar to the max value of the ATV Plex Client), but there is no idle time.

Native Client - iTunes Home Sharing:

@bryananderson said:
Amazon Fire TV (2nd Gen) on wired connection, playing the same bitstream as the other examples:


Original Post continues below:

I'm breaking out this discussion into a new thread. The other thread about the bug's symptoms was perhaps masking the real issue.

This is definitely an issue with Plex. It used to be an issue with both Homesharing via the Computer app in tvOS 9.0 and Plex, but now it is only happening in Plex. I've been tracking it down and think I've got it reproducible. (See below for details on my environment.)

Bug: Plex App Doesn't Buffer

The core problem is that Plex does not buffer the content on the ATV. This was the same problem that used to occur when watching a video via Homesharing, but in tvOS 9.1, you can watch as the whole movie gets buffered.

I'm monitoring network traffic from the Mac my Plex server is on, and while the movie is playing, Plex is intermittently uploading to the ATV. It uploads in small chunks. 1-4mbps for a second or two, then nothing for a while.

If I pause the movie, all uploading stops. That shouldn't be. It should keep uploading. This is the core problem. Plex never tries to buffer the movie, only ever grabbing the next 10-20mb.

Intermittent Stuttering Symptom of the No-Buffering Bug

Really the above is a bug in itself, and should be enough to reproduce and implement a fix, but I'll go further into the details of the symptoms, which are highly variable due to a large number of influences (media location, server state, network latency, etc).

The most commonly reported symptom of this problem is intermittent stuttering. I've been able to track down how to make this occur.

Under my setup, many movies play fine. I generally rip my own media with quality settings very similar to people like YIFY at 1080p. So, I'm playing 2h h264 movies which are under 2GB in size (and thus pretty low bitrate).

However, if it is an exceedingly complex scene in the movie, and the variable bitrate goes above a certain threshold, Plex has to grab its 10-20mb chunks more frequently. When this magic threshold is reached, it can take longer to get the next 'chunk' than the previous chunk takes to play, thus you get stuttering or pausing of the movie while the next chunk loads.

A variety of factors affect how long it takes to grab the next chunk, and depending on the bitrate of the movie at the given moment, there may be stuttering when all of the factors line up, or when just a few of them line up.

In my testing, the stuttering occurs on my movies when the Mac hosting the Plex server is asleep AND the bitrate on the movies I'm watching jumps above a certain threshold. When I wake the Mac, it must shave a second or two off the time to load the media (hosted on a networked drive, see below), and this is typically enough to load the next chunk before the previous finishes playing (even in scenes of high visual complexity). Often, Plex gets through a movie fine, even when the Mac is asleep, but when bitrate climbs above the sleeping Mac's response-latency (which is variable of course), stuttering occurs.

For example, I can reliably reproduce stuttering while watching Star Wars Episode II (Don't judge, I'm rewatching the prequels after reading about Mike Klimo's prequel Ring Theory. Spoiler, I think Klimo is guilty of selection bias, choosing only the myriad references to the OT that fit his theory.).

I've got a ~2.0GB x264 in m4v file, and the film plays well, even with the Mac asleep, but around about the 16min mark, when the speeder chase scene kicks off, it starts to stutter, to stop and try to load every 10-15 seconds (spinning wheel, sometimes with the audio progressing, often not).

If I wake the Mac, this scene progresses without any trouble. However, I have experienced stuttering due to no buffering on other movies, even when I forced my Mac not to sleep (one of the first things I tried, which didn't fix the problem on that movie, likely because the overall bitrate, or perhaps just the bitrate spikes, was still too high).

Also, even if I wait for it to load (which often takes way too long, as if the stuttering confuses the server, causing it to lose its place), and even if I get say a minute of the scene to play, if I rewind and try to watch that minute again, the stuttering still occurs (it's not only not pre-buffering, it's not buffering the content already streamed to the ATV).

So, reproduce away, but really, all that needs to be done is to reproduce the fact that the Plex ATV app is not trying to buffer the content. Once that's fixed, all the stuttering will go away.

Environment

Plex Server: 0.9.15.1
Plex Server OS: 10.11.2
Plex tvOS App: 1.04
(All up to date as of this writing.)

Movies are shared off the network drive connected to my Mac. ATV is connected via ethernet to Airport Extreme. Mac is connected to same AE via 802.11ac, Tx rate is 750-900 Mbps (hold option while clicking the wifi icon on the Mac's menubar). My network is fast and has no interference. It easily sustains dozens and dozens of times the bitrate of the videos I'm trying to play (I'm in a rural setting with no neighbour networks). This setup has worked flawlessly on the ATV1-3, and after tvOS 9.1 now that it buffers, works flawlessly under Homesharing on the ATV4. The only app that's having the issue now is Plex, simply because it doesn't try to buffer the video.).

«13456713

Comments

  • MuskehoundMuskehound Members, Plex Pass Posts: 22 Plex Pass

    Actually came here to ask about ATV buffering, as I'm remote to my server and if I can pause the movie for 10 minutes at the start to avoid pauses that'd be great. Looks like that should be possible soon then!

  • mschlotzmschlotz Members, Plex Pass Posts: 191 Plex Pass

    Yup, this describes to a tee what I've been experiencing. I've seen stuttering with both small and larger files i.e. 2Gb to 8Gb. BTW: the max frame rates on all these .m4a files is <9800kbps

  • MrTempleMrTemple Members, Plex Pass Posts: 35 Plex Pass

    Any thoughts from the devs as to whether this is something that might change?

  • pjvpjv Members, Plex Pass Posts: 95 Plex Pass
    edited January 2016

    What he said. Now try it when you are remote from your plex server and your latency is longish and your combined bandwidth is at best 2X the bitrate of what you are trying to play, but varies a lot so that for some periods of time the bandwidth is less than the bitrate.

    In this scenario (which is my scenario), the lack of continuous buffering is a showstopper (er... pun intended, i guess).

    I have an ATV3 sitting next to the ATV4. I have PlexConnect on the ATV3. During rough bandwidth times, I can start a media stream on the ATV3, pause it and go make a sandwich for 5 minutes while the buffer is filling, and then I'm able to watch it uninterrupted while I stuff my face. I can't do anything like that with Plex on the ATV4. Not only does it not buffer at all while paused, there is also no good indication of when it is buffering - only a very bad one. The ATV3 player progressively fills in the timeline bar on the bottom of the screen to indicate how much data is in the buffer - that knowledge gives me the freedom to let my life flow on. Plex on the ATV4, with its completely user opaque buffer, uses the amazingly retarded UI of overlaying a spinner in the middle of the screen on top of media that is playing! For me to tell if the app is actually buffering, and how much, I have to pull up my router's web server on my iPad and watch the real-time bandwidth graph. Are you kidding me? And if, say, I might prefer not to watch the show I am trying to watch with a spinner overlaid on top of it you might think I should just pause the playback. Right, but then there is no data streaming to the player. So there is no choice other than to watch the video with the F-ing spinner on top of it. Every time I see that stupid spinner on top of something I am watching I get mad at the dev who thought that was a good idea.

    I'm pretty sure that the devs consider the streaming in small chunks and non-buffering while the video is paused to be features and not bugs. Under perfect conditions, that would certainly be a more efficient way to stream video. It's a JIT streaming architecture. That coupled with the spinner showing up on top of playing video while the player is background buffering makes me think that the app was designed, developed, and tested only under perfect network conditions with no thought at all about, AND NO TESTING under, real-world conditions of varying latency and bandwidth.

    Dear Plex, please require at least one of your ATV devs to develop and test with a remote server and downstream bandwidth of 2-4mbps. I'm sure that experience will make the app more usable for everyone.

    P.S. When in doubt, just do whatever the hell Netflix is doing. It is absolutely astonishing how many bits Netflix can reliably stuff down my little pipe. No matter how slow my overall bandwidth seems at any given time, Netflix is 100% able to stream HD video to the ATV4.

  • snorlaxsnorlax Members, Plex Pass Posts: 59 Plex Pass

    Just wait for the next release: this must be something they have in mind now then everyone is complaining about it ;)

  • mic jmic j Members Posts: 4 ✭✭

    Wonder if this is the source of the problem I am having? Trying to play a BR rip of LOTR-EE and getting a lot of stutter, buffer and some slight video tearing. For me, what's the point of using Plex if it won't smoothly play my uncompressed BR rips.?

    I should mention that my media is stored on a HDD attached to an AEBS(n). All units (server, AEBS and aTV in same room, so my wifi is very strong. Also, this particular media has DTS audio, so some transcoding is going on.

  • eyeballtickler7eyeballtickler7 Members, Plex Pass Posts: 153 Plex Pass

    I'm experiencing this issue with Direct Play MP4 files. Video is H264, audio is AAC.

    Interestingly, transcoded content plays fine without buffering.

  • AndyFechiAndyFechi Members Posts: 1

    Same here, tried everything, no subs, low res, ethernet only, short files, long filles buffering for a while (?) but, it's not a Recipie some times works, but not all the time, so i think, the problem must be in the video file, too complicated to transcode maybe? no, tried that too. Until i read this thread. This is the thing. Plex it's just not buffering on ATV4. Every other app buffers, i was going insane until i found this, now it makes sense.

    Please Guys, love the app, i can't recomend plex with my friends like this! jeje.

  • MrTempleMrTemple Members, Plex Pass Posts: 35 Plex Pass

    Would love if the devs could weigh in on this issue.

    I shouldn't think pre-buffering the whole video (especially if it needs no transcoding) would be difficult at all. Since the ATV player can do it natively, it's probably a simple change to how the player is invoked.

  • MrTempleMrTemple Members, Plex Pass Posts: 35 Plex Pass

    This change is likely a one-line of code change, to use the built-in tvOS media streaming call that pre-buffers the content versus the built-in call that does no buffering at all.

    My movies require no transcoding, so there's no reason they can't be pre-buffered.

    Worse, when movies DO require transcoding there IS a buffering setting.

    Stupid that we'd be getting better performance on files that need transcoding.

  • MrTempleMrTemple Members, Plex Pass Posts: 35 Plex Pass

    So is this being investigated at all? Is this even on anybody's radar?

    Buffering solves lots of issues with streaming that are being reported repeatedly. Probably why most streaming implementations over the past two decades have featured more than a 3-5second buffer.

  • arobe79arobe79 Members, Plex Pass Posts: 230 Plex Pass
    edited April 2016

    This is what is happening here. https://forums.plex.tv/discussion/212889/your-connection-to-the-server-is-not-fast-enough-to-stream-this-video-check-your-network#latest
    A better buffering solution would fix this issue. If only I knew how to code. Bring on the Plex dev geniuses.

    Plex Media Server Intel G540 CPU 2.50 GHZ 2M CACHE 2.5 2 LGA 1155 Processor, Windows 10, Apple TV 4 X 2, iOS

     

  • arobe79arobe79 Members, Plex Pass Posts: 230 Plex Pass

    Has anyone had any breakthroughs with this?

    Plex Media Server Intel G540 CPU 2.50 GHZ 2M CACHE 2.5 2 LGA 1155 Processor, Windows 10, Apple TV 4 X 2, iOS

     

  • techguy888techguy888 Members Posts: 70 ✭✭

    @arobe79 said:
    This is what is happening here. https://forums.plex.tv/discussion/212889/your-connection-to-the-server-is-not-fast-enough-to-stream-this-video-check-your-network#latest
    A better buffering solution would fix this issue. If only I knew how to code. Bring on the Plex dev geniuses.

    Precisely my suspicion as well.

  • arobe79arobe79 Members, Plex Pass Posts: 230 Plex Pass

    Does Plex need to do something with the app to take advantage of the most recent fixes in tvos? These same issues were occurring with the home share app according to the apple support forums but was resolved with the most recent tvos update. Right about the time our Plex issues began.

    Plex Media Server Intel G540 CPU 2.50 GHZ 2M CACHE 2.5 2 LGA 1155 Processor, Windows 10, Apple TV 4 X 2, iOS

     

  • Wildcat_1Wildcat_1 Members, Plex Pass Posts: 134 Plex Pass

    I am seeing the exact same issues here and it seems highly likely to be the Plex tvOS app this point. Same as all of you, have a variety of file types but a lot of movies that should direct play. When they do show as Direct Play on the server view shouldn't be any issue but they continually and randomly buffer. Every other device I use (iOS, OS X etc) have no issues playing the same file and even air playing to the ATV 4 from the same back end source (all files on a QNAP NAS). Similarly using things like Plex Connect in the past to the same backend source never had issues but now I get the Server is not fast enough errors on occasion and the buffering problems.

    Would love to see this addressed and fixed as it is extremely frustrating. The only other way (other than what has been mentioned) to workaround this is to force an optimized version of the file which seems strange as that is also Direct Play.

    Hope we can get a fix to the issues ASAP

  • MrTempleMrTemple Members, Plex Pass Posts: 35 Plex Pass

    At this point, I'm just hoping for the developers to even acknowledge the issue.

    I'd bet a year's worth of Plex Pass that this is a trivial fix, likely by simply changing which api call used by the video player.

  • birger_bbirger_b Members, Plex Pass Posts: 2 Plex Pass

    Hi, I just wanted to say I have exactly the same problem. The AppleTV is on a line that delivers 8-22 mbit and can be a bit unstable so I've throttled the ATV at 2 mbit. However without any buffering, the constant stuttering becomes unbearable. I very much look forward to Plex fixing this bug. The Apple TV 4 and the Plex app are 6 months old now, but the Plex app remains unusable.

  • BastardSheepBastardSheep Members, Plex Pass Posts: 291 Plex Pass

    @MrTemple I've seen a few threads around the place where a dev jumps in directly and a fix is done by the next update a week or so later (along with numerous other bugfixes I hadn't seen threads on - but then I don't read all threads). I get the distinct impression they are reading these threads. The lack of comment in here suggests to me it isn't such a trivial issue.

  • pjvpjv Members, Plex Pass Posts: 95 Plex Pass

    I'm pretty sure that none of the ATV app developers are seeing this issue on their own setups so every single report of buffering problems is being silently marked as "works for me" in their heads. I've looked through all of the buffering-problem-related threads for the ATV app (and there are a lot of them and quite a few different people participating, so some flavor of this issue is affecting enough people that it is a real thing) and I have not seen a single post in any of those threads from anyone at Plex.

    At this point it would feel like a small miracle if one of you official guys would at least say something like: "yeah, we hear you, but we aren't seeing the problem so we can't fix it."

«13456713
Sign In or Register to comment.