• Advertisement
Sign in to follow this  

What can be used to play movies?

This topic is 3001 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, First off I can't seem to find an answer as to if DirectShow is depreciated? Is it? Second, if it is then what is used instead? I am looking to play a few avi files but am not sure what I should be looking into at this point. And suggestion? Regards Chad [Edited by - chadsxe on December 1, 2009 1:59:40 PM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
DirectX Documentation

DirectShow is no longer recommended for game development. All the DirectShow components (headers, libraries, utilities, tools, and samples) were removed from the DirectX SDK in the April 2005 release. DirectShow is available in the latest Platform SDK Install.


Share this post


Link to post
Share on other sites
Quote:
Original post by eFoDay
Quote:
DirectX Documentation

DirectShow is no longer recommended for game development. All the DirectShow components (headers, libraries, utilities, tools, and samples) were removed from the DirectX SDK in the April 2005 release. DirectShow is available in the latest Platform SDK Install.


Well that is the thing. If DirectShow is not recommended then what is?

Regards

Chad

Share this post


Link to post
Share on other sites
Some more links to check out

Windows Multimedia
Microsoft Windows multimedia support enables applications to use sound and video.

Video For Windows
Microsoft® Video for Windows® (VFW) provides functions that enable an application to process video data.

Windows Media Player SDK
Embedding the Windows Media Player control is supported for a variety of technologies, including programs created with the Microsoft Visual C++® development system.

Share this post


Link to post
Share on other sites
DirectShow
Using DirectShow, your applications can perform high-quality video and audio playback or capture.

It looks like its still a current technology, it's just not included with DirectX anymore.

CutScene Sample
The CutScene sample plays a video file in full-screen mode until the user types ESC, ENTER, or the space bar.

Share this post


Link to post
Share on other sites
Quote:
Audio/Video Playback

Media Foundation supports two different APIs for playback, MFPlay and the media session. MFPlay requires Windows 7, but is considerably simpler than the media session. The media session is supported in Windows Vista and later.


Quote:
Media Foundation SDK

The Microsoft Media Foundation software development kit (SDK) enables the development of applications and components for using digital media on Windows Vista and later.


So I guess if your still using XP then DirectShow is still what you use?

[Edited by - eFoDay on December 1, 2009 6:07:27 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by pablo24
You are supposed to use the Media Foundation instead of DirectShow.

Microsoft Media Foundation SDK

Media Foundation Developer Forum


Also, not saying your wrong but where does is specifically we are to use Media Foundation instead of DirectShow. More so why. I can't find any actual evidance as to why.

And again for that matter that DirectShow is in fact depreciated.

Regards

Chad

Share this post


Link to post
Share on other sites
Not much help I think, but I remember there was a sample in an old Dx9 SDK that played a video on a cylinder in D3D. That was back in the day when DirectShow was part of the DX SDK.
[EDIT]: Actually, I've just checked, the sample uses D3D8 to play the video on the cylinder, but I don't think it would be difficult to port it, since it's based on a tutorial and is supposedly simple. It's called Texture3D and you can find it in the "Samples\DirectShow\Players\Texture3D" of the old (2003?) SDK. If you want, I can post it somewhere for you. That's where I'd start.

OR, there is this sample from the Nvidia SDK about video filters and applying shaders to them and stuff, which could more suitable as a starting point.

Share this post


Link to post
Share on other sites
Quote:
Original post by _Camus_
And, for render some avi clip as texture? any suggestion ?


Take a look at the post I made here

Share this post


Link to post
Share on other sites
I swear I have spent the better part of two days looking for a more concrete answer but I just can't find one. The example that hikikomori-san gives is actually using DirectShow. But then again it is using a Geforce6 and if I am not mistaken that was around 2004.

Share this post


Link to post
Share on other sites
I'd also be interested to know what we're supposed to use. I was under the impression that games tended to use DirectShow to render to textures, but I know that can be a lot of work to get working, and requires that the end user has the correct codec installed and so on.

I know Quake II and presumably several other games use some custom video renderer (I don't know if it's a custom format, or just a weird file extension though).

Share this post


Link to post
Share on other sites
AFAIK bink should be the way to go.

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

Share this post


Link to post
Share on other sites
Quote:
Original post by undead
AFAIK bink should be the way to go.

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


One Product Windows, Mac, Linux, PSP, or DS: $6000 US
One Product Xbox 360, PS2, PS3, or Wii: $7500 US

Yikes

Share this post


Link to post
Share on other sites
Quote:
Original post by Machaira
There's always this.


That is fine for XNA (C#) but what about DirectX (C++)?

Share this post


Link to post
Share on other sites
I've implemented a video player into my DirectX 9 game a few months ago, it renders videos to texture and plays the sound in the background using DirectShow->Direct3D9Texture for the video, and DirectSound for audio IIRC. It's was fast enough to play a 320x240 .avi video in a real-time SM3.0 game scene @ 300+ FPS.

It was a ton of work, and I believe I had some issues with audio "starving", where the audio would skip, and those took a while to resolve [ especially since I'm not using DirectSound directly for my game audio ]. Also codec issues across some test machines, on and on...ugh.

I used the video on a cylinder example that was referenced above, I know it's an old sample, but short of BINK, I couldn't find any solutions to the issue myself, so I decided to save a few thousand dollars and just code it up....since I'm trying to support XP/Vista/Windows7.

Quote:
I swear I have spent the better part of two days looking for a more concrete answer but I just can't find one. The example that hikikomori-san gives is actually using DirectShow. But then again it is using a Geforce6 and if I am not mistaken that was around 2004.


So, lol, it's not like you need shader model 5.0 to render video-to-texture. [grin]

Hope I could be of some help, it's good to hear about the "Media Foundation SDK", that sounds like the solution in the future - but for now though if you're stuck having to support XP I'd go for that cylinder sample as your base/start.

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
I'd also be interested to know what we're supposed to use. I was under the impression that games tended to use DirectShow to render to textures, but I know that can be a lot of work to get working, and requires that the end user has the correct codec installed and so on.

I know Quake II and presumably several other games use some custom video renderer (I don't know if it's a custom format, or just a weird file extension though).


Bink (and Smacker before that) is the de facto standard for videos in commercial games. Take a look at the list of games here.

It costs next to nothing (relative to the budget of even a small commercial game) and works very well on all platforms that matter.

If you can't afford it, I think DirectShow or VfW are your best bet. The successor of DirectShow is Media Foundation btw, but it's Vista+ only.

There are some free codec like Theora, but most video solutions usually focus on getting the best quality for bytes ratio, and need ridiculous amounts of CPU and even GPU power to run smoothly. For games, the space needed by the video is usually not an issue (because they are often short), but CPU time needed for decoding is an issue...

Share this post


Link to post
Share on other sites
So I figured I would chime in and say what I ended up using. I used both DirectShow and Media Foundation. I developed my wrappers side by side. As the "Engine" initializes it check what OS is being used and acts accordingly. I figured it would not hurt for me to learn Media Foundation anyways.

Thanks again

Regards

Chad

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement