YSP_VideoPlayer

Discussion in 'JS Plugin Releases (RMMV)' started by Archeia, Sep 8, 2017.

  1. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,034
    Likes Received:
    13,034
    Location:
    Game Dev Salt Mines
    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: Apr 6, 2018
    #1
    sefeloth, vap0re0n, KaYsEr and 13 others like this.
  2. KayZaman

    KayZaman Brother-Veteran Veteran

    Messages:
    757
    Likes Received:
    1,719
    Location:
    South-East Asia
    First Language:
    English & Malay
    Primarily Uses:
    RMMV
    Video format compatible?

    EDIT: Okay, I'll try mp4.
     
    #2
  3. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,034
    Likes Received:
    13,034
    Location:
    Game Dev Salt Mines
    First Language:
    Filipino
    Primarily Uses:
    VNM
    RM only supports webm IIRC. (the plugin also shows .webm in video examples)
     
    #3
  4. Dr.Yami

    Dr.Yami 。◕‿◕。 Developer

    Messages:
    992
    Likes Received:
    711
    Location:
    Finland
    First Language:
    Vietnamese
    Primarily Uses:
    Other
    Due to license issue, Nw.js (RMMV's client) only supports webm
     
    #4
    Engr. Adiktuzmiko likes this.
  5. KayZaman

    KayZaman Brother-Veteran Veteran

    Messages:
    757
    Likes Received:
    1,719
    Location:
    South-East Asia
    First Language:
    English & Malay
    Primarily Uses:
    RMMV
    ....okay.
     
    #5
  6. Chdonga

    Chdonga Villager Member

    Messages:
    19
    Likes Received:
    1
    First Language:
    English
    The link's gone...
     
    #6
  7. Oscar92player

    Oscar92player Veteran Veteran

    Messages:
    397
    Likes Received:
    165
    Location:
    Benalmádena - Málaga - Spain
    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.
     
    #7
  8. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,034
    Likes Received:
    13,034
    Location:
    Game Dev Salt Mines
    First Language:
    Filipino
    Primarily Uses:
    VNM
  9. Rishi Raj Jain

    Rishi Raj Jain Pokemon MV Maker Veteran

    Messages:
    204
    Likes Received:
    42
    Location:
    India
    First Language:
    English
    Primarily Uses:
    RMMV
    How can I pause a video at the time of choice selection?
     
    #9
  10. Raiko

    Raiko Warper Member

    Messages:
    1
    Likes Received:
    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)
     
    #10
  11. sasoriakasuna

    sasoriakasuna Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    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?
     
    #11
  12. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,034
    Likes Received:
    13,034
    Location:
    Game Dev Salt Mines
    First Language:
    Filipino
    Primarily Uses:
    VNM

    Woops sorry about that. I added source code link
     
    #12
  13. Tarve

    Tarve Warper Member

    Messages:
    2
    Likes Received:
    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.
     
    #13
    Robpoke likes this.
  14. Robpoke

    Robpoke Villager Member

    Messages:
    5
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    I also have this problem, but other than that, this really is the most impressive MV plugin to date!

    Thank you, Archeia!
     
    #14
  15. Coidia3

    Coidia3 Warper Member

    Messages:
    4
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks!
     
    Last edited: Nov 1, 2018
    #15
  16. Teddy97

    Teddy97 Veteran Veteran

    Messages:
    35
    Likes Received:
    20
    Location:
    Austria
    First Language:
    German
    Primarily Uses:
    RMMV
    Definitely better than using the default options!
     
    #16
  17. Tarve

    Tarve Warper Member

    Messages:
    2
    Likes Received:
    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: Jun 17, 2018
    #17
  18. devilhacker

    devilhacker Villager Member

    Messages:
    8
    Likes Received:
    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
     
    #18
  19. Andar

    Andar Veteran Veteran

    Messages:
    26,364
    Likes Received:
    5,711
    Location:
    Germany
    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.
     
    #19
  20. devilhacker

    devilhacker Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    Malay
    Primarily Uses:
    RMMV
    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
     
    #20

Share This Page