How to use ffdshow with WPF-Mediakit

612 views Asked by At

By default LAV Decoder, but I'd like to use ffdshow with hardware acceleration for decoding. I saw these lines in the file ClassId.cs

public static readonly Guid FFDShowVideo = new Guid("04FE9017-F873-410e-871E-AB91661A4EF7");
public static readonly Guid FFDShowVideoRaw = new Guid("0B390488-D80F-4a68-8408-48DC199F0E97");
public static readonly Guid FFDShowVideoDXVA = new Guid("0B0EFF97-C750-462c-9488-B10E7D87F1A6");

The used decoders are defined in MediaUriPlayer

public MediaUriPlayer()
{
    Splitter = "LAV Splitter";
    SplitterSource = "LAV Splitter Source";
    VideoDecoder = "LAV Video Decoder";
    AudioDecoder = "LAV Audio Decoder";
}

So the question is, how do I enable FFDShowVideoDXVA? What's the correct name for the decoder or am I totally on wrong path here?

And if I manage to enable FFDShowVideoDXVA, is the hardware acceleration enabled by default (if not, how do I programmatically enable it?

Help much appreciated.

1

There are 1 answers

0
xmedeko On

LAV filters have HW acceleration, too, see https://github.com/Sascha-L/WPF-MediaKit/wiki/Usage. However, it has to be set manually. There's already an GitHub issue #31 to set the acceleration automatically.

If you want to enforce ffdshow can set MediaUriPlayer.VideoDecoder, Splitter properties. (Those GUIDs are not used in the code.) I do not know ffdshow in details, but IMO it's similar: you have to set DXVA manually.