Video Playback in DirectX 11
Asked Answered
L

3

10

Pretty self explanatory. Microsoft had DirectShow for DirectX 9, but using DirectShow with DX11 is a COM nightmare beyond words. Is there a standard for video rendering I haven't heard of, or perhaps a free third-party library for this purpose?

Edit: Thanks to Mgetz, I am aware of Microsoft's attempt at a solution, Media Foundation. However, it's limited to Windows 8+, which I would much prefer to avoid.

Lanitalank answered 8/1, 2014 at 17:31 Comment(7)
The replacement for DirectShow was Media foundationPragmatist
@Pragmatist Better than DShow... What else you got? The higher-level, the better.Lanitalank
Media foundation directly supports interop with Direct3D11Pragmatist
@Mgetz: Item #1 on the linked article "The decoder MFT must expose the MF_SA_D3D11_AWARE attribute with the value TRUE." limits this support to Windows 8 only, and I am afraid just a couple of decoders. I won't be surprised DirectShow is still the best even in this case. The Q is good though (my upvote).Plated
@RomanR. I would check anyway on windows 7... I wouldn't be surprised it that was fixed with the platform update.Pragmatist
@Mgetz: I - on the contrary - would be surprised with any Media Foundation feature working on previous version of OS at the moment of announcement. History don't have many of such examples, if any at all.Plated
Look at the answer here, OP posted a solution for this in a zip file on the answer using OGG and Theora: gamedev.stackexchange.com/a/40653/15803 Theora: theora.orgMacri
Q
3

This may not exactly match your requirement, but for your GOAL, you may take a look on ffmpeg, libx264 and theora(for ogg sound) or faad(decode aac).

I have done using ffmpeg to open container(3gp/mp4 is simple to implment yourself btw if full GPL licence is a concern), libx264 to decode to frame and upload to opengl texture, performance is good (on mac pro it can render 50 fps for 1080p without optimization) and by getting your hand dirty you can have fun doing stupid things with the texture and 3d transforms.

Quianaquibble answered 7/2, 2014 at 16:50 Comment(1)
Your answer seems most in line with what was suggested here; gamedev.stackexchange.com/questions/40642/… Also OP posted a sample project in a zip file, shared on the answer.Macri
M
2

Media Foundation says that it "enables the development of applications and components for using digital media on Windows Vista and later."

So, it looks like it should work for Vista, Windows 7, and Windows 8.

Mystify answered 30/6, 2014 at 15:40 Comment(0)
R
2

There is DirectX Video Acceleration 2.0 which has a fabulous API, the DXVA-HD (after one has seen VMR9's API, especially with that custom allocator/presenter for renderless drawing, every other API is fabulous :) )

Have a look at: https://msdn.microsoft.com/en-us/library/windows/desktop/ee663586(v=vs.85).aspx

Also, there is a sample in: https://msdn.microsoft.com/en-us/library/windows/desktop/dd756740(v=vs.85).aspx

Windows 7 is the minimum supported windows version

You will not believe how straight forward it is with this API to have it decode the video into your texture.

Rowles answered 31/1, 2016 at 23:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.