Easy RGSS Video Player

Started by ForeverZer0, April 30, 2012, 02:01:34 am

Previous topic - Next topic

ForeverZer0

So I was continuing to fool around with MCI functions after completing my little Audio module rewrite, and I found that it also allows for making the most simple video player in RPG Maker. Seriously, it only takes about 15-20 lines of code to get just about any standard video format to play right in the game window.

Here's an example if anyone wants to see how easy it is.

http://www.mediafire.com/?b8gblyim83m772k

God, I wish I understood Win32API functions better back when I used to write more scripts for RMXP, I could have done so much more...
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Zexion

The script hangs for me after about 10 seconds ?

ForeverZer0

Try decreasing the time between Graphic updates to something like 7 or 8. I think I have it set to 9 right now, which is probably a bit too close to the hanging error.

This is the line:
  if Time.now - start_time >= 8


If it doesn't play, you probably don't have the code, but you can swap the video out with one of your own. Either change the name of the file from "Rick.avi" in the script, or change the name of your file to that.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

LiTTleDRAgo

the video doesn't play and RMXP window become not responding

G_G

April 30, 2012, 08:08:05 am #4 Last Edit: April 30, 2012, 08:09:36 am by game_guy
Works fine for me. Just be sure you extract the folder and not run it from the zip file. The only issue with this is that you can't close the RGSS window while the video's running. After a couple of clicks the window freezes for a few seconds and says the "Script is hanging"

EDIT: After doing what you told Zexion to do, it stopped hanging, but you still can't interact with the window during video play.

ForeverZer0

If you click "C", it will close stop the movie. Thats about it though. It isn't really supposed to be some fully functioning script, just an example.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.