YSP_VideoPlayer

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
14,730
Reaction score
14,575
First Language
Filipino
Primarily Uses
VNM
Video Player for RPG Maker MV
by Dr. Yami
Download Link
Source Code

upload_2017-9-8_9-29-33.png
Description
By default, RPG Maker MV only allows you one thing. Play a video. This is a plugin to have more control over videos such as looping, play multiple videos at once and play videos as the rest of the command events are initiating. This is great if you have video cutscenes and want messages to play.

How to use?
  • Use script call event command and you will be able to do any of the following:
    * ysp.VideoPlayer.loadVideo(videoName) - Preload Video
    * ysp.VideoPlayer.releaseVideo(videoName) - Release memory for a Video
    * ysp.VideoPlayer.newVideo(videoName, id) - Create new Video object with id
    * ysp.VideoPlayer.playVideoById(id) - Play a Video object by id
    * ysp.VideoPlayer.stopVideoById(id) - Stop a Video object by id
    * ysp.VideoPlayer.setLoopById(id) - Make a Video object playing loop by id
    * ysp.VideoPlayer.getVideoById(id) - Get Video object by id
    * ysp.VideoPlayer.isReady() - Check if all videos have been loaded
Here is an example case if I want the video to fade in and fade out:
Code:
◆Comment:This will preload the video
:       :----------------------------------------------
◆Script:ysp.VideoPlayer.loadVideo('mirror.webm')
◆Comment:This will check if the video is already in memory.
:       :----------------------------------------------
◆Loop
  ◆If:Script:ysp.VideoPlayer.isReady()
    ◆Comment:This will stop the loop.
    :       :----------------------------------------------
    ◆Break Loop
    ◆
  :End
  ◆
