   Video in games
  Hi,We are creating a new horror action adventure game here and although the game is getting very scary, we still need movies to spice the game up a little.Now there are tons of codecs to compress your video data, and there are lots of ways to present those video's in your game, but I'm looking for a good way to do this!What do other games do? Is there a way to make sure you use a video codec that every customer already has on his system? Or is it possible to use DivX for example even when the customer didn't install this codec?Then there's the playback. M$ says that DirectShow is not the way to go for movie playback in games because of performance issues, but what should we use instead?I heard about Bink and things like that, but we can't afford this kind of technology (we're only just working on our second game and still have to earn money from our first game).So what's the way to go when we want to render avi's to textures? What codec should we use and what's the best technology to use (no or very low cost) to render it?Technical info: The game is created in C++ (Visual Studio 2003 .NET) using DirectX for 3D graphics and sound.Can anyone help?Dirk.   
  I just came about from using DShow for texture rendering and it was hell. So I reverted back to good old VfW and was done in an hour. Don't worry about codecs, that's all handled behind the scenes. Pick an average codec that's installed on most systems and you'll be fine. Here's some example code to get you going: viewAVIBe aware that introducing video into your application puts another high demand on your artwork, i.e. you will need some quality footage which is hard to find and/or produce. You'd rather show no video at all than presenting your users with something awful.[Edited by - Prototype on June 1, 2006 7:51:40 AM];  Thank you for the info.I have no experience at all with video rendering, so if you say VfW is the best to use, then I will.The example you linked to doesn't work, can you check this please?Don't worry about the quality, I have a great designing team.When I have some screenshots or maybe a demo movie, I'll show it.You say that I shouldn't worry about the codec, but it seems that all the codecs that are standardly available in windows 2000 are crap... or didn't I look good enough?   ;  Sorry, I forgot to check the link.It's fixed now.BTW many of the standard codecs are crappy indeed, but most users will have some codec pack installed. Overall I guess Windows Media is your best option in terms of compatability and freedom of use. Remember that some codecs have licensing issues, such as DivX.   ;  Seems like a very nice example!I'll look into it!Thank you very much!   ;  I believe you can distribute the FFMPEG DLL with whatever you use, and use that to decode video from many formats (including Ogg Theora, MPEG, H.261, NSV and XViD).   ;  Aha, that might be interesting, but...Can I use the AVI decoder of Video for Windows for an mpeg encoded file?:-)   ;  Good news!Thanks to your help and your very useful example (so I didn't have to study the whole API), I now have no more frame skips and keep my framerate at 167fps!!This was great help!Now I'll try to find out what is probably the best code to use for me.I hope I can use XVid by just including the FFMPEG DLL and still using VfW.   