teklynk / twitch_clips_player

OBS overlay that automatically plays clips from Twitch. Clips can be random or in the order they were created.
https://twitch-clips-player.pages.dev/
15 stars 6 forks source link

Player Lags and Freezes #7

Open xSlizzy opened 7 months ago

xSlizzy commented 7 months ago

After inserting the clips player into my OBS I noticed the clips often lag and often freezes and jumps around. Any suggestions on a fix? I'm running a Gigabyte 4080 so my card shouldn't be the issue.

teklynk commented 7 months ago

Hello. Make sure that hardware acceleration is enabled. Enable browser source optimization in advanced settings in OBS.

xSlizzy commented 7 months ago

Hello, thank you for your response. Unfortunately it already is enabled. I have it pulling up to 100 clips, could that factor into the lag?

teklynk commented 7 months ago

Hmm. I am really not sure. Ussually hardware acceleration fixes the lag issues. Can you try adding this as a browser source to see if it also lags? https://twitch-shoutout.pages.dev/videotest

You can also try using the shoutout player from Twitch Guru to see if that one also lags. https://www.twitch.guru/tools/soclip.html

xSlizzy commented 7 months ago

No lag with your videotest link, but the Twitch Guru shoutout is lagging.

I appreciate your help thus far. If you have any other suggestions, I am all ears.

xSlizzy commented 7 months ago

To add a little more context, the first clip always plays fine, then as it transitions to the 2nd clip it begins to lag and slowly gets progressively worse as more clips play to the point where it looks like the clip is playing at 0.2x speed.

xSlizzy commented 7 months ago

Well, I disabled hardware acceleration and that seems to have helped a lot. Still a bit buggy in transitions, but the clips appear to be playing much better overall.

Sorry for all the messages.

teklynk commented 7 months ago

Thank you for testing these things out. The only time I have seen this issue was with something related to hardware acceleration. I have created another video test url. This one is using a clip from Twitch. https://twitch-clips-player.pages.dev/videotest

I am trying to figure out if this is something in OBS or something with Twitch. What version of OBS are you using?

xSlizzy commented 7 months ago

No problems with your new test link. Works fine with acceleration on and off.

I am on OBS version 29.1.3 (64 bit)

teklynk commented 7 months ago

I have been testing in OBS 30.0.1 but I recall that it also worked fine in versions as far back as 27.0.0.

A few things you can try is: On the browser source properties for the clips player set FPS to 60 check/enable: Shutdown source when not visible, Refresh browser when scene becomes active, control audio via OBS.