Jellyfin Forum
remotely connected via openvpn - local but need it to be treated as remote - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: remotely connected via openvpn - local but need it to be treated as remote (/t-remotely-connected-via-openvpn-local-but-need-it-to-be-treated-as-remote)

Pages: 1 2 3


RE: remotely connected via openvpn - local but need it to be treated as remote - chenks - 2024-12-12

(2024-12-11, 05:11 PM)TheDreadPirate Wrote: You would need to put the nginx IP in "known proxies" in Jellyfin.

I don't think anything else is required in Nginx, but check out the Nginx Proxy Manger section of our Nginx docs.

https://jellyfin.org/docs/general/networking/nginx/

thanks, i'll make those changes.
in the nginx docs it says
Quote:In the "Advanced" tab, enter the following in "Custom Nginx Configuration". This is optional, but recommended if you intend to make Jellyfin accessible outside of your home.
, which i have done, however within nginx it says
Quote:Please note, that any add_header or set_header directives added here will not be used by nginx. You will have to add a custom location '/' and add the header in the custom config there.
so it looks like what is recommended to be added would be ignored by nginx.

not sure if the nginx jellyfin doc is out of date in relation to nginx or not.


RE: remotely connected via openvpn - local but need it to be treated as remote - chenks - 2024-12-12

just tested it again and it's still direct playing when i'm connecting remotely (ie over a 5G mobile connection).
i checked the dashboard and playback was direct and untouched even though i've set remote streaming bitrate to limit to 8Mbps - the content i was playing is a full BRRIP with a bitrate way in excess of that (media info reports the file bitrate at 83Mbps)


RE: remotely connected via openvpn - local but need it to be treated as remote - TheDreadPirate - 2024-12-12

Can you share your jellyfin log via pastebin?

And updating the Nginx Proxy Manager section is on my to-do list.  Upside-down-face


RE: remotely connected via openvpn - local but need it to be treated as remote - chenks - 2024-12-12

(2024-12-12, 01:57 PM)TheDreadPirate Wrote: Can you share your jellyfin log via pastebin?

which specigic log?

[Image: Screenshot-2024-12-12-140607.png]


RE: remotely connected via openvpn - local but need it to be treated as remote - TheDreadPirate - 2024-12-12

jellyfin20241212


RE: remotely connected via openvpn - local but need it to be treated as remote - chenks - 2024-12-12

(2024-12-12, 02:36 PM)TheDreadPirate Wrote: jellyfin20241212

https://pastebin.com/mn4KmRqH

i attempted to play Back To The Future at around 14:00 from an iPhone using Infuse when connected to 5G mobile.
that file is a full BRRIP with a bitrate of around 83Mbps. i have internet streaming set to limit to 8Mbps


RE: remotely connected via openvpn - local but need it to be treated as remote - TheDreadPirate - 2024-12-12

What IP did you put in Known Proxies? 192.168.50.106?


RE: remotely connected via openvpn - local but need it to be treated as remote - chenks - 2024-12-12

(2024-12-12, 02:55 PM)TheDreadPirate Wrote: What IP did you put in Known Proxies?  192.168.50.106?

no, 192.168.50.17 which is the IP of nginx

192.168.50.106 is the IP of my laptop that i'm logged into jellyfin on to access the dashboard etc.

[Image: Screenshot-2024-12-12-145916.png]


RE: remotely connected via openvpn - local but need it to be treated as remote - TheDreadPirate - 2024-12-12

Ok. So this 141. address is your cellphone? I see the connection and I see Infuse report that playback stopped. I don't see the logs saying it started, which includes determination whether the client is local or not and whether to transcode.

I don't have any Apple devices and have never used Infuse. But I am interpreting the logs as Infuse directly accessing the media, perhaps via the "download" endpoint instead of the playback endpoints. This means there are no checks for "locality", no application of bit rate controls, no checks for client compatibility and transcoding.

If you used Swiftfin or Jellyfin Mobile, it should properly apply bit rate controls.


RE: remotely connected via openvpn - local but need it to be treated as remote - chenks - 2024-12-12

(2024-12-12, 03:08 PM)TheDreadPirate Wrote: Ok.  So this 141. address is your cellphone?  I see the connection and I see Infuse report that playback stopped.  I don't see the logs saying it started, which includes determination whether the client is local or not and whether to transcode..
[/quote

yes it would be, as all my local IPs start 192.168.50.x

[quote="TheDreadPirate" pid='45683' dateline='1734016108']
I don't have any Apple devices and have never used Infuse.  But I am interpreting the logs as Infuse directly accessing the media, perhaps via the "download" endpoint instead of the playback endpoints.  This means there are no checks for "locality", no application of bit rate controls, no checks for client compatibility and transcoding.

If you used Swiftfin or Jellyfin Mobile, it should properly apply bit rate controls.

i'll try swiftin or jellyfin mobile, but those apps are pretty poor, hence why using Infuse which is a very feature rich client app for apple devices, which has support for direct access to Plex, Emby and Jellyfin servers.

i can also ask the Infuse developers which endpoint the app is using.

when playing it via Swiftin remotely, the logs still don't show any "playback started" log entry, but the first entry is "playback stopped" even though the content is still playing.
the dashboard does not say it's converting as the bitrate exceeds the limit.

Code:
[color=#000000]:58.606 +00:00] [INF] Authentication request for "chenks" has succeeded.
[2024-12-12 15:13:58.606 +00:00] [INF] Current/Max sessions for user "chenks": 1/0
[2024-12-12 15:13:58.606 +00:00] [INF] Creating new access token for user 94d20caf-7f8a-4367-ae58-11702556debd
[2024-12-12 15:14:51.675 +00:00] [INF] User policy for "chenks". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2024-12-12 15:14:51.675 +00:00] [INF] RemoteClientBitrateLimit: 8000000, RemoteIP: "141.101.98.214", IsInLocalNetwork: False
[2024-12-12 15:14:51.826 +00:00] [INF] Playback stopped reported by app "Swiftfin iOS" "1.2" playing "Back to the Future". Stopped at "0" ms
[2024-12-12 15:14:52.816 +00:00] [INF] Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2024-12-12 15:14:52.824 +00:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -f matroska -init_hw_device vaapi=va:,vendor_id=0x8086,driver=iHD -init_hw_device qsv=qs@va -init_hw_device opencl=ocl@va -filter_hw_device qs -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i file:\"/mnt/media/Movies/Back to the Future (1985)/Back to the Future (1985).mkv\" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -preset veryfast -b:v 7360000 -maxrate 7360000 -bufsize 14720000 -g:v:0 72 -keyint_min:v:0 72 -vf \"setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,scale_vaapi=w=1920:h=1080:extra_hw_frames=24,procamp_vaapi=b=16,tonemap_vaapi=format=nv12:p=bt709:t=bt709:m=bt709:extra_hw_frames=32,hwmap=derive_device=qsv,format=qsv\" -codec:a:0 libfdk_aac -ac 6 -ab 640000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename \"14a05f554eb22bd78129ef5c0d6e6ba1-1.mp4\" -start_number 0 -hls_segment_filename \"/var/cache/jellyfin/transcodes/14a05f554eb22bd78129ef5c0d6e6ba1%d.mp4\" -hls_playlist_type vod -hls_list_size 0 -y \"/var/cache/jellyfin/transcodes/14a05f554eb22bd78129ef5c0d6e6ba1.m3u8\""
[2024-12-12 15:14:57.581 +00:00] [INF] WS "192.168.50.106" request[/color]

edit - so i then tested using swiftin with the device connected to home wifi, and it still wants to transcode down to 8Mbps as it thinks it's remote, when it isn't.
I assume this is because, even when at home, the client is connecting using the domain URL and not the local IP of the jellyfin server, so it's routing thru nginx and deeming it remote when it's really local?