You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CPU has always been high,and I want to reduce the performance of the CPU through hardware acceleration. I looked at the example and spent a lot of time not finding this method or example. Please tell me if you know.
Please enter a general description for the issue. Delete sections that are not relevant and provide additional sections if necessary.
Issue Categories
Bug
Feature Request
Question
Not sure
Version Information
NuGet Package Enter Version Number Here
Build From Master branch, Commit Enter commit id. Example: 704c482
Build from Branch Name, Commit Enter commit id. Example: 704c482
// Setting Advanced Video Stream Options is also possible
if (e.Options.VideoStream is StreamInfo videoStream)
{
// Example of forcing a codec for a stream
// e.Options.DecoderCodec[videoStream.StreamIndex] = "mjpeg";
// Hardware device priorities
var deviceCandidates = new[]
{
//AVHWDeviceType.AV_HWDEVICE_TYPE_CUDA,
//AVHWDeviceType.AV_HWDEVICE_TYPE_D3D11VA,
AVHWDeviceType.AV_HWDEVICE_TYPE_DXVA2
};
foreach (var deviceType in deviceCandidates)
{
var accelerator = videoStream.HardwareDevices.FirstOrDefault(d => d.DeviceType == deviceType);
if (accelerator == null) continue;
e.Options.VideoHardwareDevice = accelerator;
break;
}
Issue Title (change this title!)
The CPU has always been high,and I want to reduce the performance of the CPU through hardware acceleration. I looked at the example and spent a lot of time not finding this method or example. Please tell me if you know.
Please enter a general description for the issue. Delete sections that are not relevant and provide additional sections if necessary.
Issue Categories
Version Information
Steps to Reproduce
Expected Results
Sample Code
XAML
C#
Command line ffplay
ffplay "hello.mp4"
Delete This Section
The text was updated successfully, but these errors were encountered: