Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto bandwidth selection is broken when connecting to a server on the same LAN #6535

Open
3 tasks done
felix920506 opened this issue Feb 19, 2025 · 5 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@felix920506
Copy link
Member

This issue respects the following points:

  • This issue is not already reported on GitHub (I've searched it).
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Describe the bug

When connecting to a server on the same LAN, the auto bandwidth is always 120mbps regardless of actual speed.
This can be problematic when using VPNs or on clients with bad Wifi reception.

Reproduction Steps

  1. Have your client and the server be on the same LAN. A VPN will work, as long as the IP punched in is the same LAN as the server.
  2. Start playing video
  3. Open the gear icon and see auto bandwidth = 120mbps

Expected/Actual behaviour

Expected:
The client should select a bitrate based on the actual bandwidth between the server and the client

Actual:
The client selects 120mbps every time and high bitrate video stutters.

Logs

No response

Server version

10.10.3, Unstable

Web version

10.10.3, Unstable

Build version

10.10.3, Unstable

Platform

macOS

Browser

Firefox

Additional information

No response

@felix920506 felix920506 added the bug Something isn't working label Feb 19, 2025
@viown
Copy link
Member

viown commented Feb 19, 2025

When I try the following steps, I do get a lower bitrate when playing video:

  1. Open server on the same LAN
  2. Open devtools (F12) and go to Networking.
  3. Set throttling to something like "Good 2G" or "Regular 3G"
  4. Attempt to play video (wait about a minute)
  5. See if bitrate has changed.

Could you try the same steps and see what happens?

@felix920506
Copy link
Member Author

@viown I tried the same and the auto bandwidth is still broken

@viown
Copy link
Member

viown commented Feb 19, 2025

Looks like the legacy apiclient will use a hardcoded bitrate value when it detects it's on the same network, where the bitrate can't go below 140Mbps.

Not sure why this is, but I'm also not sure how reliable the test can be at slower connections, but either way, changes to the legacy apiclient are not allowed and the bitrate detection will probably have to be reworked or upstreamed at some point.

@felix920506
Copy link
Member Author

What will need to happen for this to be fixed?

@dmitrylyzo
Copy link
Contributor

Looks like the legacy apiclient will use a hardcoded bitrate value when it detects it's on the same network, where the bitrate can't go below 140Mbps.

Originally it was exactly 140Mbps. So as not to break the old behavior, it was limited by this value.

The measured bitrate is then reduced (70%).

What will need to happen for this to be fixed?

Move bitrate detection to web. 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants