Jump to content

Roku struggles to playback (or load library) over LAN when VPN is on


Recommended Posts

Stargrazer82301
Posted

Had this problem for a few months now, and it's very very vexing!

I have a Windows PC as my Emby server, and use a Roku stick as our main way of watching media from that server, over our LAN. Both the Roku and the PC are connected to the same router over the same WiFi network.

However, when I have a VPN enabled on the PC, the Emby app on the Roku struggles with playback (I also get this same problem when trying to play over Chromecast, too). Media will often play for a few seconds, then hang for a period, then play a few more seconds. Sometimes media won't play at all. Often, the Roku app won't even be able to view the Emby library at all; I'll just see the loading wheel.

This doesn't happen all the time when the VPN is enabled. Sometimes media plays fine. Sometimes playback struggles, but works okay if I lower the playback quality considerably. It seems to act as though like the network speed is just very very slow. But it isn't; the WiFi is fast, and the problem persists even if nothing else is using the network at all (ie, no downloads, no streaming, no anything on any other device). I have port forwarding set up on my router, as per the standard Emby instructions.

However, if I disable the VPN, it works fine! I find this very confusing, given that Emby should be operating purely over the LAN. I have tried two different VPN services (NordVPN and ExpressVPN), and get the exact same problem with each. I have tried enabling split tunnelling, etc, in the VPN apps, so that Emby should even be able to use the VPN, but this makes no difference.

I have attached logs for a particular occasion when I had the problem this morning, at about 10:53. In this instance, the Roku app wasn't even able to load the Emby library to browse my media.

embyserver.txt embyserver-63836330832.txt hardware_detection-63836330850.txt

Posted

Hi.  You say you have these issues on the other apps too, not just the Roku?

Stargrazer82301
Posted

Hi! Yes, I also have this problem when trying to play to Chomecast (from both the Android and iOS apps for Emby) when the VPN is on.

Stargrazer82301
Posted

To update: I have attached below the log from an attempt to connect to Emby just now, via Roku and via android app, and in both cases it wasn't even able to load the library when the server was connected to VPN. This happened at about 17:02-17:05. Then, when I disconnected the VPN, the Roku was immediately able to connect, no problems, at 17:06-17:07 (ish).

Another note: Often, when the connection issues arise, the Roku app forces us to re-log-in to the server.

embyserver.txt

Posted

Hi, maybe you need to connect using a different address when the vpn is active?

Stargrazer82301
Posted

According to the dashboard page on my Emby server, the LAN IP address (192.168.1.24:8096) is identical, regardless of whether the VPN is on or not when I check.

Posted
10 hours ago, Stargrazer82301 said:

According to the dashboard page on my Emby server

Right, but maybe the server is not able to discover the IP needed for your VPN...

Posted (edited)

Detected local ip addresses: 192.168.1.24, 2601:14d:4a00:1b70:110f:617c:e03a:558a, 2601:14d:4a00:1b70:7566:83a7:1ab7:6423, fe80::4df2:cc55:fe28:cfe7%5, 100.64.100.6, 127.0.0.1, fe80::6562:d309:1db:7a78%24, ::1

Force emby to use only your local IP - dashboard > server > network > local ip address

Enter 192.168.1.24

then restart emby

Emby should then only 'listen' on 192.168.1.24 - (it will ignore the VPN - 100.64.100.6 - which is the local VPN adapter)

--

If you want emby to actually use the VPN itself - then you probably need to start messing with routing/metrics to give routing priority to the LAN (as there is no routing on a lan on the same network/subnet) but generally out the box, that is how it should be anyway.    try a 'route print' from a command box - a lower value means it has preference.

Edited by rbjtech
  • Thanks 1
Posted

Please let us know if this helps.

Stargrazer82301
Posted

I'll let you know. I implemented the change, and a quick test playback worked smoothy. However, the problem is intermittent, and only happens ~50% of the time. If we go a few days without the problem coming back, then I'll post here to update.

  • Like 1
  • Thanks 1
Stargrazer82301
Posted

Okay, time for an update. The problem still persists. After some trial and error, it seems that it's qBittorrent that's causing the problem. When it's running, the connection has the problems. When I quit it, the problems go away. Oddly, even if there are no downloads of any kind in progress, the problems still happen.

  • Thanks 1
Posted

Thanks for reporting back.

pwhodges
Posted

Is qBittorrent using a port which conflicts with Emby?

Paul

Stargrazer82301
Posted

Not as far as I can tell. Both Emby and qBittorrent has ports explicitly assigned, and they are different ports. I have tried changing Emby to use different ports, to no effect. I have tried enabling and disabling port forwarding on my router, and it makes no difference.

Posted

2023-11-23 10:54:46.445 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 1 - Failed
2023-11-23 10:54:46.445 Error App: Error in ffprobe

You have these errors all over in your server log. Is one of your Emby library pointed towards your downloads folder? Where it can get fed incomplete downloads and stumble over the broken files? It almost appears like your problem is the fact Emby is transcoding these and when the VPN is running it takes resources away from the transcoding causing your issue?

Are all your libraries working? I would think the reason Emby is appearing broken isn't really because of the bandwidth but the CPU cycles. If you fix the problems noted in your LOG and move the once completed files from your download folder into the appropriate library you will not have incomplete files messing up your library. That is likely the cause of all your problems.

Stargrazer82301
Posted

Sorry, I'm travelling for work ATM and haven't had a chance to test. But one of the folders Emby monitors is indeed one that partial downloads go into. I will remove it as soon as I return, and see if that helps! Because I never try to watch partially-downloaded files, it (perhaps foolishly) hadn't occurred to me that that might cause a problem.

Posted

Please let us know if this helps. Thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...