Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: TheMagician on Fri 11/06/2004 11:49:50

Title: Loading time of Video
Post by: TheMagician on Fri 11/06/2004 11:49:50
Hi everybody.
Here's the deal:

The intro of my game starts with a music playing and a scene scripted in AGS - so there are real characters running around the screen ... but then a full screen video starts to play (using PlayVideo function) with credits and 3d effects. The music from the game keeps playing (no sound from the video) as I want it because there  is a fluid transition between the AGS scene and the video.
Problem: When the game is executed for the first time since you turned your computer on there is a one second delay before the video is played. But my effects in the video are timed to the background music. Now that doesnt match anymore.

Specs:
2,2 GHz Atlon
Video size: only 1.5 MB
Colour Depth: 16bit

Any ideas how to work around this problem?
Title: Re: Loading time of Video
Post by: scotch on Fri 11/06/2004 12:49:24
I'm not sure what causes the delay just the first time.  But it might be the OS loading the codec and movie player.. I guess one way to make it do this beforehand would be to play a very short blank movie at the start of the game, using the same codec as the movie from later on, so that it'll already be in memory when you need to use it for a fluid transition.
Title: Re: Loading time of Video
Post by: TheMagician on Fri 11/06/2004 13:05:49
Thanks Scotch,

I didn't think of the codec being the problem ... I will try your suggestion ... very interested in the result

Stefan
Title: Re: Loading time of Video
Post by: Pumaman on Fri 11/06/2004 16:08:41
Yep, it's the initial codec load. Adding a very short blank video that uses the codec to the start of your game is the best way around it, as scotch suggested.
Title: Re: Loading time of Video
Post by: TheMagician on Sat 12/06/2004 14:40:04
Works perfect now!

Thank you!
Title: Re: Loading time of Video
Post by: Mr Flibble on Sat 12/06/2004 23:10:26
Whilst your here, whats the best way to compress to .avi file? I intend to zip them separately, but which codec should I use?
I ideally would like one that everybody has. (NOT DivX)
Or should I just note which one I use, them supply a download link to it ( if there is one)
Title: Re: Loading time of Video
Post by: strazer on Sat 12/06/2004 23:27:03
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=8417.msg103662#msg103662

May I ask why you don't want to use Divx? Xvid is pretty common too.

I can only speak for myself, but I won't install some obscure codec just for one game.
Title: Re: Loading time of Video
Post by: Mr Flibble on Sun 13/06/2004 17:00:22
Well for a start, I don't have DivX, well, I have Div2 or something. Older PC's (like my Win95) generally don't have it.
And if you don't have it, the (free) download has a load of adware and spyware, which can't be destroyed without making the codec unusuable.

And, as you said yourself, I won't install some obscure codec just for one game, nor would I expect others too.
Title: Re: Loading time of Video
Post by: TheMagician on Sun 13/06/2004 17:01:32
Well, I use a compressor that converts the file to 256 colours to match the game. Its from micosoft ... and I think it is standart on all windows machines ... might be wrong though.

A problem I have with DivX is that whenever I run a movie, a small logo shows up in the lower left corner ... I think I have to buy a full version or something.

Or are there DivX versions without that logo?
Title: Re: Loading time of Video
Post by: Mr Flibble on Sun 13/06/2004 17:09:21
If you have the free version, then thats the adware.

The version I had was worse though.
Play a DivX encoded movie.
Launchs my internet browser and overloads me with adds.
Causes a fatal error on my PC.

-Ctrl-Alt-Del

Thats why I hate DivX. I may use MPEG-1, but the file sizes get big.
Title: Re: Loading time of Video
Post by: scotch on Sun 13/06/2004 17:09:32
I've never seen a Divx movie with a logo on it.Ã,  But Xvid is similar to Divx in quality/size (slightly better in most tests I think) and it's free.Ã,  http://www.divx-digest.com/software/xvid.html has the codec on it.
The codec is only half a mb so if you're making a large game then you could include it with it and it wouldn't make much difference.Ã,  But most people who view avis from the internet much will have an xvid codec already installed.
Title: Re: Loading time of Video
Post by: TheMagician on Sun 13/06/2004 17:23:13
Hmm, what am I doing wrong with that logo (its pritty big)

Do you know if the codec you linked to is spyware-free ?
Title: Re: Loading time of Video
Post by: Barbarian on Sun 13/06/2004 17:29:59
A good, and free, alternative to installing many of the popular codecs, and with no spyware/adware, you can get at:
ffdshow, over at: http://cutka.szm.sk/ffdshow/about.html
Title: Re: Loading time of Video
Post by: strazer on Sun 13/06/2004 18:43:17
QuoteAnd if you don't have it, the (free) download has a load of adware and spyware, which can't be destroyed without making the codec unusuable.

The free version of the Pro edition is indeed adware. There's also the "Standard DivX Codec(FREE)" without spyware just below that table. It only lacks some advanced encoding options afaik.
But the TheMagician is right, I forgot all about that logo. That sucks.

So if your video is not too long, just go with MPG1.
Title: Re: Loading time of Video
Post by: Mr Flibble on Sun 13/06/2004 21:50:05
So would MPG-1 would be listed as a choice, or is it another name for uncompressed?
Title: Re: Loading time of Video
Post by: strazer on Sun 13/06/2004 21:55:52
Not in VirtualDub.
You need a MPEG encoder, for example TMPGEnc (http://www.tmpgenc.net/).