link ffmpeg health check to ersatztv-ffmpeg release (#2154)

* link ffmpeg health check to ersatztv-ffmpeg release

* bump windows ffmpeg to use the same version as linux
This commit is contained in:
Jason Dove
2025-07-16 17:13:25 +00:00
committed by GitHub
parent b85571b159
commit 848b88bd2d
4 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ jobs:
id: downloadffmpeg
name: Download ffmpeg
with:
url: "https://github.com/ErsatzTV/ErsatzTV-ffmpeg/releases/download/7.1.1/ffmpeg-n7.1.1-22-g0f1fe3d153-win64-gpl-7.1.zip"
url: "https://github.com/ErsatzTV/ErsatzTV-ffmpeg/releases/download/7.1.1/ffmpeg-n7.1.1-56-gc2184b65d2-win64-gpl-7.1.zip"
target: ffmpeg/
- name: Build
+1
View File
@@ -83,6 +83,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Block items that have this checked will never display a watermark, even with Deco set to override watermark
- Add `ETV_MAXIMUM_UPLOAD_MB` environment variable to allow uploading large watermarks
- Default value is 10
- Update ffmpeg health check to link to ErsatzTV-FFmpeg release that contains binaries for win64, linux64, linuxarm64
### Changed
- Allow `Other Video` libraries and `Image` libraries to use the same folders
@@ -21,6 +21,9 @@ public abstract class BaseHealthCheck
protected HealthCheckResult FailResult(string message, string briefMessage) =>
new(Title, HealthCheckStatus.Fail, message, briefMessage, None);
protected HealthCheckResult FailResult(string message, string briefMessage, HealthCheckLink link) =>
new(Title, HealthCheckStatus.Fail, message, briefMessage, link);
protected HealthCheckResult WarningResult(string message, string briefMessage) =>
new(Title, HealthCheckStatus.Warning, message, briefMessage, None);
@@ -23,18 +23,20 @@ public class FFmpegVersionHealthCheck : BaseHealthCheck, IFFmpegVersionHealthChe
public async Task<HealthCheckResult> Check(CancellationToken cancellationToken)
{
var link = new HealthCheckLink("https://github.com/ErsatzTV/ErsatzTV-ffmpeg/releases/tag/7.1.1");
Option<ConfigElement> maybeFFmpegPath =
await _configElementRepository.GetConfigElement(ConfigElementKey.FFmpegPath);
if (maybeFFmpegPath.IsNone)
{
return FailResult("Unable to locate ffmpeg", "Unable to locate ffmpeg");
return FailResult("Unable to locate ffmpeg", "Unable to locate ffmpeg", link);
}
Option<ConfigElement> maybeFFprobePath =
await _configElementRepository.GetConfigElement(ConfigElementKey.FFprobePath);
if (maybeFFprobePath.IsNone)
{
return FailResult("Unable to locate ffprobe", "Unable to locate ffprobe");
return FailResult("Unable to locate ffprobe", "Unable to locate ffprobe", link);
}
foreach (ConfigElement ffmpegPath in maybeFFmpegPath)
@@ -42,12 +44,12 @@ public class FFmpegVersionHealthCheck : BaseHealthCheck, IFFmpegVersionHealthChe
Option<string> maybeVersion = await GetVersion(ffmpegPath.Value, cancellationToken);
if (maybeVersion.IsNone)
{
return WarningResult("Unable to determine ffmpeg version", "Unable to determine ffmpeg version");
return WarningResult("Unable to determine ffmpeg version", "Unable to determine ffmpeg version", link);
}
foreach (string version in maybeVersion)
{
foreach (HealthCheckResult result in ValidateVersion(version, "ffmpeg"))
foreach (HealthCheckResult result in ValidateVersion(version, "ffmpeg", link))
{
return result;
}
@@ -59,12 +61,12 @@ public class FFmpegVersionHealthCheck : BaseHealthCheck, IFFmpegVersionHealthChe
Option<string> maybeVersion = await GetVersion(ffprobePath.Value, cancellationToken);
if (maybeVersion.IsNone)
{
return WarningResult("Unable to determine ffprobe version", "Unable to determine ffprobe version");
return WarningResult("Unable to determine ffprobe version", "Unable to determine ffprobe version", link);
}
foreach (string version in maybeVersion)
{
foreach (HealthCheckResult result in ValidateVersion(version, "ffprobe"))
foreach (HealthCheckResult result in ValidateVersion(version, "ffprobe", link))
{
return result;
}
@@ -74,14 +76,14 @@ public class FFmpegVersionHealthCheck : BaseHealthCheck, IFFmpegVersionHealthChe
return new HealthCheckResult("FFmpeg Version", HealthCheckStatus.Pass, string.Empty, string.Empty, None);
}
private Option<HealthCheckResult> ValidateVersion(string version, string app)
private Option<HealthCheckResult> ValidateVersion(string version, string app, HealthCheckLink link)
{
if (version.StartsWith("3.", StringComparison.OrdinalIgnoreCase) ||
version.StartsWith("4.", StringComparison.OrdinalIgnoreCase) ||
version.StartsWith("5.", StringComparison.OrdinalIgnoreCase) ||
version.StartsWith("6.", StringComparison.OrdinalIgnoreCase))
{
return FailResult($"{app} version {version} is too old; please install 7.1.1!", $"{app} version is too old");
return FailResult($"{app} version {version} is too old; please install 7.1.1!", $"{app} version is too old", link);
}
if (!version.StartsWith("7.1.1", StringComparison.OrdinalIgnoreCase) &&
@@ -90,7 +92,7 @@ public class FFmpegVersionHealthCheck : BaseHealthCheck, IFFmpegVersionHealthChe
version != BundledVersionVaapi)
{
return WarningResult(
$"{app} version {version} is unexpected and may have problems; please install 7.1.1!", $"{app} version is unexpected");
$"{app} version {version} is unexpected and may have problems; please install 7.1.1!", $"{app} version is unexpected", link);
}
return None;