BasioMeusPuga / twitchy

CLI streamlink wrapper for twitch.tv
GNU General Public License v3.0
91 stars 14 forks source link

100% CPU usage when launched with rofi-twitchy #32

Closed mattyrc closed 4 years ago

mattyrc commented 5 years ago

I am getting 100% CPU usage on a single core when launching a stream from the rofi-twitchy plugin. When launching a stream from cli via twitchy or 'mpv ', I'm only seeing around 10% usage. I've also tried enabling hardware acceleration but get the same results.

This occurs with either mpv or vlc when set in the config.

I am able to reproduce this on two machines both with arch/intel cpu's.

From rofi: with_rofi Without: without_rofi

OS: Arch Kernal: 5.3.10 Nvidia Drivers: 440.31 CPU: Intel i7-4790k

BasioMeusPuga commented 5 years ago

I can think of the following:

  1. The launch from rofi is overriding hardware acceleration. If the relevant setting is enabled in ~/.config/twitchy3/twitchy.cfg, I would recommend checking out default launch flags for mpv in the config file.

  2. Change rofi to run twitchy with --hanselgretel. This will terminate twitchy after launching the video. In case the issue is script specific, this should fix it.

mattyrc commented 5 years ago

Sorry for the delay. Streamlink is currently giving me the "410 Client Error (Gone for url) #2680" issue so I'm not able to test right now.

I did however try enabling and disabling hardware acceleration in the twitchy config and mpv/vlc configs prior to opening this issue but the problem was there in any case when launching from rofi.

I'll try your second suggestion when streamlink gets sorted again. Do I just add the --hanselgretel flag like so? rofi -modi twitchy:rofi-twitchy -show twitchy --hanselgretel

Thank you.