Play movie freezes the game.

● ARCHIVED · READ-ONLY
Started by RPGmakerMV-dev 27 posts Page 1 of 2 View original ↗
  1. As the title states I'm having problems with playing movies in my game.

    Yes I've read the documentation, which says this:

    The file formats that are playable depend on the operating environment, so please prepare the below 2 file formats with the same file name.

    • WebM(.webm)
    • MP4 (.mp4 encoded with H.264 codec)
    * When creating a game that will be played on Windows or Mac, please prepare only the WebM file format. When creating a game that will be released on the web or made for Android/iOS, both file formats are required.

    I'm only using windows and mac so my movies are in WEBM format. Still the game freezes when playing them.

    My movies are in the correct size 816x624 however I do play a movie followed by a picture like this.

    - Play move(Movie);
    - Show picture(Picture);

    What's even more strange is that this only occurs very randomly, sometimes it works sometimes it doesn't work so I figured this had something to do with the ram and cache, so I used a plugin to clean cache without any results.

    Can the problem be that I use a common event for the conversation and then call another common event to play the correct movie? Because a different movie is played depending on a variable, so I use common event to make it easier to read and edit the conversation and there's no problem in the if conditions because the movie starts playing but freezes like 0.5-1 second into it.

    I create my webm using ffmpeg with these commands

    - png2yuv -I p -f 38 -b 0 -j nameOfThePictureSeries%02d.png > my.yuv
    - vpxenc --good --cpu-used=0 --auto-alt-ref=1 --lag-in-frames=16 --end-usage=vbr --passes=2 --threads=2 --target-bitrate=3000 -o my.webm my.yuv
    - ffmpeg -f concat -i my.txt -c copy nameOfTheFinishedMovie.webm

    Thanks in advance.
  2. no, it doesn't matter if the command is used in a common event or in another event.
    However, the event logic might matter, especially if it went wrong with conditionals.
    so please post a screenshot of the event where the movie is played and any other event that calls this one.
  3. That's not necessary since there's one if condition with an else statement so it executes one of the movies every time.
  4. @RPGmakerMV-dev do you want the error to be solved?
    then yes, it is neccessary to show the full screenshots because the different commands can behave differently based on the properties and settings of the event. and no text description can show us everything that is needed to really follow the logic.
  5. On a side note this doesn't only happen in one event it's around 10-20 events that works sometimes and sometimes not and there's only conversations, play movie and pictures in the events. Some have if conditions which all have an else statement so it's not in the logic and as I said above the movies starts to play only to freeze the game 0.5-1 second into the movie. I'm certain that the problem is with the decoded movies or somewhere in the play movie command but it just says the file should be webm so I'm clueless here.
  6. you basically prove that you're clueless by not giving full info about the events - an event is much more than just its content.
    and what you describe seems to be a timing problem, and those usually happen when the wrong triggers are choosen.
    so again, please show us the full screenshots so that we can see those parts of the events that you haven't described yet.
  7. I'll give you a picture but it won't help just saying that it's a waste of time.
  8. Andar said:
    you basically prove that you're clueless by not giving full info about the events - an event is much more than just its content.
    and what you describe seems to be a timing problem, and those usually happen when the wrong triggers are choosen.
    so again, please show us the full screenshots so that we can see those parts of the events that you haven't described yet.

    Can you explain further? Timing problem what's that? Also how can a the system trigger the wrong if condition? Please describe further maybe provide some links with further readings.
  9. and how do you call the first common event?
    as I said it's the triggers and how the movie is started in the game that is important.
    And please don't give fake screenshots that were made for this display only - there have been several cases where the bug was a user error that was unknowingly corrected when the user made such "demo" screenshots and was solved as soon as we got the true screenshots.

    The screenshots you show have to be the ones that created the problem in the game in the first place.
    If you don't want to share part of your texts, then you can either black them out in an image program, or you can make a real event that is tested in the game and produces the same error, and then give full screenshots.

    Just two things for your info:
    1) we don't care about your ideas because we have our own ideas to use and know that ideas themselves are absolutely worthless - it's the entire implementation that creates the worth of a game and not its ideas.
    2) if the movie starts then the format is correct - if the movie breaks or freezes after that, then either the problem is somewhere else or the video program you used for converting or creating is defective and you need to use a different one. That is why I've ignored your idea that it has to be the format itself, because it isn't.

    EDIT:
    and for your added questions:
    trigger has nothing to do with the condition.
    trigger determines when and how and how often an event is called, and that can create timing problems like starting a command at the wrong moment or multiple times and so on.
  10. I've tested the event it creates the same result, freezing sometimes and sometimes not. The common event are being called first line from an event on the map, and first line only still, need a new picture or the original event that produces the same result?

    As I've been trying to say the movie freezes around 1 second into it so I'm almost 100% certain that the problem is how the movie is decoded which I do myself using ffmpeg (https://www.ffmpeg.org/) and the information provided by the RPG documentations says that it needs to be an webm which it is. Would be great to know the maximum bitrate etc because I think that's the problem.
  11. RPGmakerMV-dev said:
    I've tested the event it creates the same result, freezing sometimes and sometimes not. The common event are being called first line from an event on the map, and first line only still, need a new picture or the original event that produces the same result?

    As I've been trying to say the movie freezes around 1 second into it so I'm almost 100% certain that the problem is how the movie is decoded which I do myself using ffmpeg (https://www.ffmpeg.org/) and the information provided by the RPG documentations says that it needs to be an webm which it is. Would be great to know the maximum bitrate etc because I think that's the problem.


    Have you tried just running this event and see if the movie plays ok?

    1.png

    If it doesn't work then try using this to convert your MP4 file..

    Make sure to choose the preset for maximum quality..

    Let us know if that fixes it. (Link in spoiler)

    Spoiler
    https://video.online-convert.com/convert-to-webm
  12. 1) and how is that event activated? because the problem could be caused by that event being triggered multiple times.
    timing problems like you describe mean that commands are triggered at the wrong time multiple times.

    2) no, it CANNOT be ANYTHING in the movie format - if that were the problem, then the movie would always fail. And the engines uses the codecs installed at your computer, so if you can watch the movie with another program then you can watch it with the browser here.

    3) why do you refuse to give the screenshots we need?
    If you know everything better then you won't need our help in solving the problem.
    Or are you refusing the screenshots because you're using a pirated copy and know that you'll be banned as soon as a moderator sees proof of that?

    anyway, I'll stop writing and helping you until you give us the screenshots I requested multiple times now.
  13. Yes playing the movie alone seems to work, or I tested it 20 times and it didn't freeze one single time. But when I call common events after each other that same movie freezes, like I shown in the picture above, or it should be like the picture below.

    Failing event below
    event_breaking.png

    Failing event below EDIT: (This event is failing as well)
    working.png

    This event is the one that's working.
    workingevent.png


    Andar can you relax? No it's not pirated I bought RPG maker MV and even RPG maker MV - SAKAN from steam as you can see below.

    proog.png
  14. I tested the common event number 241 showed above, 10 times; 4 times it worked perfectly fine all movies played and I could move around afterwards and 6 times the game freeze and I could not press any buttons tried open the menu and moving around.
  15. Good news is, your video formats seem to be fine then..

    - And how does it do without the show picture in the event? Still not working or..?

    - Using any plugins?
  16. Tested the same event without pictures and it worked 6 out of 6 times lol

    EDIT: Putting a wait 30 frames between the show picture and play movie commands fixed the problem as well

    So the problem was showing an image and playing a movie crashed the game for some reason, anyone know the reason behind this?

    Thanks to everyone that helped me find and solve the problem!
  17. no, the problem is that you should not start a new movie while another movie is still being played.
    And the screenshots of the events you've given last all show exactly that - playing one movie command after another.

    The engine has a protection against that - but it is meant for cases where two movies are intended to follow each other or where two movies might be accidentally be called at the same time - you've called much more movies at the same time than that, and it wouldn't surprice me if that got the engine into a hickup sometimes.

    a wait is one way to prevent that - but I would prefer (to prevent other, future timing problems) that you restructure your logic in a way that prevents distributing commands like that, ensuring that only one movie can be called no matter what you do.
    But we can't help you with that unless you give us the true logic you're using (instead of dozens identical conditional branches).
    If you aren't willing to do that, you'll have to stay with the suboptimal wait solution.

    additionally - another thing impossible to check without seeing the true events:
    each picture displayed requires an amount of RAM (and much more than the size of the picturefile on your HDD, because compression is not possible while using the picture). If you have too many different pictures and don't erase them when no longer needed, that can cause lag and memory blocks that can prevent other functions until the garbage collector clears the RAM again.
    And the garbage collector for freeing RAM is not the most efficient way for a lot of (good) reasons, so it's better to help by erasing pictures that you know are no longer needed.
  18. RPGmakerMV-dev said:
    Tested the same event without pictures and it worked 6 out of 6 times lol

    EDIT: Putting a wait 30 frames between the show picture and play movie commands fixed the problem as well

    So the problem was showing an image and playing a movie crashed the game for some reason, anyone know the reason behind this?

    Thanks to everyone that helped me find and solve the problem!


    Glad you found a fix.


    As Andar says, playing multiple movies at once is likely cause of the issue you've been facing. Make sure only one movie is playing at once :)

    Best of luck for your project
  19. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

  20. Reopened at OP's request