If there is not enough bandwidth to direct play, then why doesn’t it fall back to transcoding to a bit rate below the stream limit?
I had set my limit to 8Mbps, but users are reporting errors when trying to play back certain content.
I then instructed them to set the limit on end, but it ended up with the same result. To fix this issue I had to remove the limit, since it’s not falling back to transcoding.
That is from the client’s side, which device are you using to playback the media? check the settings on that client, maybe it’s set on “Direct Play Only” or something similar.
Well it happened for 2 different people, and neither are tech savvy, so they don’t really touch settings. I’ve got PlexPy going, so I can see their histories, and they both have played back content that was transcoded, so I don’t see it being from forced direct play. I removed the limit and no one has complained since.
One guy is using a Fire Stick, and the other was a samsung galaxy tab3.
When your force direct play, it’s possible it can’t play so it will fall back to transcoding, but it’s possible the fallback doesn’t take into account the server limit so it ends up requesting a transcode at the original bitrate which is higher than the limit so the server stops. Was the bitrate shown in PlexPy for when transcoded videos were played by your users higher than 8 Mbps?
I will try some testing to see if this is the case.
@MovieFan.Plex said:
When your force direct play, it’s possible it can’t play so it will fall back to transcoding, but it’s possible the fallback doesn’t take into account the server limit so it ends up requesting a transcode at the original bitrate which is higher than the limit so the server stops. Was the bitrate shown in PlexPy for when transcoded videos were played by your users higher than 8 Mbps?
I will try some testing to see if this is the case.
I looked back through the PlexPy history of one of the users that was having issues, and almost all the content they watched that transcoded was under 8Mbps. I’m not sure how long the stream limit was a feature, but I probably only have had it set for a month or 2.
The one movie this person was trying to watch at the time the limit was enabled direct played at <5Mbps after the limit was removed, even though the screen cap in my first post was saying it needs 9282kbps. Here’s the media info from that file:
! Media
!
! Video Resolution 1080p
! Duration 1:28:29
! Bitrate 4691 kbps
! Width 1920
! Height 1080
! Aspect Ratio 1.78
! Container MP4
! Video Frame Rate PAL
! Web Optimized No
! Audio Profile lc
! Has 64bit Offsets 0
! Video Profile high
! Part
!
! Duration 1:28:29
! File ____________.(2016).mp4
! Size 2.90 GB
! Audio Profile lc
! Container MP4
! Has 64bit Offsets 0
! Web Optimized No
! Video Profile high
! Codec H264
! Bitrate 4500 kbps
! Bit Depth 8
! CABAC true
! Chroma Subsampling 4:2:0
! Duration 1:28:29
! Frame Rate 25 fps
! Frame Rate Mode cfr
! Height 1080
! Level 4.1
! Pixel Format yuv420p
! Profile high
! Ref Frames 4
! Scan Type progressive
! Stream Identifier 1
! Width 1920
! Codec AAC
! Channels Stereo
! Bitrate 224 kbps
! Bitrate Mode CBR
! Duration 1:28:29
! Profile lc
! Sampling Rate 48000 Hz
! Stream Identifier 2
This “Deep Analysis” for files is automatically performed by your server as part of the regular nightly maintenance period.
Note: If the deep analysis for a file hasn’t yet been performed, your Plex Media Server will assume a [2 x average bitrate] value if it’s needed for streaming limitation calculations.
But this is a old file, and should have had deep analysis done automatically… if it’s working correctly. And it seems it’s not working correctly on my server, or something else is wrong. As the bitrate of the movie is 4691kbps, and when the limit was set it was saying it needs 9382kbps, which is exactly 2x the actual bitrate. So that is one issue, the other is that it didn’t fallback to transcode below the limit.
Sorry. I forgot you can get that from the Get Info page. That is a summary, the XML has info that is more informative.
I got the XML you sent. Now, according to that, although the average bitrate reported by the file is ~4 Mbps, Plex’s analysis of the file reported that the file actually needs a much higher bitrate setting (the number on your screen) to playback properly. I’m not sure what the expected behavior is when the bitrate limit in PMS is higher then that average reported bitrate, but lower than the needed bitrate determined by PMS.
Is it possible that the calculated bitrate from Plex analysis is not accurate, or hasn’t been done?
The reason I ask is that it is exactly 2x the bitrate reported by the file: 4691 x 2 = 9382 and the Plex Guide page says it uses the 2x multiplier if analysis hasn’t been done. It just seems ironic that it’s exactly 2x.
The odd thing is that your XML shows the analysis was done, but none of the values is 9382, so something isn’t right. The only thing I can think, although not sure, is if the user is using an old version of the Plex client that doesn’t support streaming brain, so it’s requesting the default instead of the analyzed values.
I was wondering if client app versions might come into play as well. As amazon is pretty slow with their updates (for Fire TV devices, ect), and the galaxy tab 3 is pretty old now, so not sure what versions of android it has, ect.
There is an issue with the current released versions of the server when it comes to reading the deep analysis data (that will be fixed in an upcoming version) and you are likely hitting this issue. As a result it is falling back to the 2 * bitrate estimate.
MovieFan.Plex did share the XML with me, and in examining it, I discovered that if it were reading the deep analysis data correctly, it would conclude that the bitrate needed to direct play this file is actually quite high. This file would appear to have a low average bitrate but it appears to spike quite high in some locations. Mentioned in the link you provided earlier is how a client’s buffer affects the bitrate required, and so if the client’s buffer were 5MB, then it’d need 39.8Mbps to direct play. Even with a client buffer of 500MB (assuming the client knew this and told the server that it had such a large buffer), it’d still need 9Mbps to direct play.
Guys, thanks for looking into this! Hopefully it gets fixed, and works as intended in the future.
The file in question is 2.9GB in file size, and not something I’d consider high quality or high bitrate.
Is it common for the average bit rate reported by the file to differ greatly from Plex’s deep analysis? If so, then wouldn’t it be better to just go by the average, and then the server admin just factor in some tolerance into their limit, when setting stream limits, to account for peaks in playback? What are the chances of multiples streams all hitting peak bitrate at the same time, exceeding your bandwidth… it doesn’t seem too likely.
For testing/troublingshooting, if you guys want to remote in, would like access to my plex server, or would like the file, let me know.
Is it common for the average bit rate reported by the file to differ greatly from Plex’s deep analysis? If so, then wouldn’t it be better to just go by the average, and then the server admin just factor in some tolerance into their limit, when setting stream limits, to account for peaks in playback? What are the chances of multiples streams all hitting peak bitrate at the same time, exceeding your bandwidth… it doesn’t seem too likely.
In the case of this file, it peaks up at nearly 40Mbps where as the average is under 5Mbps. If a server with this file were on a network with an upstream limit of 20Mbps, it would see no issue with streaming using the average bitrate but the client will have to pause to re-buffer every single time. The average bitrate is so horribly inaccurate that it borders on useless. This is exactly why the deep analysis exists.