Zeus Video Player

Discussion in 'RGSS Scripts (RMXP)' started by Zeus81, Nov 20, 2012.

  1. BlackLodgeGames

    BlackLodgeGames Villager Member

    Messages:
    19
    Likes Received:
    4
    Location:
    Spokane, WA, USA
    First Language:
    English
    Zeus, thanks for the interesting looking script!  Can I use this script royalty free in my commercial game?  Let me know either way, and thanks again.
     
    #61
  2. Yalorda

    Yalorda Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    Dutch
    Hello Zeus, I really want to make use of your script but I have encountered a problem. I hope you can help since I only got the software recently and don't know anything too technical.

    After setting up the path and everything for the avi file I get this message when activating the event. http://gyazo.com/2abd6ceb250c750e414cccc95ccfc90a 
    I tried using different file formats like ogg but none of them seem to work as the npc I created to play the movie only faced the direction I was interacting with it so if it is a problem with avi what other files are compatible with the script?
     
     
    #62
  3. Zeus81

    Zeus81 Veteran Veteran

    Messages:
    164
    Likes Received:
    149
    First Language:
    French
    Rhaegus : oops sorry for the late reply, you can't cut script lines like that, try :


    Graphics.play_movie(


    "Movies/Intro.avi", false, false)


    BlackLodgeGames : yes this script is free for commercial use.


    Yalorda : is it on vx ace?


    I've not made this script compatible with vx ace because it already has a command to play ogg videos.
     
    #63
  4. BlackLodgeGames

    BlackLodgeGames Villager Member

    Messages:
    19
    Likes Received:
    4
    Location:
    Spokane, WA, USA
    First Language:
    English
    Thanks for your hard work and your permissive license.  I'll be sure to credit you & give you a copy of my game when it's done if you'd like.  Thanks again!
     
    #64
  5. Yalorda

    Yalorda Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    Dutch
    Oops now I feel really stupid -_-"

    I am indeed using VX ace.

    Well I guess my search continues. I'm looking for a script that enlarges the videos when I use a fullscreen script.
     
    Last edited by a moderator: Jan 3, 2014
    #65
  6. Zeus81

    Zeus81 Veteran Veteran

    Messages:
    164
    Likes Received:
    149
    First Language:
    French
    I'll do an update later.
     
    #66
    Yalorda likes this.
  7. Zeus81

    Zeus81 Veteran Veteran

    Messages:
    164
    Likes Received:
    149
    First Language:
    French
    UPDATE


    Log change v2.0 :


    - vxace support (it replaces the default video player).


    - pause when focus is lost.


    - unicode support for filenames.


    - F1 and F12 can be used while playing a video (as Alt+Enter)


    - better compatibility with Fullscreen++


    - better error messages


    - you can choose the background image of the player (in case your video doesn't fill all the space)


    It will automatically load the image named 'ZeusVideoPlayer' if found in Pictures folder.


    - it can play all files your computer can play (not only avi)


    If you're searching for a format that should play on almost all pc you may check this link : http://support.microsoft.com/kb/899113


    Script : https://www.dropbox.com/s/q933du4ix2r0cep/Zeus%20Video%20Player.rb
     
    #67
  8. BlackLodgeGames

    BlackLodgeGames Villager Member

    Messages:
    19
    Likes Received:
    4
    Location:
    Spokane, WA, USA
    First Language:
    English
    Looking good, and thanks for the update.  I use version 1.2 for playing a splash intro for my game studio as soon as the game is launched, but something about the new 2.0 code makes it exit the splash video immediately.  All other cutscenes loaded after the game starts work correctly with the 2.0, it's just my splash video that dies after a second.  All videos are encoded in DivX 3, so the encoding is exactly the same.  However, my engine is modded like crazy, including up to 1080p resolution, and forced fullscreen (among other things) meaning this issue may simply be a by-product of my heavily modded engine.

    My main file does this:

    1) changes the resolution

    2) then changes to full screen

    3) then plays the Black Lodge Games intro splash video

    4) then loads the main menu

    Thanks again, just thought I'd mention my observations from trying out the new version.  I'm not really expecting any help, as I said, my engine is so far away from stock at this time that the issue could easily be mine alone.  I'll stick with 1.2 for the moment, as it does what I need, but if I can figure out the splash screen, I'd like to move to 2.0 for the increased codec support.
     
    Last edited by a moderator: Jan 10, 2014
    #68
  9. Zeus81

    Zeus81 Veteran Veteran

    Messages:
    164
    Likes Received:
    149
    First Language:
    French
    And there is no error message?


    Maybe you can set the cancellable option to false, and/or add after you script that goes fullscreen:


    Input.update


    Graphics.update


    Or try playing another file just to check if it isn't a bug with this particular file.
     
    #69
  10. Zeus81

    Zeus81 Veteran Veteran

    Messages:
    164
    Likes Received:
    149
    First Language:
    French
    ok I think I've got the bug, a video with a resolution lower than the game can't be stretched in fullscreen mode and is automatically reduced to its 1:1 size, I'll try out if there's something I can do to fix it.
     
    #70
  11. felivans

    felivans Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    spanish
    i cant believe this is a recent topic :o great job with the script btw
     
    #71
  12. BlackLodgeGames

    BlackLodgeGames Villager Member

    Messages:
    19
    Likes Received:
    4
    Location:
    Spokane, WA, USA
    First Language:
    English
    Interestingly I fixed my issue with version 2.0 by making the video play first thing in Main, and change the resolution and to fullscreen afterwards.  Thanks again!
     
    #72
  13. khiavwolf

    khiavwolf Villager Member

    Messages:
    5
    Likes Received:
    2
    First Language:
    Taiwanese
    Nice script. But I encounter some problems while testing it on my computer(RMXP, win7):

    <1> Sometimes, the movie plays on the Skype(or other windows) instead of Game.exe...

    It may cause by this line "HWND = GetForegroundWindow.call"

    I've replaced this line with "HWND = FindWindow.call('RGSS Player', 0)"

    and got the problem solved.

    <2> Often, the window doesn't close when I press the "X" button when the movie is playing.

    It misses the "WM_QUIT" message, which originally be dealt with by "Graphics.update"

    This can fixed by replacing "GetMessage.call(buffer, HWND, 0, 0) " with GetMessage.call(buffer, 0, 0, 0)

    But I'm not sure if this change will cause another bug or not...

    <3> The screen flickers when the mouse moves upon the screen.

    This problem can be solved by adding "WS_CLIPCHILDREN" flag to the window style.

    Now the script works fine on my computer. Thanks for the script  :)

    I just registered in the forum to give my feedback.

    I'm not familiar with Win32API. What I've written may be wrong.

    Hope that it is helpful and understandable to you. >__<

    Sorry for my poor English. I'm Taiwanese.
     
    #73
  14. Zeus81

    Zeus81 Veteran Veteran

    Messages:
    164
    Likes Received:
    149
    First Language:
    French
    Hello khiavwolf and thanks for your comment, I'll add all this on the next release. ;)


    The exit should already be handled (it works for me).


    It always fails or it's just randomly buggy?
     
    #74
  15. BlackLodgeGames

    BlackLodgeGames Villager Member

    Messages:
    19
    Likes Received:
    4
    Location:
    Spokane, WA, USA
    First Language:
    English
    Thanks for keeping this script alive.  I am an active user as well, but my game engine is heavily modded, so my experience with your script will not reflect your typical user.  Nevertheless, if my experience can help anyone else who happens to be in a fringe scenario, then it's worth sharing. 

    Anyway, when I changed and replaced this:

    HWND = GetForegroundWindow.callto the suggested code:

    HWND = FindWindow.call('RGSS Player', 0)it resulted in an error traced back to that line of code which said:

    "NameError occurred. uninitialized constant Graphics::FindWindow"

    granted, my engine barely resembles stock RPG Maker XP at this point, so for most stock engine users, khiavwolf's code changes are probably needed, but I did want to point out that this change is not compatible with me, and when I test with Skype, I do not experience any issues with it's window being used instead of the Game.exe window.  This may have to do with my other Win32API calls and dlls I am using for multiple resolutions, but regardless I will be staying with the original "HWND = GetForegroundWindow.call" since it works for me on my test machines.  I also long ago disabled window mode and have hidden the mouse cursor with "Win32API.new('user32', 'ShowCursor', 'i', 'i').call(0)" at the top of "main" script entirely in my engine as well.

    Thanks again khiavwolf and Zeus81. 
     
    #75
  16. khiavwolf

    khiavwolf Villager Member

    Messages:
    5
    Likes Received:
    2
    First Language:
    Taiwanese
    Zeus81:

    It always fails for me.

    When I click exit button, it does nothing. Then, after the movie is cancelled(or stops), the game closes automatically.

    My version is "Ruby 1.8.1", "RPGXP 1.02" with "RGSS102J.dll"

    BlackLodgeGames:

    Sorry, It should be

    FindWindow = Win32API.new('user32', 'FindWindow', 'pp', 'i')HWND = FindWindow.call('RGSS Player', 0)The following steps are what I have done to trigger that problem:

    (1) Press F12 to test my game.

    (2) Switch to Skype to talk with someone immediately. (The game window has popped out, but the title picture hasn't showed.)

    (3) Switch to my game and then trigger the event to play the movie.

    (4) The movie plays on Skype.
     
    #76
  17. Zeus81

    Zeus81 Veteran Veteran

    Messages:
    164
    Likes Received:
    149
    First Language:
    French
    #77
    Archeia likes this.
  18. ViperX420

    ViperX420 Veteran Veteran

    Messages:
    62
    Likes Received:
    23
    First Language:
    English
    I recently tried using your script for my project to stretch my movies and as soon as i even start the game i get this error.

    [​IMG]
    This is the chunk of code it points to below.

    def open_video_player(position=0) if ZVP_OldAviMode return false unless mci("open \"#{@zvp[:filename]}\" type AVIVideo alias ZeusVideoPlayer") return false unless mci("window ZeusVideoPlayer handle #{HWND}") return false unless mci("play ZeusVideoPlayer from #{position} notify") else return false unless mci("open \"#{@zvp[:filename]}\" type MPEGVideo "\ "style Child parent #{HWND} alias ZeusVideoPlayer") return false unless mci("play ZeusVideoPlayer from #{position} notify") return false unless mci('status ZeusVideoPlayer window handle') @zvp[:hwnd] = mci_result.to_i EnableWindow.call(@zvp[:hwnd], 0) style = GetWindowLong.call(HWND, -16) #GWL_STYLE SetWindowLong.call(HWND, -16, style | 0x02000000) #WS_CLIPCHILDREN end 
    There is only a few things i can think of that is causing this could it be a codec issue? if so what codec do i need and where to find it? these things would be nice to have with the script so people know what they are looking for exactly :)
     
    Last edited by a moderator: Apr 18, 2014
    #78
  19. Zeus81

    Zeus81 Veteran Veteran

    Messages:
    164
    Likes Received:
    149
    First Language:
    French
    #79
  20. ViperX420

    ViperX420 Veteran Veteran

    Messages:
    62
    Likes Received:
    23
    First Language:
    English
    yay! it works thanks alot Zeus gonna setup a video to try with the script code you mentioned to use with events to run movies to test if its 100% working now :) I will update this post in a little bit after i finish creating the video and testing it :) Now one last question what should i set the default size of my movies for it to fit perfectly or does that even matter now?
     
    #80

Share This Page