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

Save bandwidth ideas: Support for resolution limits in config file and more #26

Open
Fijxu opened this issue Dec 18, 2024 · 5 comments · May be fixed by #28
Open

Save bandwidth ideas: Support for resolution limits in config file and more #26

Fijxu opened this issue Dec 18, 2024 · 5 comments · May be fixed by #28
Labels
enhancement New feature or request

Comments

@Fijxu
Copy link
Contributor

Fijxu commented Dec 18, 2024

Should be easy. I have no problem in implementing it myself.

https://git.nadeko.net/Fijxu/invidious/commit/8f46bd57519c08f18f09166fe0c062921853099c

@unixfox unixfox added the enhancement New feature or request label Dec 18, 2024
@Fijxu Fijxu linked a pull request Dec 18, 2024 that will close this issue
@unixfox
Copy link
Member

unixfox commented Dec 19, 2024

In my opinion I would prefer to artifically limit the max resolution in video.js: https://github.com/videojs/http-streaming#vhsrepresentations

This way anyone can still select 1080p but by default for example only up to 720p will automatically be tested by video.js. This should greatly reduce the strain of the bandwidth used.

What do you think?

@Fijxu
Copy link
Contributor Author

Fijxu commented Dec 19, 2024

Good idea, but that would only limit the resolution on the Invidious front-end, not for every third party program that uses Invidious to fetch the videos (e.g: FreeTube, Clipious, yt-dlp for downloads). What I'm looking for with this pull request is a hard resolution limit, for everyone. IMO this is useful for public instance maintainers that have fixed bandwidth limits and low link speeds

@unixfox
Copy link
Member

unixfox commented Dec 19, 2024

Good idea, but that would only limit the resolution on the Invidious front-end, not for every third party program that uses Invidious to fetch the videos (e.g: FreeTube, Clipious, yt-dlp for downloads). What I'm looking for with this pull request is a hard resolution limit, for everyone. IMO this is useful for public instance maintainers that have fixed bandwidth limits and low link speeds

All the 3rd parties does not use the dash manifest API. They use the invidious API.

This means that we have to do some filtering on the video data given back to invidious. Once the API will be supported because right now it is not: #22

In my opinion, for a public instance 95% of the bandwidth is going to be consumed by people using the invidious frontend, not the 3rd party clients. So artificially limiting on the invidious frontend will already help a lot.

PS: yt-dlp does not download from the invidious server, the tool just detects invidious and assume it's a youtube link then download from youtube servers directly.

@Fijxu
Copy link
Contributor Author

Fijxu commented Dec 19, 2024

This means that we have to do some filtering on the video data given back to invidious. Once the API will be supported because right now it is not: #22

I see

PS: yt-dlp does not download from the invidious server, the tool just detects invidious and assume it's a youtube link then download from youtube servers directly.

I have seen people trying to use Invidious with yt-dlp to download videos since they can't download videos directly from youtube.
Reference: https://github.com/grqz/yt-dlp-invidious

@unixfox
Copy link
Member

unixfox commented Dec 25, 2024

While looking at the video.js specification, I found something interesting to reduce the bandwidth used: https://github.com/videojs/http-streaming/blob/main/docs/bitrate-switching.md


PS: yt-dlp does not download from the invidious server, the tool just detects invidious and assume it's a youtube link then download from youtube servers directly.

I have seen people trying to use Invidious with yt-dlp to download videos since they can't download videos directly from youtube. Reference: grqz/yt-dlp-invidious

IMO if it's an issue for you, you should:

@unixfox unixfox changed the title Support for resolution limits in config file to save bandwidth. Save bandwidth ideas: Support for resolution limits in config file and more Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants