xdenser
xdenser

Reputation: 248

How to force hardware accelerated video decoding in node-webkit under Windows?

I have very simple static test page:

<body>
<video autoplay loop>
  <source src='ng_full.mp4' />
</video>
</body>

When I open it in node-webkit (tested on versions 0.6.3 to 0.7.5) I get as much as twice CPU load comparing to chrome 0.29.xx and chromium 0.31 with ffmpegsumo from chrome. I am also able to run about 8 copies of page in chrome vs 4 copies in nw.exe without video to become jerky. Tested on Intel i5 first gen and third gen with nVidia GF9500GT and Intel HD 4600 respectively. This also correlates with CPU loads when showing same video in MPC-HC with and w/o DXVA.

From what I make conclusion - hardware video decoding acceleration does not work in node-webkit!

I need as much as possible simultaneous videos played on single machine, and GPU decoding gives me twice more streams vs CPU decoding.

I was using builds from node-webkit github pages. Maybe custom build with appropriate switches will help? Or maybe it is possible to force HW decoding on default build?

Upvotes: 2

Views: 3198

Answers (1)

Trevor
Trevor

Reputation: 620

try adding any css shaders or webgl, it automatically forces accelerated compositing. This should give you an idea if its the video (ffmpeg) or if its actually the GPU/chrome rendering engine.

You can also force accelerated composiing with --forced-compositing-mode to chromium args within the package.json to see if that has any affect.

My gut says chrome.exe may use other licensed (but not open source) decoders with specific hardware acceleration while using ffmpeg relies on the cpu.

Upvotes: 2

Related Questions