Videos - Best Format to Use?

Started by Scorpio82, Wed 02/08/2006 15:28:56

Previous topic - Next topic

Scorpio82

 Hi everyone,

I've been working on a game that's going to require a lot of FMVs for the cut-scenes, and was doing some tests last night to see which format would work best.Ã,  I rendered out a sample video in four different formats: AVI, MOV, RM, and WMV, but upon playback in AGS, here's what I got:

AVI (DivX 5 Codec): Decent size, medium quality, and there's a hiccup** before loading the next room.
MOV:Ã,  Large size, excellent quality, and no hiccup, but it does have a slight audio scratch at the end.
RM:Ã,  Decent size, excellent quality, but it cuts off the last two seconds of video, plus it hiccups and scratches at the end.
WMV: Same as RM, but with half the size.Ã,  If I add two seconds of blank video to the clip, you still get the hiccup and scratch.

I'd like to know if other people have these problems, and if there's a way to work around them.Ã,  What video format produces the best playback quality, with the lowest size, and no recurring technical glitches?

At the moment, I set the scripts to run before the room fade-in.Ã,  If there's a better place to put the script that'll make it run better, let me know.

Current Script: PlayVideo("sample.ext", 1, 1);

**After the video ends, the game window will momentarily go outside the program as if to read from something else.Ã,  If the game is run in fullscreen, it will return to Windows during this time, and you'll have to click the program to get back in.Ã, 

Electroshokker

#1
hmm...

have you tried the avi format and other codecs? it's the codecs that reduce size and make the quality, not the avi format itself.

try out xvid (http://www.xvidmovies.com/codec/) with the ogg codec (http://www.vorbis.com/), that's what I use.

(use VirtualDubMod to re-encode http://www.free-codecs.com/download/VirtualDubMod.htm)

if you check out the free-codecs site, DON'T download the codec packs. They screw up stuff. Rather, download the individual codecs you need!

Depending on the movie itself (lots of static screens/lots of movement on screen) there's a difference between codecs as well. (some codecs start screwing up when there's too much movement close to each other on screen)

It's all basically trial and error. Let me know if you found the best combo.

Pumaman

When considering video formats, you also need to consider what the player will have installed. You can assume they'll have MPEG-1, but that gives a large file size. DivX/XviD is a good choice, as is WMV; but RM/MOV are relatively obscure and a lot of players probably won't have the codecs necessary to get them working in Media Player / AGS.

Scorpio82

Quote from: storyteller on Wed 02/08/2006 15:41:51try out xvid (http://www.xvidmovies.com/codec/) with the ogg codec (http://www.vorbis.com/), that's what I use.

I use Ogg for compression at work, but haven't been too impressed with the quality when you try to get the file size down small enough.Ã,  But I'll give XVid a shot.

I'm really leaning toward WMV for this, and I can get a 20-second video down to a nice looking 100K with it.Ã,  Except, as I said, when I run the video in AGS, the video cuts out in the last two seconds with a weird split-second audio scratch.Ã,  Not to mention it minimizes the game after the video ends if it's running fullscreen.Ã,  Ã, 

Is this related to the fact that I put a "Go to Different Room" action right after the video script action, or is there something else in AGS that causes this?

LimpingFish

#4
If the codec is open source, or free to distribute, you could include the codec installer with your game. Providing, of course, that it doesn't bulk up the MB count of the overall package. But as you said your game is FMV heavy, then an extra 2 or 3MB won't make much difference.

Edit: Hmm. I've tested running FMV clips, WMV format, within AGS in the past and haven't run into the problems you mention. Changing rooms directly after the video could be the problem.  :-\

Btw, what resolution is your game?
Steam: LimpingFish
PSN: LFishRoller
XB: TheActualLimpingFish
Spotify: LimpingFish

Scorpio82


I'm working at a simple 640X480 resolution.

I gave XVid a shot and it seems to be working great.  It still has the hiccup/scratch problem though - but only randomly now.  I tried putting a Wait command after the video and it still scratched before waiting, so it has something to do with the way the program is unloading the video and nothing to do with loading another room.  It might be something as simple as unchecking a box.

Pumaman

Has anyone else had these sort of problems with playing videos?

LimpingFish

It could simply be a drop in the AGS engine's performance. I was getting sound and music glitches, hiccups and skipping, when I was using 800x600 resolution on my game. I reduced it to 640x480 and the problem was largely solved.

Something similar could be happening here.
Steam: LimpingFish
PSN: LFishRoller
XB: TheActualLimpingFish
Spotify: LimpingFish

Scorpio82


Yeah, now that I think about it, it might also be my computer trying to run two programs at once (both the player and the tester.)  I know I don't have the best graphics card, but I didn't think it would matter since I'm running such a lower requirement program than I'm used to.

When I get home, I'll mess around with some graphic settings on my system and see if it has any effect.

SMF spam blocked by CleanTalk