upgrade to ffmpeg 5.1 (#931)

* use ffmpeg 5.1 on windows

* remove some debug logs

* use latest ffmpeg on arm

* use ffmpeg 5.1 base images

* update ffmpeg health check for 5.1

* update changelog
This commit is contained in:
Jason Dove
2022-08-17 14:57:23 -05:00
committed by GitHub
parent d66efa0a1d
commit 5546ad204c
12 changed files with 28 additions and 28 deletions
+1 -1
View File
@@ -198,7 +198,7 @@ jobs:
id: downloadffmpeg
name: Download ffmpeg
with:
url: "https://github.com/GyanD/codexffmpeg/releases/download/5.0/ffmpeg-5.0-full_build.7z"
url: "https://github.com/GyanD/codexffmpeg/releases/download/5.1/ffmpeg-5.1-full_build.7z"
target: ffmpeg/
- name: Build
+2
View File
@@ -20,6 +20,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
- Always return playlist after a maximum of 8 seconds while starting up an HLS Segmenter session
- Use multi-variant playlists instead of redirects for HLS Segmenter sessions
- Upgrade ffmpeg from 5.0 to 5.1 in most docker images (not ARM variants)
- Upgrading from 5.0 to 5.1 is also recommended for other installations (Windows, Linux)
## [0.6.5-beta] - 2022-08-02
### Fixed
@@ -88,7 +88,7 @@ public class HlsSessionWorker : IHlsSessionWorker
{
Slim.Release();
sw.Stop();
_logger.LogDebug("TrimPlaylist took {Duration}", sw.Elapsed);
// _logger.LogDebug("TrimPlaylist took {Duration}", sw.Elapsed);
}
}
@@ -401,11 +401,11 @@ public class HlsSessionWorker : IHlsSessionWorker
var toDelete = allSegments.Filter(s => s.SequenceNumber < trimResult.Sequence).ToList();
if (toDelete.Count > 0)
{
_logger.LogDebug(
"Deleting HLS segments {Min} to {Max} (less than {StartSequence})",
toDelete.Map(s => s.SequenceNumber).Min(),
toDelete.Map(s => s.SequenceNumber).Max(),
trimResult.Sequence);
// _logger.LogDebug(
// "Deleting HLS segments {Min} to {Max} (less than {StartSequence})",
// toDelete.Map(s => s.SequenceNumber).Min(),
// toDelete.Map(s => s.SequenceNumber).Max(),
// trimResult.Sequence);
}
foreach (Segment segment in toDelete)
@@ -8,8 +8,8 @@ namespace ErsatzTV.Infrastructure.Health.Checks;
public class FFmpegVersionHealthCheck : BaseHealthCheck, IFFmpegVersionHealthCheck
{
private const string BundledVersion = "N-106635-g83e1a1de88";
private const string BundledVersionVaapi = "N-106957-g27cffd16aa";
private const string BundledVersion = "5.1";
private const string BundledVersionVaapi = "5.1";
private readonly IConfigElementRepository _configElementRepository;
public FFmpegVersionHealthCheck(IConfigElementRepository configElementRepository) =>
@@ -72,13 +72,13 @@ public class FFmpegVersionHealthCheck : BaseHealthCheck, IFFmpegVersionHealthChe
{
if (version.StartsWith("3.") || version.StartsWith("4."))
{
return FailResult($"{app} version {version} is too old; please install 5.0!");
return FailResult($"{app} version {version} is too old; please install 5.1!");
}
if (!version.StartsWith("5.0") && version != BundledVersion && version != BundledVersionVaapi)
if (!version.StartsWith("5.1") && version != BundledVersion && version != BundledVersionVaapi)
{
return WarningResult(
$"{app} version {version} is unexpected and may have problems; please install 5.0!");
$"{app} version {version} is unexpected and may have problems; please install 5.1!");
}
return None;
+2 -2
View File
@@ -124,11 +124,11 @@ public class IptvController : ControllerBase
[HttpGet("iptv/session/{channelNumber}/hls.m3u8")]
public async Task<IActionResult> GetLivePlaylist(string channelNumber, CancellationToken cancellationToken)
{
_logger.LogDebug("Checking for session worker for channel {Channel}", channelNumber);
// _logger.LogDebug("Checking for session worker for channel {Channel}", channelNumber);
if (_ffmpegSegmenterService.SessionWorkers.TryGetValue(channelNumber, out IHlsSessionWorker worker))
{
_logger.LogDebug("Trimming playlist for channel {Channel}", channelNumber);
// _logger.LogDebug("Trimming playlist for channel {Channel}", channelNumber);
DateTimeOffset now = DateTimeOffset.Now.AddSeconds(-30);
Option<TrimPlaylistResult> maybePlaylist = await worker.TrimPlaylist(now, cancellationToken);
+1 -1
View File
@@ -1,6 +1,6 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal-amd64 AS dotnet-runtime
FROM jasongdove/ffmpeg:5.0-ubuntu2004 AS runtime-base
FROM jasongdove/ffmpeg:5.1-ubuntu2004 AS runtime-base
COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu-dev tzdata fontconfig fonts-dejavu libgdiplus
+1 -2
View File
@@ -1,7 +1,6 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal-arm32v7 AS dotnet-runtime
# TODO: upgrade once https://github.com/linuxserver/docker-ffmpeg/issues/19 is fixed
FROM linuxserver/ffmpeg:arm32v7-4.4-cli-ls55 AS runtime-base
FROM linuxserver/ffmpeg:arm32v7-latest AS runtime-base
COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu-dev \
tzdata \
+1 -2
View File
@@ -1,7 +1,6 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal-arm64v8 AS dotnet-runtime
# TODO: upgrade once https://github.com/linuxserver/docker-ffmpeg/issues/19 is fixed
FROM linuxserver/ffmpeg:arm64v8-4.4-cli-ls55 AS runtime-base
FROM linuxserver/ffmpeg:arm64v8-latest AS runtime-base
COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu-dev \
tzdata \
+1 -1
View File
@@ -29,7 +29,7 @@ ARG INFO_VERSION="unknown"
RUN dotnet publish ErsatzTV.csproj -c release -o /app -r linux-x64 --self-contained false --no-restore /p:DebugType=Embedded /p:InformationalVersion=${INFO_VERSION}
# final stage/image
FROM jasongdove/ffmpeg:5.0-nvidia2004 AS runtime-base
FROM jasongdove/ffmpeg:5.1-nvidia2004 AS runtime-base
ENV FONTCONFIG_PATH=/etc/fonts
RUN fc-cache update
WORKDIR /app
+1 -1
View File
@@ -1,6 +1,6 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal-amd64 AS dotnet-runtime
FROM jasongdove/ffmpeg-base:5.0-nvidia2004 AS runtime-base
FROM jasongdove/ffmpeg-base:5.1-nvidia2004 AS runtime-base
COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet
RUN apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu-dev tzdata fontconfig fonts-dejavu libgdiplus \
+1 -1
View File
@@ -29,7 +29,7 @@ ARG INFO_VERSION="unknown"
RUN dotnet publish ErsatzTV.csproj -c release -o /app -r linux-x64 --self-contained false --no-restore /p:DebugType=Embedded /p:InformationalVersion=${INFO_VERSION}
# final stage/image
FROM jasongdove/ffmpeg:5.0-vaapi2004 AS runtime-base
FROM jasongdove/ffmpeg:5.1-vaapi2004 AS runtime-base
ENV FONTCONFIG_PATH=/etc/fonts
RUN fc-cache update
WORKDIR /app
+6 -6
View File
@@ -1,6 +1,6 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal-amd64 AS dotnet-runtime
FROM jasongdove/ffmpeg-base:5.0-vaapi2004 AS runtime-base
FROM jasongdove/ffmpeg-base:5.1-vaapi2004 AS runtime-base
COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu-dev \
tzdata \
@@ -18,22 +18,22 @@ RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y libicu
wget \
mesa-va-drivers \
&& mkdir /tmp/intel && cd /tmp/intel \
&& wget -O - https://github.com/intel/libva/archive/refs/tags/2.14.0.tar.gz | tar zxf - \
&& cd libva-2.14.0 \
&& wget -O - https://github.com/intel/libva/archive/refs/tags/2.15.0.tar.gz | tar zxf - \
&& cd libva-2.15.0 \
&& ./autogen.sh \
&& ./configure \
&& make -j$(nproc) \
&& make -j$(nproc) install \
&& cd /tmp/intel \
&& wget -O - https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.1.2.tar.gz | tar zxf - \
&& mv gmmlib-intel-gmmlib-22.1.2 gmmlib \
&& wget -O - https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.1.7.tar.gz | tar zxf - \
&& mv gmmlib-intel-gmmlib-22.1.7 gmmlib \
&& cd gmmlib \
&& mkdir build && cd build \
&& cmake .. \
&& make -j$(nproc) \
&& make install \
&& cd /tmp/intel \
&& git clone --depth 1 --branch intel-media-22.3 https://github.com/intel/media-driver \
&& git clone --depth 1 --branch intel-media-22.4 https://github.com/intel/media-driver \
&& mkdir build_media && cd build_media \
&& cmake ../media-driver \
&& make -j$(nproc) \