Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Godfather on October 23, 2007, 08:11:23 AM

Title: Help! "PlayVideo" Problems.
Post by: Godfather on October 23, 2007, 08:11:23 AM
I very badly speak English, so I say briefly.
When I play a AVI-file through "Game.PlayVideo", by pressing the button of the mouse of a video comes to an end and the stage is loaded.
Question: How to make that a video played up to the end, even by pressing the mouse?
Title: Re: Help! "PlayVideo" Problems.
Post by: Jyujinkai on October 23, 2007, 08:15:33 AM
make sure your video dose not have compressed audio. AVI playback dose nto support compressed audio..... It is a very good idea to make a OGG file out of your video WME supports these formates a lot better.
Title: Re: Help! "PlayVideo" Problems.
Post by: Mnemonic on October 23, 2007, 03:14:12 PM
Full screen video can be interrupted by keyboard and mouse. That's the way it is. If you need more control, you'll need to use a video entity instead of the Game.PlayVideo()/Game.PlayTheora() methods.
Title: Re: Help! "PlayVideo" Problems.
Post by: Godfather on October 24, 2007, 05:08:23 AM
Sorry, but I don't understand, how I this do ???
Title: Re: Help! "PlayVideo" Problems.
Post by: CMK2901 on October 24, 2007, 10:23:39 AM
When you call "Game.PlayVideo", you are really sort of telling the engine to play a video on the "Game" object, which is the whole screen.  This is what allows the user to click and skip your video.

If you have an entity in your scene (let's call it "VidEnt") at position 0,0 on the screen, and the video was the right size to fill the screen, you could call VidEnt.PlayVideo/VidEnt.PlayTheora to play an unskipable movie on the VidEnt entity.  I believe that is basically what Mnemonic is getting at.
Title: Re: Help! "PlayVideo" Problems.
Post by: metamorphium on October 24, 2007, 11:31:32 AM
the code would look like this:

Code: [Select]
Game.Interactive = false;
var ent = Scene.GetNode("EntVid");
ent.PlayTheora("Path to ogg file");
while (ent.IsTheoraPlaying()) Sleep(1);
Game.Interactive = true;
Title: Re: Help! "PlayVideo" Problems.
Post by: Godfather on October 24, 2007, 12:02:22 PM
Thanks metamorphium, all works, very badly that it's impossible to make through "Ent.PlayVideo()".
Because at me the bad quality in a format Theora has turned out.
Title: Re: Help! "PlayVideo" Problems.
Post by: metamorphium on October 24, 2007, 12:08:42 PM
Godfather: what exporter do you use? I use ffmpeg2theora and I have very good FMV quality with it.
Title: Re: Help! "PlayVideo" Problems.
Post by: Jyujinkai on October 24, 2007, 03:04:37 PM
theora uses multis of 16 i think it is so... make sure you image dimensions are x16, that way the exporter will not scale the video at all.
Title: Re: Help! "PlayVideo" Problems.
Post by: Godfather on October 25, 2007, 09:05:06 AM
I make through VLC. Has tried through ffmpeg2theora, it has turned out normally.