Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: RyeGuy83 on Tue 20/09/2011 20:46:57

Title: How do I play a .wmv video file in my AGS game?
Post by: RyeGuy83 on Tue 20/09/2011 20:46:57
How do I play a .wmv file in my AGS game?   I have made an intro video to my game and can't figure out where to place it or add it, so that I can call the PlayVideo(); function.   Someone please help!!  Trying to figure it our for our class.
Title: Re: How do I play a .wmv video file in my AGS game?
Post by: pcj on Tue 20/09/2011 20:56:36
It's just PlayVideo("filename.wmv",VideoSkipStyle, int flags);
Title: Re: How do I play a .wmv video file in my AGS game?
Post by: dbuske on Tue 20/09/2011 22:19:36
Get a utility to convert the wmv to avi.
Put the avi video in the games document folder under the compiled directory.
Title: Re: How do I play a .wmv video file in my AGS game?
Post by: pcj on Tue 20/09/2011 22:20:38
You don't have to convert to AVI - PlayVideo can play anything a DirectShow player can - which includes WMV.
Title: Re: How do I play a .wmv video file in my AGS game?
Post by: Arjunaz78 on Tue 20/09/2011 23:01:24
Really? but i got an error when try to run my games that includes the .avi format,the screen becomes blank with black screen and then hangs up,why?

But i success when running .wmv file that i put on my games..currently i've a current K-Lite codec installed on my PC & Media Player Classic that can running DirectShow filters video/audio decoding,what's wrong?
Title: Re: How do I play a .wmv video file in my AGS game?
Post by: pcj on Tue 20/09/2011 23:04:26
Arjunax, it sounds like you have a problem with a particular codec.  I prefer to use OGG Theora video for AGS anyway since it's integrated into the game files.  But WMV and AVI should play fine.
Title: Re: How do I play a .wmv video file in my AGS game?
Post by: Dualnames on Wed 21/09/2011 06:11:57
I'd prefer wmv over avi any day. And frankly scrap wmv and avi, and just use .ogv. Those are bundled with the exe, and also get converted to like at least 50% of the size, so you save up size and also protect the video. It's a win-win situation.


I may suggest the following program that I've been using. You just drag a wmv over it, and it converts it.
Download (http://duals.agser.me/Files/theora.rar)
Title: Re: How do I play a .wmv video file in my AGS game?
Post by: arj0n on Wed 21/09/2011 16:44:19
Quote from: Dualnames on Wed 21/09/2011 06:11:57
I'd prefer wmv over avi any day.
Indeed
Title: Re: How do I play a .wmv video file in my AGS game?
Post by: Rez on Tue 27/09/2011 11:23:50
I'm on the team with RyeGuy here for senior P. I felt it was worth mentioning that when we were in direct9 mode we could not see our video when we ran the compiled exe. We switched to D. Draw and everything was coo. Not to versed in the ways of video cards so anyone know why that may happen? We got our movie playing and honestly direct9 isn't really important for our game but I feel this may be an issue for some. Maybe just us lol. All 3 of our laptops had the issue.  And Mine is a suped up XPS.
Title: Re: How do I play a .wmv video file in my AGS game?
Post by: RyeGuy83 on Tue 27/09/2011 19:32:15
Yeah.  We got it working, once we changed it off Direct9