AVI files in DX9, 10, 11, and XAudio2

Topics relating to sound and graphics. DirectSound, DirectX, XACT, and other API's welcome

AVI files in DX9, 10, 11, and XAudio2

Postby Hieran_Del8 » Tue Jun 01, 2010 2:10 am

I've been working on a DirectShow to DirectX renderer so that videos can be rendered to a DirectX texture, and sound to an audio buffer manipulated by the app.

It's been a fun project! The objective was to take an AVI file and render it to a DirectX9 texture, and play the audio through a default DirectSound renderer on the system. The goal was exceeded, allowing any video stream, either from a video file, or a webcam, etc., and rendering it to either DirectX9, 10, or 11 textures. Also, the audio can be rendered into an app's XAudio2 system, allowing 3d transformations to be applied on the sound.

The project is now called the DSDX Library, and represents the pinnacle of all my achievements so far in programming. It is truly COM-based, which requires the COM classes to register in the windows registry. The DSDX Library has helper functions for all these details.

If you'd like to try out streaming AVI files right away in your DirectX app, go to http://www.crazyleafgames.com to download it and see a pseudo app describing usage.

The release is alpha, and I haven't tested the DX10 and DX11 components fully yet. I need help in testing these modules out. Please try it! Thanks! :D
Image
User avatar
Hieran_Del8
Most Valuble Contributor
 
Posts: 349
Joined: Thu Nov 06, 2008 4:59 am
Location: Marengo, IL

Re: AVI files in DX9, 10, 11, and XAudio2

Postby Hieran_Del8 » Thu Jun 03, 2010 2:16 am

I was talking to my dad on what's possible with this technology, and it became clear that a brief demo should be made to showcase the possibilities. Here's a demo picture of what's possible. Note, the webcam run was done at a school I teach at--I don't paint my walls orange. And my head isn't normally that big (dynamic surface undulating over different shapes).

The three streaming videos are all avi file sources. One sample is from a fraps recording of Tank Universal, another is from Oblivion, and the webcam was pre-recorded. It is possible to run a live webcam--better performance, actually. Also, I'm intrigued how well a tv-tuner would work on the graphics card. Ah well, I don't really care to put that together right now.

Image
Image
User avatar
Hieran_Del8
Most Valuble Contributor
 
Posts: 349
Joined: Thu Nov 06, 2008 4:59 am
Location: Marengo, IL

Re: AVI files in DX9, 10, 11, and XAudio2

Postby lp rob1 » Fri Jun 04, 2010 3:16 am

Hieran_Del8 wrote:another is from Oblivion,

W00t! Oblivion! One of the best games once you've pumped it up with mods. Did you record all the samples yourself, and if so, do you still play Oblivion?
User avatar
lp rob1
Veteren
 
Posts: 124
Joined: Tue Jan 12, 2010 6:34 am
Location: England, UK

Re: AVI files in DX9, 10, 11, and XAudio2

Postby Hieran_Del8 » Fri Jun 04, 2010 4:32 am

lp rob1 wrote:Did you record all the samples yourself, and if so, do you still play Oblivion?

Yes, I used Fraps and a Gateway webcam recorder. I actually haven't played Oblivion for over a year, but it was a lot of fun. I never got through the story (really just randomly explored environments and created characters.) I've a friend who's intent on accomplishing everything, but his ps3 copy is bugged. He's also accomplished Morrowind 100% except for that one spot you have to choose between the Theives guild and the Fighters guild.

Oblivion represents much of what I've wished to create in programming: lush environments that were procedurally built with 100-year weathering calculated; npc's that have daily schedules, but that may "on a whim" travel to another city depending on disposition; the beautiful rendering of sky, flora, and creatures; and music that puts you in the environment.
Image
User avatar
Hieran_Del8
Most Valuble Contributor
 
Posts: 349
Joined: Thu Nov 06, 2008 4:59 am
Location: Marengo, IL

Re: AVI files in DX9, 10, 11, and XAudio2

Postby Lonewolff » Fri Jun 04, 2010 7:24 am

Awesome job! The posibilities for this are huge. 8-)
Image
User avatar
Lonewolff
Site Admin
 
Posts: 268
Joined: Thu Oct 30, 2008 3:40 pm

Re: AVI files in DX9, 10, 11, and XAudio2

Postby joemc » Fri Jun 04, 2010 1:49 pm

nice co-worker :)

edit: oh yeah the code is nice too.
joemc
Veteren
 
Posts: 127
Joined: Fri Jul 10, 2009 1:29 pm

Re: AVI files in DX9, 10, 11, and XAudio2

Postby Hieran_Del8 » Fri Jun 04, 2010 1:56 pm

Lonewolff wrote:Awesome job! The posibilities for this are huge. 8-)

Thanks! It was one of the tangent projects while working for the easy interfaces on cp1. Man, these tangents are fun! :D
joemc wrote:nice co-worker :)

edit: oh yeah the code is nice too.

Thanks! And I'll forward the complement to my sister. ;)
Image
User avatar
Hieran_Del8
Most Valuble Contributor
 
Posts: 349
Joined: Thu Nov 06, 2008 4:59 am
Location: Marengo, IL

Re: AVI files in DX9, 10, 11, and XAudio2

Postby lp rob1 » Fri Jun 04, 2010 5:23 pm

Hieran_Del8 wrote:Oblivion represents much of what I've wished to create in programming: lush environments that were procedurally built with 100-year weathering calculated; npc's that have daily schedules, but that may "on a whim" travel to another city depending on disposition; the beautiful rendering of sky, flora, and creatures; and music that puts you in the environment.

Well, much of what Oblivion SHOULD have been was implemented in mods, I am running near 200 of them. A completely moddable game is a good design goal - I would really like to make a game which can be modded like the Elder Scrolls games.
User avatar
lp rob1
Veteren
 
Posts: 124
Joined: Tue Jan 12, 2010 6:34 am
Location: England, UK

Re: AVI files in DX9, 10, 11, and XAudio2

Postby Hieran_Del8 » Tue Jul 13, 2010 5:39 pm

I'm moving this project to sourceforge.net. There's absolutely no documentation on usage right now, but there are files... :|

Over the next few days I'll be setting up the site with basic necessary interfaces, like a bug tracker, a feature request tracker, an svn repository, a help forum, etc.

The site is: https://sourceforge.net/projects/dsdxlibrary/.

You can subscribe to a mailing list there to receive notifications when the repository is updated. Alternatively, you can also get the rss feed on the "News" to be alerted to any stable releases.
Image
User avatar
Hieran_Del8
Most Valuble Contributor
 
Posts: 349
Joined: Thu Nov 06, 2008 4:59 am
Location: Marengo, IL


Return to Sound And Graphics

Who is online

Users browsing this forum: No registered users and 1 guest