:Repeat Above
◆Fadeout Screen
◆Comment:This will set the following
:       :Video ID #1 : mirror.webm'
:       :Play video ID #1
:       :Loop video ID #1
:       :----------------------------------------------
◆Script:ysp.VideoPlayer.newVideo('mirror.webm', 1)
:      :ysp.VideoPlayer.playVideoById(1)
:      :ysp.VideoPlayer.setLoopById(1)
◆Fadein Screen
◆Text:None, Window, Bottom
:    :Wow! We have looping videos!
:    :And the text is showing!
:    :\}So\{ freaking \{cool!
◆Fadeout Screen
◆Comment:Stop the video
:       :----------------------------------------------
◆Script:ysp.VideoPlayer.stopVideoById(1)
◆Fadein Screen
To Submit a Bug Report
To make a bug report, simply report it in this thread.
Chances are, I will find out about the bug in this thread than by making one in the JS Support forum.

If your map reaches 10k+++ pixels I will ignore all reports about that.

Disclaimer:
We're super busy and we won't have time to do compatibility fixes or checks AT ALL. Please test it out yourself and ask the respective scripter for any issues that may happen.

>>>NOTE!<<<
HOWEVER, before you make a bug report! Download all the latest version of the plugins (and installing them properly). If you don't have the patience to do that, I won't share my patience to fix the bug. If you still get the bug after updating all the plugins and installing them properly, continue on and using this template:

Here is the template to submit a bug report:

Plugin Name: (What is the name of the plugin?)
Error Message: If you received an error message:
  1. Press F8 when you receive it to open up the debug console.
  2. On the console tab, copy/paste the error log and paste it here.
  3. If you post a screenshot, host it on imgur.com or another website because the images posted here are tiny and I can't read it.
How to Replicate Bug: In order for me to fix a bug properly, explain to me IN DETAIL, how you managed to get it to occur. If I cannot replicate the bug, I may ask you to upload a copy of your game's project for me online through either Mediafire, Dropbox, Mega.co or any other online hosting provider. Do NOT deploy the game. After doing so, it's best if you send it through private message if you don't want others rummaging through your game's files.

Other: Post screenshots of the bug, screenshots of your plugin list, videos also help, etc. Anything that will make it more clear for me will help me out.

Thank you for your cooperation!
 
Last edited:

KayZaman

Brother-Veteran
Veteran
Joined
Jun 26, 2016
Messages
767
Reaction score
1,749
First Language
English & Malay
Primarily Uses
RMMV
Video format compatible?

EDIT: Okay, I'll try mp4.
 

Chdonga

Villager
Member
Joined
Mar 25, 2016
Messages
21
Reaction score
1
First Language
English
Primarily Uses
The link's gone...
 

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
456
Reaction score
199
First Language
Spanish
Primarily Uses
RMMV
Please, if it's possible, reupload the link to the plugin. I would like to save it in case I need to use it in a project. Thanks.
 

Rishi Raj Jain

Pokemon MV Maker
Veteran
Joined
Jul 2, 2017
Messages
204
Reaction score
49
First Language
English
Primarily Uses
RMMV
How can I pause a video at the time of choice selection?
 

Raiko

Warper
Member
Joined
Jun 3, 2017
Messages
1
Reaction score
0
First Language
Russian
Primarily Uses
RMMV
Tell me please. How to change the position of the video on the screen. I'm noob in js)
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
14,730
Reaction score
14,575
First Language
Filipino
Primarily Uses
VNM
LOL dude theres 0 chance to modify the script, i wanna add a playback rate (speed) but all the code it's written in 1 line and it's pretty painfull to read .-. can you add it soon, please?

Woops sorry about that. I added source code link
 

Tarve

Warper
Member
Joined
Dec 29, 2017
Messages
2
Reaction score
1
First Language
Finnish
Primarily Uses
RMMV
First, I'd like to say a huge thank you for making this awesome plugin. The default video features were nearly useless, but with this, I can finally do some interactive pre-rendered cutscenes.

I do have one issue though. Is there a way to have a video start from the beginning, after being paused? Other than releasing it from memory and reloading it that is. While that option is mostly fine, it can cause a slight hitch with bigger video files.

Without reloading the file, it seems to just continue from the spot it was stopped in, which is not ideal for me, since I need to sync multiple looped videos together, and getting RMMV to stop the video at the exact right frame for a seamless transition seems to be pretty difficult. If the video is even slightly off sync, it accumulates every time the loop gets called again. By starting it from the beginning you avoid the accumulation. You'll still have videos skipping a frame or two, but that's not really an issue.
 

Robpoke

Villager
Member
Joined
Jun 29, 2016
Messages
5
Reaction score
1
First Language
English
Primarily Uses
RMMV
I do have one issue though. Is there a way to have a video start from the beginning, after being paused? Other than releasing it from memory and reloading it that is. While that option is mostly fine, it can cause a slight hitch with bigger video files.

Without reloading the file, it seems to just continue from the spot it was stopped in, which is not ideal for me, since I need to sync multiple looped videos together, and getting RMMV to stop the video at the exact right frame for a seamless transition seems to be pretty difficult. If the video is even slightly off sync, it accumulates every time the loop gets called again. By starting it from the beginning you avoid the accumulation. You'll still have videos skipping a frame or two, but that's not really an issue.
I also have this problem, but other than that, this really is the most impressive MV plugin to date!

Thank you, Archeia!
 

Coidia3

Villager
Member
Joined
May 1, 2018
Messages
5
Reaction score
1
First Language
English
Primarily Uses
RMMV
Thanks!
 
Last edited:

Teddy97

Veteran
Veteran
Joined
Apr 3, 2018
Messages
49
Reaction score
22
First Language
German
Primarily Uses
RMMV
Definitely better than using the default options!
 

Tarve

Warper
Member
Joined
Dec 29, 2017
Messages
2
Reaction score
1
First Language
Finnish
Primarily Uses
RMMV
There seems to be a memory leak issue with this plugin. Although I suppose it could be caused by RPG Maker MV as well. After testing this out more with RPG Maker MV 1.5.2, I noticed the videos never get released completely from memory, despite using the release command. It does stop the video from working, but if you look at the memory usage in task manager, it'll never go down. If you keep on loading new videos(and release them), the memory usage will eventually reach 3000 MB, at which point it seems to always crash.

This was tested with a completely new project, with only this plugin and the ysp preloader(and without) loaded, with 1.5.2 and 1.6 version of RPG Maker MV.

The 1.6 beta version seems to fix this to some extent at least, but the overall performance during video playback seems to take a hit compared to the 1.5.2 release version. Loading times are pretty much doubled for videos for some reason.

If it helps, I could make a separate example scene of this issue.

Edit: Tried the 1.6.1 version after noticing that was out, and it seems to have improved performance. But there still seems to be occasional weird stutters in between video changes, that are not present with 1.5.2.
 
Last edited:

devilhacker

Villager
Member
Joined
Apr 8, 2018
Messages
7
Reaction score
0
First Language
Malay
Primarily Uses
RMMV
RPG Maker Version 1.5.2 updates loaded
pixi.js:27682
PixiJS 4.5.4 - ✰ WebGL ✰ http://www.pixijs.com/ ♥♥♥


/C:/Users/USER/Documents/Games/Savior%20Quest/js/plugins/YEP_CommonEventMenu.js:1286 SCRIPT CALL ERROR
/C:/Users/USER/Documents/Games/Savior%20Quest/js/plugins/YEP_CommonEventMenu.js:1287 ysp.VideoPlayer.loadVideo(rideslow.webm)

/C:/Users/USER/Documents/Games/Savior%20Quest/js/plugins/YEP_CommonEventMenu.js:1288 ReferenceError: rideslow is not defined
/C:/Users/USER/Documents/Games/Savior%20Quest/js/plugins/YEP_CommonEventMenu.js:1286 SCRIPT CALL ERROR
/C:/Users/USER/Documents/Games/Savior%20Quest/js/plugins/YEP_CommonEventMenu.js:1287 ysp.VideoPlayer.releaseVideo(rideslow.webm)

/C:/Users/USER/Documents/Games/Savior%20Quest/js/plugins/YEP_CommonEventMenu.js:1288 ReferenceError: rideslow is not defined
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,460
Reaction score
6,850
First Language
German
Primarily Uses
RMMV
@devilhacker please remove the space from your folder name - as you can see by the replacement with %20 in the error messages, a Browser can't handle it correctly and that can prevent loading of the files.

And add a screenshot of the event where you want to play the Video, the errors sound as if you made a mistake there as well.
 

devilhacker

Villager
Member
Joined
Apr 8, 2018
Messages
7
Reaction score
0
First Language
Malay
Primarily Uses
RMMV
@devilhacker please remove the space from your folder name - as you can see by the replacement with %20 in the error messages, a Browser can't handle it correctly and that can prevent loading of the files.

And add a screenshot of the event where you want to play the Video, the errors sound as if you made a mistake there as well.
I already remove the space but it still give an error

SCRIPT CALL ERROR
/C:/Users/USER/Documents/Games/SaviorQuest/js/plugins/YEP_CommonEventMenu.js:1287 ysp.VideoPlayer.loadVideo(rideslow.webm)

/C:/Users/USER/Documents/Games/SaviorQuest/js/plugins/YEP_CommonEventMenu.js:1288 ReferenceError: rideslow is not definedmessage: "rideslow is not defined"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: Error/C:/Users/USER/Documents/Games/SaviorQuest/js/plugins/YEP_CommonEventMenu.js:1288 Yanfly.Util.displayError
/C:/Users/USER/Documents/Games/SaviorQuest/js/plugins/YEP_CommonEventMenu.js:1286 SCRIPT CALL ERROR
/C:/Users/USER/Documents/Games/SaviorQuest/js/plugins/YEP_CommonEventMenu.js:1287 ysp.VideoPlayer.releaseVideo(rideslow.webm)

/C:/Users/USER/Documents/Games/SaviorQuest/js/plugins/YEP_CommonEventMenu.js:1288 ReferenceError: rideslow is not defined/C:/Users/USER/Documents/Games/SaviorQuest/js/plugins/YEP_CommonEventMenu.js:1288 Yanfly.Util.displayError
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

buinguyenhoangtho wrote on fizzly's profile.
Hello @fizzly, i would like to use your asset/ resource for my project ( is maybe commercial ). May i have your permission? Thanks you !
Working on breaking the limits of RPGMaker! :cool:
I have 470+ hours on RMMV but have only made a demo game, is this normal? :kaoswt: (I lose motivation a lot plus I use a 32gb laptop, so..)
I like Iron Maiden.
Benku wrote on Magnus0808's profile.
Hey man you helped me out a long time ago with a plugin i was wondering if you can help me out one more time since its literally the last thing i need help with if not is cool but id figured id ask you one more soild.

Forum statistics

Threads
95,427
Messages
929,082
Members
125,659
Latest member
AphoticAmaranth
Top