Game freezing on video playback with YSP_VideoPlayer.js

jsdeacon

Warper
Member
Joined
Oct 23, 2020
Messages
1
Reaction score
0
First Language
English
Primarily Uses
Other
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.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,932
Reaction score
4,845
First Language
EN, FR
Primarily Uses
RMMZ

I've moved this thread to Javascript/Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
941
Reaction score
588
First Language
English
Primarily Uses
RMMV
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.
 

DWatcher

Warper
Member
Joined
Jun 3, 2021
Messages
1
Reaction score
0
First Language
Español
Primarily Uses
Other
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.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Feel free to check out our "Touch the Stars" gamejam submission, "Starlight, Starbright!"
just finished playing one shot. im kinda disappointed with return the sun ending ngl. i was hoping there would be some after credits scene that would play with my emotions
So apparently the surprise Google Search page browser game saves your progress when you close the browser.

This really makes me miss the golden age of Flash gaming.
ohh man im ending oneshot now (im doing the last stepping puzzle rn) and the music is so...sad...like...ive been thinking recently about how fast moments pass and...my anxious thoughts combined with that music and nostalgia...like...im comfortably sad...and want to cry internally
We're playing one of the Touch the Stars game jam entries, come join us!

Forum statistics

Threads
113,555
Messages
1,075,810
Members
147,551
Latest member
ananansy
Top