Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Toonloon on Sat 02/07/2011 00:27:11

Title: Video plays in the editor but not in the compile
Post by: Toonloon on Sat 02/07/2011 00:27:11
I can't find anything in the tutorial about this.

When i run the game in the editor, it works perfectly. My video plays in the first room, then the character moves straight into the second room and the game begins. But when I tried to share the build with a colleague, I tested it first and I could hear the audio from the video, but not see anything.

I suspect it's something to do with the size of the video, but I've been wrong about everything else.

The video is an avi and it's resolution is 720 x 576. My game is set to 800 x 600. Does that matter? Am I going to have to rebuilt the video from scratch with custom 800 x 600 resolution?

Thanks.
Title: Re: Video plays in the editor but not in the compile
Post by: Wyz on Sat 02/07/2011 01:23:34
Just checking: From which function to you call the video function?
Title: Re: Video plays in the editor but not in the compile
Post by: monkey0506 on Sat 02/07/2011 04:44:02
Also, you do have the AVI in the Compiled folder, right? The only video type that can be compiled into the game EXE is OGG Theora with the OGV extension, anything else has to be distributed with the game.
Title: Re: Video plays in the editor but not in the compile
Post by: Toonloon on Sat 02/07/2011 12:33:33
function room_Load()
{
 PlayVideo("title1.avi", eVideoSkipNotAllowed, 1);    


Yes, it is in the compiled folder, but I think I'll re-do the file in Premiere and use the file extension you suggested, as I would prefer for it to be included in the .exe.

Thanks again for the tip.

EDIT: I've tried a couple of OGV converters and none of them have worked. How do you convert your videos? I made my video in Adobe Premiere and exported as an Microsoft AVI. What's the best way to do this please?
Title: Re: Video plays in the editor but not in the compile
Post by: Khris on Sat 02/07/2011 15:22:35
This should be helpful:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=43883.msg583901#msg583901

If you can only hear audio but not see video, it's most likely a codec problem. I experienced the same with vertigoaddict's current MAGS game; but looking at the video outside of AGS worked fine. Not sure what the problem is but ogv seems to be the best route.
Title: Re: Video plays in the editor but not in the compile
Post by: Mehrdad on Sat 02/07/2011 15:49:15
Thats right Khris.BUT....I have before this problem too.Arj0n solved that.

"function room_Load()"  doesnt show video.

anyway type and use this code :



function room_AfterFadeIn()
{
PlayVideo("title1.avi", eVideoSkipNotAllowed, 1);
}

Title: Re: Video plays in the editor but not in the compile
Post by: Khris on Sat 02/07/2011 16:26:37
Toonloon said it worked fine when the game was tested, just not when a colleague wanted to play it on a different machine.
And just for reference, it's not enough to paste that into the script, the function has to be linked to the event.