Jump to content

  • Log In with Google      Sign In   
  • Create Account

AVI's


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 27 October 1999 - 02:00 AM

What's the best way to play AVI's.. I've
seen this question been asked before, but
with no answer.. I want to show a logo
before I go into the game.. It needs to
be full screen though.. The logo right now
is 640x480, which is fine for going into
DirectX.. What's the best way to do this?


Sponsor:

#2 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 23 October 1999 - 08:34 AM

You want the best way? This is what commerical games like
like Starcraft use. You asked for it:

Smacker.

http://www.radgametools.com/smkmain.htm


#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 23 October 1999 - 11:10 AM


But, if you searched the web, you have a couple of options:
(sorry I don't have any links available)

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
to DirectX.

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
bitmaps?
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.


#4 emfb   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 October 1999 - 02:55 PM

What you want is DirectShow, it's part of the DirectMedia 6.0 SDK

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.


#5 DarrenNix   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 October 1999 - 04:36 PM


WELL. I HAVE AN ARTICLE THAT THEY HAVEN'T POSTED HERE YET, called "Working With AVI Files". It's on my website:

Dream Design

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).

Email darrennix@msn.com anytime.


#6 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 26 October 1999 - 09:44 PM

I just want to add that the whole point of using AVIs is to take
advantage of compressed animation. The reason why I recommended
using uncompressed images is that it will guarantee you it will
work on any machine. I don't really like the idea of using
uncompressed AVI images, but I feel like I am forced to use them.

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.

Reaver


#7 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 27 October 1999 - 02:00 AM

If you want to garentee handling a specific AVI compression format supply the codec filter.

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!

Phill





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS