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

This forum is about all development around libVLC.
mlstraub
New Cone
New Cone
Posts: 1
Joined: 12 Jan 2016 14:14

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

Postby mlstraub » 12 Jan 2016 16:31

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 12 Jan 2016 20:21

--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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

dongxf
Blank Cone
Blank Cone
Posts: 10
Joined: 14 Oct 2011 07:31

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

Postby dongxf » 19 Jan 2016 08:56

--avcodec-hw=dxva2.lo
this option enables directx hardware acceleration, but it seems not stable, sometimes cause vlc crashes


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 22 guests