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

High CPU usage in listen mode #3602

Closed
Self-Perfection opened this issue Jan 30, 2023 · 3 comments · May be fixed by #4439
Closed

High CPU usage in listen mode #3602

Self-Perfection opened this issue Jan 30, 2023 · 3 comments · May be fixed by #4439
Labels
bug Something isn't working module:player Impacts the video player of Invidious stale type:client-side The user interface of invidious

Comments

@Self-Perfection
Copy link

Describe the bug
Firefox uses about 5 times more CPU time for showing Ividious page in listen than direct playback of the same file.
Brave uses about 3x times more CPU time.

Steps to Reproduce

  1. Start web browser with new profile
  2. Open single tab with any YouTube music video. Example: https://yewtu.be/watch?v=qk1nnAHI1mI&listen=1
  3. Start playback
  4. Check CPU usage by web browser
  5. Download audio track from test video (e.g. yt-dlp -f ba $URL)
  6. Playback audio via dedicated audio player. I used mpv for instance.
  7. Observe CPU usage 3-5 times lower than during playback via web browser

Additional context
I expected that playing just audio via Invidious would drastically decrease power consumption and therefore save battery. But in my case it just a little bit lower. Even embed Invidious link ( https://yewtu.be/embed/qk1nnAHI1mI?listen=1 ) consumes 5x times more CPU time than direct playback. Why is that?

@Self-Perfection Self-Perfection added the bug Something isn't working label Jan 30, 2023
@unixfox
Copy link
Member

unixfox commented Jan 30, 2023

Can you reproduce the same issue if you turn off JavaScript? This will use the default browser player.

This way we can understand if it's videojs, the Invidious player that is causing some high CPU usage or not.

@Self-Perfection
Copy link
Author

On my test system with javascript.enabled=false playback of https://yewtu.be/watch?v=qk1nnAHI1mI&listen=1 in Firefox uses 2 times less CPU time than with enabled JS. More precisely:

  • About 15-20% CPU time without JS
  • about 45-50% CPU time with JS

Apparently JS player adds substantial overhead.

@SamantazFox SamantazFox added type:client-side The user interface of invidious module:player Impacts the video player of Invidious labels Sep 10, 2023
@unixfox unixfox mentioned this issue Feb 19, 2024
12 tasks
Copy link

github-actions bot commented Sep 9, 2024

This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.

@github-actions github-actions bot added the stale label Sep 9, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:player Impacts the video player of Invidious stale type:client-side The user interface of invidious
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants