Direct3D video playing, DirectShow and Bink

Started by
1 comment, last by Mark Tanner 20 years, 7 months ago
This has been asked many times before, but it always has left me with questions. I want to play videos (.avi''s or similar) with sound in my D3D app. (DX8/8.1) OK, so I should probably go with DirectShow. In that case: 1. Which codec should you save the avi in? You don''t want to distribute codecs with your game, so you''d want to use something that most people have installed already, right? 2. Does anyone have a working sample for a (fullscreen) D3D app? I know the Microsoft sample (cutscene) works stand-alone, but it fails if I incorporate it into a D3D app, most likely something to do with starting up a fullscreen window over the current window or the ActiveX window being in the background? You''d figure most people would want to have it inside of their D3D app so you can play a video fullscreen at any time. It must be something simple, the code looks pretty standard and short. Apart from DirectShow, is there another way to let Windows decode an avi with sound, for example to a RGB(A) 888(8) buffer? Finally, there''s Bink. I know it costs major bucks (5000 USD or thereabouts), but I hear the quality is good and there are no codec/sound issues. It may be worth it for a final game, is there anyone who''s used it who can comment or post a code sample of how easy this is to use this api to play a video fullscreen in a D3D game before I consider this option more seriously? Thanks for all input! Mark
Advertisement
Well, if I were you I''d embed a copy of the Microsoft Media Player onto a form and get that to render the vid
Not the best method, but one that''d work.
As for format, try an oldish one such as MPEG1.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

Re: Bink

Yes, it''s worth the bucks. Speed and quality are good. It''s a clean and simple API, and the toolset is solid. Playing back the video into a D3D8 texture takes maybe ten lines of code, twenty if you want to support dynamic textures where available :-)

Also worthy of note, the ability to mix multiple soundtracks into one movie and select which to play back at run time is well implemented.

This topic is closed to new replies.

Advertisement