Jellyfin Forum
remote access openvpn - 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: remote access openvpn (/t-remote-access-openvpn)



remote access openvpn - brun2025 - 2025-04-21

Hello I am experiencing video playback issues while accessing jellyfin remotely, no issues with playback on home network ,detailed below are a couple of cases and related logs


VIDEO PLAYBACK:
I noticed the following while trying to playback media which results in "Play Back Error : There was an error processing the request. Please try again later"

Code:
[2025-04-21 16:49:53.472 -04:00] [INF] [47] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.66.66.2" request
[2025-04-21 16:50:09.496 -04:00] [ERR] [47] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate". URL "POST" "/Items/d67b61b3f60269436b2a1a0512706a9b/PlaybackInfo".
[2025-04-21 16:50:25.273 -04:00] [WRN] [47] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "10.66.66.2" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake."


MUSIC PLAYBACK:

However, in the case of music the audio files load and playback without any issues

Code:
[2025-04-21 17:13:26.675 -04:00] [INF] [10] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.66.66.2" request
[2025-04-21 17:13:36.212 -04:00] [INF] [37] Jellyfin.Api.Controllers.UniversalAudioController: GetPostedPlaybackInfo profile: DeviceProfile { Name: null, Id: null, MaxStreamingBitrate: 8000000, MaxStaticBitrate: 8000000, MusicStreamingTranscodingBitrate: 128000, MaxStaticMusicBitrate: 8000000, DirectPlayProfiles: [DirectPlayProfile { Container: "opus", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webm", AudioCodec: "opus", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "ts", AudioCodec: "mp3", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "mp3", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "aac", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "m4a", AudioCodec: "aac", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "m4b", AudioCodec: "aac", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "flac", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webma", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webm", AudioCodec: "webma", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "wav", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "ogg", AudioCodec: null, VideoCodec: null, Type: Audio }], TranscodingProfiles: [TranscodingProfile { Container: "mp4", Type: Audio, VideoCodec: "", AudioCodec: "aac", Protocol: hls, EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: null, MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False, Conditions: [], EnableAudioVbrEncoding: True }], ContainerProfiles: [], CodecProfiles: [], SubtitleProfiles: [] }
[2025-04-21 17:13:36.213 -04:00] [INF] [37] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "admin". EnableAudioPlaybackTranscoding: True
[2025-04-21 17:13:36.271 -04:00] [INF] [37] Jellyfin.Api.Controllers.UniversalAudioController: GetPostedPlaybackInfo profile: DeviceProfile { Name: null, Id: null, MaxStreamingBitrate: 8000000, MaxStaticBitrate: 8000000, MusicStreamingTranscodingBitrate: 128000, MaxStaticMusicBitrate: 8000000, DirectPlayProfiles: [DirectPlayProfile { Container: "opus", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webm", AudioCodec: "opus", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "ts", AudioCodec: "mp3", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "mp3", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "aac", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "m4a", AudioCodec: "aac", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "m4b", AudioCodec: "aac", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "flac", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webma", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webm", AudioCodec: "webma", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "wav", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "ogg", AudioCodec: null, VideoCodec: null, Type: Audio }], TranscodingProfiles: [TranscodingProfile { Container: "mp4", Type: Audio, VideoCodec: "", AudioCodec: "aac", Protocol: hls, EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: null, MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False, Conditions: [], EnableAudioVbrEncoding: True }], ContainerProfiles: [], CodecProfiles: [], SubtitleProfiles: [] }
[2025-04-21 17:13:36.273 -04:00] [INF] [37] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "admin". EnableAudioPlaybackTranscoding: True
[2025-04-21 17:13:42.927 -04:00] [ERR] [10] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate". URL "POST" "/Sessions/Playing".

DIRECT STREAM PLAYBACK:

If I copy the stream url from the app and paste it into VLC, i am able to play it backĀ 

Has anyone else experienced this type of behavior and can suggest a potential fix or how to troubleshoot it further?


RE: remote access openvpn - Duvel - 2025-04-22

you should post some info about your openvpn config, and the bitrate of the videos you are streaming.
Is the openvpn installed on your main router or another device ??
It looks like it can't handle encryption fast enough when transferring high volumes.
Consider also doing a test with lower bitrate when watching a movie, which would give more hints about that issue


RE: remote access openvpn - brun2025 - 2025-04-22

i am running openvpn on my pfsense firewall with the following settings:

Mode: Remote Access ( SSL/TLS + User Auth )
Data Ciphers: AES-256-GCM, AES-128-GCM, CHACHA20-POLY1305, AES-256-CBC
Digest: SHA256
D-H Params: 2048 bits

i was trying to stream a h265 encoded media with usually gets transcoded via intel quick sync (jellyfin docker container in truenas I5-7400, 19.5GB RAM, 120GB SATA SSD Boot Drive)

I will try a lower level of encryption first, then lower bitrate file, and/or a combination of the two


RE: remote access openvpn - Duvel - 2025-04-22

You are lucky, I am the the happy owner of a pfSense firewall too, and configured for OpenVPN :-D
So I can further help you to debug this if needed.

Do you have a chip on the hardware that can be used to accelerate encryption?
https://docs.netgate.com/pfsense/en/latest/hardware/cryptographic-accelerators.html

I dont. I have an 10yo old watchguard device that works pretty well, but I never tried to stream a movie through the VPN, no use for my case.

Really the first thing I would test at your place is just change the quality (ie bitrate) of the movie in the web client to the lower one (420 kbps) and see if that works. and if yes you pretty much have the answer on why it is failing with higher quality.

You should also check your pfsense CPU usage when streaming through the VPN with various bitrates, and check the openvpn logs in Status > System Logs, there should obviously be some hints lying there, of your previous failed attempts.