Browse Source

fix detection of amf hw accel on windows (#1519)

pull/1520/head
Jason Dove 2 years ago committed by GitHub
parent
commit
fc871e6f74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGELOG.md
  2. 8
      ErsatzTV.FFmpeg/Capabilities/FFmpegCapabilities.cs
  3. 8
      ErsatzTV.FFmpeg/Capabilities/FFmpegKnownEncoder.cs

3
CHANGELOG.md

@ -8,7 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -8,7 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix playout builder crash with improperly configured pad filler preset
- Properly validate filler preset mode pad to require `filler pad to nearest minute` value
- Fix bug where previously-synchronized collection tags would disappear
- This bug affected Jellyfin, Emby and Plex collections
- This bug affected Jellyfin, Emby and Plex collections
- Fix detection of AMF hardware acceleration on Windows
## [0.8.3-beta] - 2023-11-22
### Added

8
ErsatzTV.FFmpeg/Capabilities/FFmpegCapabilities.cs

@ -27,9 +27,15 @@ public class FFmpegCapabilities : IFFmpegCapabilities @@ -27,9 +27,15 @@ public class FFmpegCapabilities : IFFmpegCapabilities
public bool HasHardwareAcceleration(HardwareAccelerationMode hardwareAccelerationMode)
{
// AMF isn't a "hwaccel" in ffmpeg, so check for presence of encoders
if (hardwareAccelerationMode is HardwareAccelerationMode.Amf)
{
return _ffmpegEncoders.Any(
e => e.EndsWith($"_{FFmpegKnownHardwareAcceleration.Amf.Name}", StringComparison.OrdinalIgnoreCase));
}
Option<FFmpegKnownHardwareAcceleration> maybeAccelToCheck = hardwareAccelerationMode switch
{
HardwareAccelerationMode.Amf => FFmpegKnownHardwareAcceleration.Amf,
HardwareAccelerationMode.Nvenc => FFmpegKnownHardwareAcceleration.Cuda,
HardwareAccelerationMode.Qsv => FFmpegKnownHardwareAcceleration.Qsv,
HardwareAccelerationMode.Vaapi => FFmpegKnownHardwareAcceleration.Vaapi,

8
ErsatzTV.FFmpeg/Capabilities/FFmpegKnownEncoder.cs

@ -9,5 +9,11 @@ public record FFmpegKnownEncoder @@ -9,5 +9,11 @@ public record FFmpegKnownEncoder
this.Name = Name;
}
public static IList<string> AllEncoders => Array.Empty<string>();
// only list the encoders that we actually check for
public static IList<string> AllEncoders =>
new[]
{
"h264_amf",
"hevc_amf"
};
}

Loading…
Cancel
Save