Game freezing on video playback with YSP_VideoPlayer.js

Hello, looking for a little RPGM MV help here.

I'm using Ver. 1.6.1 and YSP_VideoPlayer.js for video playback. In the last few releases, I have been getting more and more people telling me that the game is freezing when a video is set to play. The game runs fine on both of my PCs, but both have higher-end NVIDIA cards and plenty of ram. The video files are all small MP4 loops (nothing more than 2mb) and I have the events set up like this:

◆Script:ysp.VideoPlayer.loadVideo('Movie')
◆Loop
◆If:Script:ysp.VideoPlayer.isReady()
◆Break Loop
◆
:End
◆
:Repeat Above
◆Script:ysp.VideoPlayer.newVideo('Movie', 1)
: :ysp.VideoPlayer.playVideoById(1)
: :ysp.VideoPlayer.setLoopById(1)
◆Text:None, Transparent, Bottom
: :
◆Script:ysp.VideoPlayer.stopVideoById(1)


From what I can tell, something about them is causing a massive spike in memory/cpu which is freezing the game on lower-end machines. I don't know how to make the files any smaller without severely compromising the quality. Does anyone have any suggestions on how to fix this problem?

Thanksl
- J. S.

I've moved this thread to Javascript/Plugin Support. Thank you.

I'm not super familiar with that plugin, but from your event command list there, it sounds like you're causing an infinite loop. The massive CPU usage spike seems to indicate that as well.
You could add a counter or something inside the loop to count up for a couple of seconds and then also break the loop.

You could also add a brief wait (like 1 frame should do it) between calling the loadvideo command and actually entering the loop. It could be a timing thing on certain hardware, where it isn't triggered quickly enough and just loops forever instead.
I have the same problem as you, so far I can't find the solution, have you found why?

EDIT: Ok I think I found the solution, open a new project and use the plugin there, it should work, then close the new new project and open your project and do it again, at least it worked for me doing it and make sure you have downloaded pluggin well.

Original thread: https://forums.rpgmakerweb.com/threads/game-freezing-on-video-playback-with-ysp_videoplayer-js.136609/