Jump to content
Posted 27 October 1999 - 02:00 AM
Posted 23 October 1999 - 11:10 AM
A file called avidd95.exe from microsoft that only works
with 8-bit DD images. Description: "Direct Draw Example
for 320x240 and smaller AVI".
Get the multimedia win32sdk (the ones with the audio and
video directories) from microsoft and convert the AVI examples
Look for the files called ClassAVIPlayer.zip and avisurface.zip.
These are programs written by individuals for AVI and DirectX
on the web. Used to be on this site I think.
This is one way to do it for any 16-bit screen:
1. Store your AVI as 16-bit *uncompressed* frames. This way
you don't need to use any codec to decode the frames, and you
can directly blit the image to the screen. The price you pay
is large files. If the images are bitmap, save them as upside-
up instead of upside-down so you don't have to do any additional
flipping while blitting your frames.
2. Q: How do you save your AVIs as uncompressed 16-bit, upside-up
A: Either write out the AVIs yourself or find a program to do
it for you.
3. Save your AVI with small dimensions, and then blit stretch each
frame to the screen, if you want to reduce the size of your files.
Q: How do you blt stretch DD surfaces?
A: If it is not supported, you need to write it yourself.
If you have problems getting the example AVI programs (mentioned above)
to work, is probably because they call a codec decompressor to handle
the frames, and your computer doesn't know how to handle it. That's why
I say forget codecs and save your AVI with uncompressed frames.
4. Do you even need AVIs for animation? No, you don't. Just create
a single bitmap with animation cells, load them into DD surfaces,
and blit them to the screen one at a time.
Posted 26 October 1999 - 02:55 PM
You can check out the documentation at: http://www.microsoft.com/directx/dxm/
More specific to your question: http://www.microsoft.com/directx/dxm/help/ds/AppDev/Play_Movie_from_C++.htm
It can play mpg,avi and even mp3 files. Best of all its a no brainer to add to any program.
Posted 26 October 1999 - 04:36 PM
Now this article was written with Microsoft's original AVIFile interface in mind. That's the easiest and fastest interface to decompress video and audio sequences. I have two sample codes showing the rendering into DirectDraw, and a complete royalty-free wrapper class.
I would recommend DirectShow if you intend to synchronize game animation over video (although one of my samples does that anyway), or if you have high quality movies and require the fastest frame rates. The AVIFile interface is an excellent alternative to use while you're learning DirectShow (which has a higher learning curve).
Posted 26 October 1999 - 09:44 PM
So, my question is, how would you handle this if you wanted to use
*compressed* AVI images? I understand that codec decompressors are
stored as DLL files in your window's system directory. Is it
legal to redistribute these DLLs with your game and install them
yourself to insure compatibility? If not, it sounds like the only
way to have compressed AVI images and insure compatibility is to
come up with your very own codec decompressor. And I don't like
using DirectShow either.
Posted 27 October 1999 - 02:00 AM
How to know what file supports what filter, and how to register it? I know how to hand files with the exstension .ax but the standard ones are handled differently.
But what I do know is if you use an Intel Indeo compression format then just supply the Intel Indeo installation which I beleave to be freely distrabutable. Where to get it is a different matter.
As for the the easyest way to code the video into an application especially to a Direct Draw surface and Direct Sound buffer use Direct Show's multimedia streaming archtecture. If you don't beleave me take a look at the tiny examples at: http://www.microsoft.com/directx/dxm/help/ds/mms/Sample_Code_mms.htm
82 lines for a complete application that plays a video to the primary surface!