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

Detect bitrate in LAN #424

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

dmitrylyzo
Copy link
Contributor

@dmitrylyzo dmitrylyzo commented Oct 24, 2022

140 Mbps may be too low these days.
jellyfin/jellyfin-tizen#146

Changes

  • Detect the bitrate in the LAN, but take at least 140M.
  • Use XMLHttpRequest to measure the actual loading stage and get the actual number of bytes loaded.
  • Fix cleanup of detection timeout.

Issues
Fixes jellyfin/jellyfin-tizen#146
Fixes jellyfin/jellyfin-web#4314

@Nazar78
Copy link

Nazar78 commented Oct 24, 2022

Agreed! Now a days even internet speeds have reached 10Gbps, I'm just using 1Gbps with symmetrical link hence about 980Mbps uploads, Locally Wi-fi 6 1.2Gbps at average 600Mbps and even commonly 2.5Gbps switch/router/NAS/dongle at average 295MB/s.

@dmitrylyzo dmitrylyzo force-pushed the detect-bitrate-lan branch 4 times, most recently from 56dc003 to 5ceb1ef Compare October 26, 2022 09:52
@dmitrylyzo
Copy link
Contributor Author

The fetch method gives an absurd 4Gbps on the same 1Gbps LAN. 👀
Moreover, the actual downloaded size is different from the requested size: 4MB instead of 3000000B. 🤷‍♂️
So I rewrote getDownloadSpeed using XMLHttpRequest. It's not exactly accurate, but after testing, I got 700-750Mbps on a 1Gbps LAN.

@dmitrylyzo dmitrylyzo marked this pull request as ready for review October 26, 2022 09:56
@thornbill thornbill added the bug Something isn't working label Oct 27, 2022
src/apiClient.js Outdated Show resolved Hide resolved
Use XMLHttpRequest to measure the actual loading stage and get
the actual number of bytes loaded.
@thornbill thornbill merged commit 82a2194 into jellyfin-archive:master Oct 25, 2023
3 checks passed
@dmitrylyzo dmitrylyzo deleted the detect-bitrate-lan branch October 26, 2023 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

[Issue]: Automatic bitrate detection not working on web-based clients Max Bitrate
4 participants