Loading time of Video

Started by TheMagician, Fri 11/06/2004 11:49:50

Previous topic - Next topic

TheMagician

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?

scotch

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.

TheMagician

Thanks Scotch,

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

Stefan

Pumaman

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.

TheMagician

Works perfect now!

Thank you!

Mr Flibble

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)
Ah! There is no emoticon for what I'm feeling!

strazer

#6
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.

Mr Flibble

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.
Ah! There is no emoticon for what I'm feeling!

TheMagician

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?

Mr Flibble

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.
Ah! There is no emoticon for what I'm feeling!

scotch

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.

TheMagician

Hmm, what am I doing wrong with that logo (its pritty big)

Do you know if the codec you linked to is spyware-free ?

Barbarian

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
Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

strazer

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.

Mr Flibble

So would MPG-1 would be listed as a choice, or is it another name for uncompressed?
Ah! There is no emoticon for what I'm feeling!

strazer

Not in VirtualDub.
You need a MPEG encoder, for example TMPGEnc.

SMF spam blocked by CleanTalk