Hardware-accelerated video player for windows

I finished implementation of Video Player, which is based on Windows Media Foundation(WMF) in my lime fork.

  • As this implementation relies on WMFs functionality that renders video directly into Direct3D surface, it only works with ANGLE and OpenGL renderer, not with software renderer.
  • The code is based on ofxWMFVideoPlayer and part of chromium source code.
  • Original ofxWMFVideoPlayer implementation uses an opengl extension called WGL_NV_DX_interop, which allows you to share textures between OpenGL and Direct3D. Since this is an extension, it may not be present on older machines. Instead of implementing video player with this extension, I decided to switch from WGL to ANGLE.

This demo plays 1080p video smoothly at low cpu usage, with the help of hardware H.264 decoder.
Sample Video(bbb_sunflower_1080p_60fps_normal.mp4) is not included in the demo, so please download it from Big Buck Bunny’s website, then place it in the same folder as SimpleVideo.bat, and execute that bat file.

Demo (Sample Video is not included):


Big Buck Bunny Sample Video:
https://peach.blender.org/
ofxWMFVideoPlayer:

Source code:


Chromium source code:
https://src.chromium.org/svn/trunk/src/content/common/gpu/media/dxva_video_decode_accelerator.cc

4 Likes

Very nice work! Is there any chance this will be implemented in newer version of lime along with angle?