RayPS / obs-spotify-mac

An OBS script to display Spotify track info on macOS
20 stars 1 forks source link

Video Capture Device lags because of too often rerenders of text/artwork #4

Open MarshalX opened 1 year ago

MarshalX commented 1 year ago

Hi! The built-in camera of Mac lags with interval 1 (default value). Probably because it tries too often to get new artwork and rerender it. Interval 10 is okay.

Possible fixes:

  1. Add cashing for the tracks. Do not rerender on the same track
  2. Add a note about lags with a small interval

Thank you for the script!

torytang025 commented 9 months ago

I got this problem too. When I use this plugin, I got a severe rendering lag. Here is my log. Before: Snapshot 2024-01-14 at 11 20 32 After:(With severe rendering lag) Snapshot 2024-01-14 at 11 21 12

RayPS commented 9 months ago

Sorry for the delay, I just did some investigation, the lag isn't caused by the re-render, but you are right about the caching. The lag was caused by the communications between the script and Spotify rather than the re-renders. The script lookup for the current track info every [interval] seconds, somehow Spotify is slow to return the result. So far I have no idea how to fix this...