Server Version#: 1.17.0.1709
Player Version#: Chromecast WANPlex Media Server.2.log (10.0 MB)
Hello everyone!
I am a first-time poster and hoping I don’t make too many mistakes in my attempt to get help.
Recently, I have attempted to get my library to stream from an external address but the end result is always a video of constantly buffering no matter what quality I select. The upload server-side is 32 Mbps - 40 Mbps depending on the day and the client-side has an 80 Mbps to 94 Mbps download, depending on the day. The router on the server-side is running SQM Cake/Piece of Cake set to 90% my total bandwidth.
I have UPnP enabled on my OpenWRT router just to be sure plex is not being blocked. “Canyouseeme” illustrates all ports Plex usually use to be open and the same is true for Synology Router configuration tool, all ports are marked as open. Plex server shows a green checkmark next to remote access as well.
Other troubleshooting steps taken were to attempt to run Plex Server on my desktop (7700k Win10 Pro) and again all remote attempts result in endless buffering. When streaming locally, DS918+ easily handles many hardware transcoding streams and direct streams. The issue only arises when attempting to stream remotely.
If anyone has any clue what can be going on or can offer the right direction in where to look, I’d greatly appreciate it. Thank you all for your time.
Server Logs were included and remote streams start at line 27,474
Bandwidth calculations must account for the overhead of TCP/IP and PMS itself in your total upload rate.
If your upload is 100 Mbps, take that 100 and divide by 1.20 (the overhead of TCP/IP + Plex)
This leaves you with 83.3 Mbps of payload (Audio + Video) bitrate usable.
Provided your payload does not exceed that 83.3 Mbps upload, there will be no buffering beyond the initial transcoding(if any) and buffer loading and there is low latency between the server and remote client.
If I’m understanding you correctly, it looks as if my connection isn’t good enough to stream? I’ve attempted to try 20mbps and 8 Mbps but it does the same endless buffering.
When I download a file from my nas over wan from the location I’m attempting to stream to it downloads at 4.2 MB/s.
The back-and-forth communication of streaming is a strange animal. Each block of data has to be requested (a “transaction”). Each transaction is a Request message (with TCP/IP ACK packet being sent) and then the reply (which also send back an ACK packet to the server. The latency between the two endpoints is what gets us.
Downloading behaves differently. HTTPS downloading allows for, and is designed to, allow ACK packets from your computer to arrive well after extra packets have been sent. This is asynchronous (full duplex) operation where both running free from the other.
Plex’s video streaming sends a block and then waits for the client to acknowledge that block before sending the next. This induces a bit of latency.
Now, the biggest latency issue: ISP -> ISP latency.
One Moderator here has 1Gb down, 40 Mbps up. I have 45 Mpbs down, 2.5 up.
I cannot download a file from him at more than about 7 Mbps due to ISP-ISP communication over the backbone.
The best next step for you is to conduct a relatively simple test.
Get the program iperf3.
Load it on a system on each end (yours and the remote)
Start one as the server (better if you do that since you are usually in the Server role)
Let the remote test the pure bandwidth between you two.
To show you what you should see, please consider what I get when testing between workstation and NAS (5 Gbps link)
OK! Will do! Just bare with me a second while I get something that can run it from the remote location. My girlfriend isn’t tech savvy (the place I want to stream to) and my buddy is out of state for a couple days.
At 20:32:40 we can see Newuser request a 720p at the remote location taking shape:
At 20:32:44 we can see Failed to stream media, Connection reset by peer
Then the transcoder session stops, then starts, then another peer reset.
The cycle repeats till they give up. So I guess it’s the player?
A 720p video requires less than 6 Mbps.
The user has 25 Mbps of bandwidth.
Below we see the details.
Sep 22, 2019 20:32:40.194 [0x7fa1fa797700] DEBUG - Auth: authenticated user 21243433 as NewUser
Sep 22, 2019 20:32:40.194 [0x7fa1f8cea700] DEBUG - Request: [172.117.132.49:48166 (WAN)] GET /video/:/transcode/universal/decision?audioBoost=100&autoAdjustQuality=1&directPlay=0&directStream=1&directStreamAudio=1&fastSeek=1&hasMDE=1&location=wan&maxVideoBitrate=1500&mediaBufferSize=74944&mediaIndex=0&partIndex=0&path=%2Flibrary%2Fmetadata%2F4168&protocol=*&session=770d38f6d2274b03-com-plexapp-android&subtitleSize=100&videoBitrate=1500&videoQuality=60&videoResolution=3840x2160 (16 live) TLS GZIP Signed-in Token (NewUser)
Sep 22, 2019 20:32:40.195 [0x7fa1f8cea700] DEBUG - Found session GUID of 770d38f6d2274b03-com-plexapp-android in session start.
Sep 22, 2019 20:32:40.216 [0x7fa1f8cea700] DEBUG - Streaming Resource: Reducing playback quality for 1428kbps stream bitrate: video resolution to 720x406, audio channels to 2, quality to 20, disable video DS as 30925kbps is > the 1290kbps available, disable audio DS as 639kbps is > the 128kbps available
Here the first segment of the transcoded stream is requested
Sep 22, 2019 20:32:43.334 [0x7fa16d9e9700] DEBUG - Request: [172.117.132.49:48178 (WAN)] GET /video/:/transcode/universal/session/770d38f6d2274b03-com-plexapp-android/base/00000.ts (25 live) TLS Signed-in
Sep 22, 2019 20:32:43.334 [0x7fa16d9e9700] DEBUG - Asked for segment 0 from session.
Sep 22, 2019 20:32:43.334 [0x7fa16d9e9700] DEBUG - Returning segment 0 from session
Sep 22, 2019 20:32:43.334 [0x7fa16d9e9700] DEBUG - Content-Length of /volume2/Plex/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-770d38f6d2274b03-com-plexapp-android-a6a14e33-b7d5-452b-a5d5-644301452820/media-00000.ts is 379948 (of total: 379948).
But then it dies with Failed To Stream Media
Sep 22, 2019 20:32:44.218 [0x7fa1d3d11700] DEBUG - Streaming Resource: Estimated bandwidth for 770d38f6d2274b03-com-plexapp-android to be 3343kbps over 0.88s
Sep 22, 2019 20:32:44.380 [0x7fa1fa797700] DEBUG - Failed to stream media, client probably disconnected after 98304 bytes: 104 - Connection reset by peer
Sep 22, 2019 20:32:44.380 [0x7fa1fa797700] DEBUG - Completed after connection close: [172.117.132.49:48178] 200 GET /video/:/transcode/universal/session/770d38f6d2274b03-com-plexapp-android/base/00000.ts (25 live) TLS 1045ms 98304 bytes (pipelined: 1)
Sep 22, 2019 20:32:44.380 [0x7fa1fa797700] DEBUG - Removed transcode data consumer, active count 2 => 1
Sep 22, 2019 20:32:44.387 [0x7fa1fa4a9700] DEBUG - Failed to stream media, client probably disconnected after 98304 bytes: 104 - Connection reset by peer
Sep 22, 2019 20:32:44.387 [0x7fa1fa4a9700] DEBUG - Completed after connection close: [172.117.132.49:48184] 200 GET /video/:/transcode/universal/session/770d38f6d2274b03-com-plexapp-android/base/00001.ts (24 live) TLS 426ms 98304 bytes (pipelined: 1)
Sep 22, 2019 20:32:44.388 [0x7fa1fa4a9700] DEBUG - Removed transcode data consumer, active count 1 => 0
And this is a list of all those reset by peer messages:
Sep 22, 2019 20:32:44.380 [0x7fa1fa797700] DEBUG - Failed to stream media, client probably disconnected after 98304 bytes: 104 - Connection reset by peer
Sep 22, 2019 20:32:44.387 [0x7fa1fa4a9700] DEBUG - Failed to stream media, client probably disconnected after 98304 bytes: 104 - Connection reset by peer
Sep 22, 2019 20:33:17.396 [0x7fa1fa797700] DEBUG - Failed to stream media, client probably disconnected after 675448 bytes: 104 - Connection reset by peer
Sep 22, 2019 20:33:17.411 [0x7fa1fa797700] DEBUG - Failed to stream media, client probably disconnected after 122768 bytes: 104 - Connection reset by peer
Sep 22, 2019 20:43:52.395 [0x7fa1fa4a9700] DEBUG - Failed to stream media, client probably disconnected after 150070 bytes: 104 - Connection reset by peer
Sep 22, 2019 20:44:06.490 [0x7fa1fa797700] DEBUG - Failed to stream media, client probably disconnected after 81920 bytes: 104 - Connection reset by peer
Sep 22, 2019 20:44:06.500 [0x7fa1fa4a9700] DEBUG - Failed to stream media, client probably disconnected after 81920 bytes: 104 - Connection reset by peer
Sep 22, 2019 20:45:20.375 [0x7fa1fa4a9700] DEBUG - Failed to stream media, client probably disconnected after 61384 bytes: 104 - Connection reset by peer
Sep 22, 2019 20:55:12.154 [0x7fa1fa4a9700] DEBUG - Failed to stream media, client probably disconnected after 10881720 bytes: 104 - Connection reset by peer
Possible solutions to connection reset by peer:
Could you get us the player log in debug mode? At least we can add it to the evidence.
Can the remote user download the video like a desktop app or mobil can?
I’m not very versatile technically, but just a note to my linked topic here:
My problem only occurs when direct playing locally (WiFi).
Transcoding to whatever makes the videos play smooth.
The log texts, assuming no other errors in between those two datapoints,
At 20:32:40 we can see Newuser request a 720p at the remote location taking shape:
At 20:32:44 we can see Failed to stream media, Connection reset by peer
Tells me that the client app closed the connection. The connection, as seen from the server’s perspective, was closed by it’s peer (the client). This is how TCP works. When either side closes a connection, the other side (it’s peer) receives a notification. Plex is reporting this in the logs. Nothing to do with the router.
Is there anything else I can produce while to give more light to the issue? I know it was suggested I provide the logs from the Chromecast but I don’t know exactly how to do that.
To all, thank you so much for all your help. I’m starting to feel guilty taking so much of your time. Maybe streaming just won’t work for me lol oh well
So ChuckPA gave us the good news that you’re seeing normal network
behavior in your logs. Though it might have been covered, please describe
in detail the remote network and player chain, down to model numbers
of your hardware.
The website article on Chromecast streaming refers to limitations.
I went looking for a way to get log files but didn’t find one.
It’s the remote end that we have yet to explore fully.
What Chromecast model?
Where is Plex Media Player on the remote end? As I understand it, PMP is an standalone app for a desktop or laptop. If you first use PMP to cast to the Chromecast from a lap/desktop, let us know. If you use an Android phone to cast to the Chromecast, tell that or explain what I’m missing. I’m just trying to understand.
You tested with iperf3 your link from server to client, but you didn’t specify the client side hardware on which you installed iperf3. I doubt it was the chromecast. So was it on a laptop that was also using that WiFi?
The goal is to isolate the bottleneck. WiFi is the most susceptible when combined with certain Chromecast. Let us know more details if you like.
Chromecast is a second generation model (NC2-6A5) It is connected via WiFi at 325 Mbps Tx Rate and 433 Rx Rate.
There is a Chromecast App on phone that casts to TV Screen. Looking at network activity, it looks as if the Chrome cast connects directly to server and phone is just used to make selections (Network Activity via Andriod OS). I can’t verify this but it would make sense as the phone get’s extremely warm when casting what is on screen to TV and battery depletes extremely fast.
The iPerf3 test was done via my own laptop via WiFi in the same room the TV is in. I did not capture the link rate though…
Ok that’s good news. You might need a Chromecast Ultra though, based on the limitations mentioned by plex versus https://developers.google.com/cast/docs/media versus what you’re trying to send it. Because you’re not using an Ultra, there’s room for improvement to isolate the variables at your leisure.
Not that the link isn’t fast or that you can’t adjust the media to fit your v2.
Just thinking aloud.
If this ASUS is nothing more than a wireless AP, please so state.
Saying “router” without stating clearly conveys it’s not creating another subnet which isn’t correct because routers, by default, do create a subnet even in bridge mode if you’re not careful.
Ok?
With this topology in place, From wired LAN, through WRT and out modem is the problem or does the problem exist through the wireless point on the LAN ?
Hey Chuck, thanks for the reply again. However, I feel like we are going in circles lol
Yes, I did state that the Asus router was in AP mode with all routing services turned off. I made the declaration of calling it router because it was on the name of the model number. I was asked to provide model numbers by someone helping me earlier.
Also, I stated that it only happens in external streams. All my smart TVs and devices steam reliably on my LAN. I can do like 12 devices. Problem only occurs over wan.