Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Playing video files in DirectX


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
7 replies to this topic

#1 Muzzy A   Members   -  Reputation: 687

Like
0Likes
Like

Posted 03 June 2012 - 05:24 PM

I can't find any helpful documentation on this anywhere.

I found "IAMMultiMediaStream" on MSDN, but it says it's depricated and shouldn't be used. It doesn't say what I should be using.

Anyone know where to look for this?

Sponsor:

#2 Radikalizm   Crossbones+   -  Reputation: 2974

Like
0Likes
Like

Posted 03 June 2012 - 05:34 PM

DirectX on its own will not provide any mechanisms for playing video, you'll need another library for that

If you're developing for windows only you can use DirectShow/Windows Media Foundation for playing a wide range of video formats without having to worry about codec licensing

If you have a lot of money at your disposal you can purchase a Bink license, which provides a library and codec specially designed for game development which has seen use in loads of AAA titles

Another popular free (GPL/LGPL) cross-platform alternative is FFmpeg, which can play a wide variety of codecs but does not provide licenses for the proprietary ones.
You can also have a look at libtheora which is a decent free and open source codec, but which will require somewhat more work to integrate into your codebase.

I gets all your texture budgets!


#3 Muzzy A   Members   -  Reputation: 687

Like
0Likes
Like

Posted 03 June 2012 - 05:38 PM

Ok I think i remember hearing about Direct Show somewhere. Which is the easiest? I don't really have alot of time to study and then implement the code.

#4 Radikalizm   Crossbones+   -  Reputation: 2974

Like
0Likes
Like

Posted 03 June 2012 - 05:46 PM

Ok I think i remember hearing about Direct Show somewhere. Which is the easiest? I don't really have alot of time to study and then implement the code.


Not having used all of them I can't say which one is the easiest. I've heard from others that Bink is really easy to implement, but the license costs are probably too much for a single-man project.

FFmpeg should be quite easy too, you just have to be somewhat more careful about which license to use and which codecs to include in your FFmpeg build if you don't want any legal trouble

I gets all your texture budgets!


#5 Muzzy A   Members   -  Reputation: 687

Like
0Likes
Like

Posted 03 June 2012 - 05:54 PM

ya i just looked them up, they're all pretty easy, DirectShow is probably my best option due to licensing though thank you.

#6 Scarabus2   Members   -  Reputation: 556

Like
0Likes
Like

Posted 04 June 2012 - 06:36 AM

When you download the DirectShow SDK (which is part of the Windows SDK, I believe) there should be a sample application for playing a video and rendering to a D3D texture (DX9). I based my implementation off of that, but I encountered some threading issues, where the video would just stop rendering, and had to bang my head into it a bit until it went away.

I find DirectShow works pretty good.

Edited by Scarabus2, 04 June 2012 - 06:38 AM.

visualnovelty.com - Novelty - Visual novel maker

#7 Radikalizm   Crossbones+   -  Reputation: 2974

Like
0Likes
Like

Posted 04 June 2012 - 07:30 AM

When you download the DirectShow SDK (which is part of the Windows SDK, I believe) there should be a sample application for playing a video and rendering to a D3D texture (DX9). I based my implementation off of that, but I encountered some threading issues, where the video would just stop rendering, and had to bang my head into it a bit until it went away.

I find DirectShow works pretty good.


We have to keep in mind though that DirectShow is slowly becoming deprecated in favor of Windows Media Foundation, so DirectShow support cannot be guaranteed in the near future

I gets all your texture budgets!


#8 xDarkice   Members   -  Reputation: 112

Like
0Likes
Like

Posted 05 June 2012 - 04:07 AM

You can also use gstreamer, which provides support for video and audio files aswell. Gstreamer itself relies on other libraries like ffmpeg to do the decoding.




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