Page 1 of 1

How to tell if libvlc instance arguments are properly engaging hardware acceleration

Posted: 12 Jan 2016 16:31
by mlstraub
I have a 6 video application decoding MPEG-TS .ts files containing H.264 with no audio. My hardware is a Microsoft surface 3, i7 with Intel HD graphics (directx hardware acceleration)
Using 6 instances of VLC player and tweaking settings to use HW acceleration Direct3D with DXVA2 hardware decoding, VLC Player 2.2.0 yields about 40% CPU use under a windows 8.1 operating system.

I'm trying to make my Qt 5.5 application approach the same CPU usage by mirroring the hardware, vout and ffmepg decoder settings.

Question: What lib vlc instance arguments should I be using to ensure proper video and demux hardware acceleration?

I'm currently using:
--overlay
--avcodec-hw=any
--directx-hw-yuv
--avcodec-threads=3 (tried 4, 6 here as well)

I've also tried using both one instance per media player and a shared instance between all media players.

Is the DXVA2 ffmpeg H264 decoder "dxva" or "dxva2"?

At this point, my application seems to always consume 80-85% CPU (which is unsatisfactory).

Any advice you can provide is appreciated.

Re: How to tell if libvlc instance arguments are properly engaging hardware acceleration

Posted: 12 Jan 2016 20:21
by RĂ©mi Denis-Courmont
--overlay, --avcodec-hw=any and --directx-hw-yuv are all default settings. Passing them will not have any effect, and it is best avoided.

Forcing --avcodec-threads is likely to make things worse rather than better. The default depends on the number of CPU cores.

Re: How to tell if libvlc instance arguments are properly engaging hardware acceleration

Posted: 19 Jan 2016 08:56
by dongxf
--avcodec-hw=dxva2.lo
this option enables directx hardware acceleration, but it seems not stable, sometimes cause vlc crashes