Jellyfin Forum
Tailscale and Audio Stutters - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Networking & Access (https://forum.jellyfin.org/f-networking-access)
+---- Thread: Tailscale and Audio Stutters (/t-tailscale-and-audio-stutters)



Tailscale and Audio Stutters - PSYDUCK - 2024-08-27

I've got a small Jellyfin server (i5-9400, 8GB RAM, Win 10 - Media on a NAS via SMB) that work perfectly locally however when accessing remotely via Tailscale (As I Have Starlink) I'm getting random streaming issues. Typically every 20 minutes, Audio will stop for a minute or two - then keep playing. Issue is the Server/Network and not the client, as it will follow different clients (Jellyfin, Finamp, Symfonium) on different devices (Phone, Laptop).  Resource usage on the server appears to be fine.

The correlating Log entry:

Code:
[2024-08-27 15:43:34.380 +10:00] [ERR] [37] Rssdp.Infrastructure.SsdpCommunicationsServer: Error sending socket message from "10.137.250.47" to "239.255.255.250:1900"
System.Net.Sockets.SocketException (10049): The requested address is not valid in its context.
  at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
  at Rssdp.Infrastructure.SsdpCommunicationsServer.SendFromSocket(Socket socket, Byte[] messageData, IPEndPoint destination, CancellationToken cancellationToken)

This will just fill the log when audio playback has stopped, unsure if this is affecting video playback as I don't stream videos remotely.  This error also appears at sporadic moments randomly that don't affect playback, I'm guessing the track is buffered as this only appear to happen in the first 30 seconds of a song. All my media is FLAC, to my knowledge it's not transcoding as I don't have any correlating FFMPEG Logs.


RE: Tailscale and Audio Stutters - TheDreadPirate - 2024-08-27

Starlink uses CGNAT, right? Your options are limited. IIRC, the users here behind a CGNAT had to run a reverse proxy and Wireguard server in a VPS. Then setup the Jellyfin server as a Wireguard client.

Having the Wireguard server on a static IP with the VPS and the CGNAT'd Jellyfin server as the Wireguard client made their connection much more stable for remote clients.


RE: Tailscale and Audio Stutters - PSYDUCK - 2024-08-27

Appreciate the response - I may have to give that a go. Starlink does use CGNAT I'm afraid!

I have numerous other services running over the Tailscale VPN Without issue, however they probably aren't as sensitive to packet loss. I'm no Dev but I did some quick research on that specific error, it seems to be generated when an outgoing port cannot be bound to an IP address supplied, I.E If the Tailscale NIC on the server disconnects for whatever reason. I'll pay more attention to the Tailscale Logs at the same time as the dropouts to see if I can correlate any issues with Tailscale. To my knowledge Tailscale uses Wireguard technology so in theory should be working without issue. I guess the key difference here is I'm not running my own Reverse Proxy & Wireguard instance.


RE: Tailscale and Audio Stutters - TheDreadPirate - 2024-08-27

IIRC, the default behavior for Tailscale is P2P, right? You'd have to setup a spoke and hub configuration, if that's possible with Tailscale, so that the VPS is always the entry point for Jellyfin. The theory is that the Wireguard client running on the Jellyfin server (behind CGNAT) always has a stable target to send media to with the static IP'd VPS. Any shifting in the Starlink connection should be handled more gracefully when it is the client because of this.