diff --git a/CHANGELOG.md b/CHANGELOG.md index 648b4ace4..1212dba3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Add `Streaming Engine` setting to Channel - `Legacy` - (default) uses existing streaming engine - `Next` - uses ErsatzTV Next streaming engine +- Add `Next Engine Text Subtitle Mode` setting to Channel + - `Burn` - (default) will burn all subtitles, including text subtitles + - `Convert If Possible` - will attempt to convert text subtitles to WebVTT + - WebVTT subtitles can be dynamically enabled and disabled during playback in supported HLS clients ### Fixed - Fix `Add Playout` button not opening drop down menu (regression from v26.4.0) diff --git a/ErsatzTV.Application/Channels/Commands/CreateChannelHandler.cs b/ErsatzTV.Application/Channels/Commands/CreateChannelHandler.cs index 37ce3c9b7..5ce589fc1 100644 --- a/ErsatzTV.Application/Channels/Commands/CreateChannelHandler.cs +++ b/ErsatzTV.Application/Channels/Commands/CreateChannelHandler.cs @@ -114,7 +114,9 @@ public class CreateChannelHandler( channel.PlayoutOffset = null; } - if (channel.StreamingEngine is StreamingEngine.Next) + if (channel.StreamingEngine is StreamingEngine.Next && + channel.StreamingMode is not StreamingMode.HttpLiveStreamingSegmenter && + channel.StreamingMode is not StreamingMode.TransportStreamHybrid) { channel.StreamingMode = StreamingMode.HttpLiveStreamingSegmenter; } diff --git a/ErsatzTV.Application/Channels/Commands/UpdateChannelHandler.cs b/ErsatzTV.Application/Channels/Commands/UpdateChannelHandler.cs index 9a9cab6e3..61e68dca4 100644 --- a/ErsatzTV.Application/Channels/Commands/UpdateChannelHandler.cs +++ b/ErsatzTV.Application/Channels/Commands/UpdateChannelHandler.cs @@ -142,7 +142,9 @@ public class UpdateChannelHandler( c.WatermarkId = update.WatermarkId; c.FallbackFillerId = update.FallbackFillerId; - if (c.StreamingEngine is StreamingEngine.Next) + if (c.StreamingEngine is StreamingEngine.Next && + c.StreamingMode is not StreamingMode.HttpLiveStreamingSegmenter && + c.StreamingMode is not StreamingMode.TransportStreamHybrid) { c.StreamingMode = StreamingMode.HttpLiveStreamingSegmenter; } diff --git a/ErsatzTV.Application/Streaming/Commands/StartFFmpegNextSessionHandler.cs b/ErsatzTV.Application/Streaming/Commands/StartFFmpegNextSessionHandler.cs index dcc8d3db2..dba572f53 100644 --- a/ErsatzTV.Application/Streaming/Commands/StartFFmpegNextSessionHandler.cs +++ b/ErsatzTV.Application/Streaming/Commands/StartFFmpegNextSessionHandler.cs @@ -338,8 +338,10 @@ public class StartFFmpegNextSessionHandler( }, Accel = ffmpegProfile.HardwareAcceleration switch { + HardwareAccelerationKind.Amf => AccelEnum.Amf, HardwareAccelerationKind.Nvenc => AccelEnum.Cuda, HardwareAccelerationKind.Qsv => AccelEnum.Qsv, + HardwareAccelerationKind.Rkmpp => AccelEnum.Rkmpp, HardwareAccelerationKind.Vaapi => AccelEnum.Vaapi, HardwareAccelerationKind.VideoToolbox => AccelEnum.Videotoolbox, _ => null diff --git a/ErsatzTV.Core/Next/Config/ChannelConfig.cs b/ErsatzTV.Core/Next/Config/ChannelConfig.cs index b9351939d..e9665eedd 100644 --- a/ErsatzTV.Core/Next/Config/ChannelConfig.cs +++ b/ErsatzTV.Core/Next/Config/ChannelConfig.cs @@ -151,7 +151,7 @@ namespace ErsatzTV.Core.Next.Config public enum Mode { Burn, Convert }; - public enum AccelEnum { Cuda, Qsv, Vaapi, Videotoolbox, Vulkan }; + public enum AccelEnum { Amf, Cuda, Qsv, Rkmpp, Vaapi, Videotoolbox, Vulkan }; public enum VideoFormat { H264, Hevc }; @@ -280,10 +280,14 @@ namespace ErsatzTV.Core.Next.Config var value = serializer.Deserialize(reader); switch (value) { + case "amf": + return AccelEnum.Amf; case "cuda": return AccelEnum.Cuda; case "qsv": return AccelEnum.Qsv; + case "rkmpp": + return AccelEnum.Rkmpp; case "vaapi": return AccelEnum.Vaapi; case "videotoolbox": @@ -304,12 +308,18 @@ namespace ErsatzTV.Core.Next.Config var value = (AccelEnum)untypedValue; switch (value) { + case AccelEnum.Amf: + serializer.Serialize(writer, "amf"); + return; case AccelEnum.Cuda: serializer.Serialize(writer, "cuda"); return; case AccelEnum.Qsv: serializer.Serialize(writer, "qsv"); return; + case AccelEnum.Rkmpp: + serializer.Serialize(writer, "rkmpp"); + return; case AccelEnum.Vaapi: serializer.Serialize(writer, "vaapi"); return; diff --git a/ErsatzTV/Controllers/IptvController.cs b/ErsatzTV/Controllers/IptvController.cs index 99e66f2ab..87247139d 100644 --- a/ErsatzTV/Controllers/IptvController.cs +++ b/ErsatzTV/Controllers/IptvController.cs @@ -91,15 +91,6 @@ public class IptvController : StreamingControllerBase return NotFound(); } - foreach (ChannelViewModel channel in maybeChannel) - { - // NEXT: MPEG-TS streams are not (yet?) supported - if (!channel.IsEnabled || channel.StreamingEngine is StreamingEngine.Next) - { - return NotFound(); - } - } - // if mode is "unspecified" - find the configured mode and set it or redirect if (string.IsNullOrWhiteSpace(mode) || mode == "mixed") { diff --git a/ErsatzTV/ErsatzTV.csproj b/ErsatzTV/ErsatzTV.csproj index 20b03f4db..a53166854 100644 --- a/ErsatzTV/ErsatzTV.csproj +++ b/ErsatzTV/ErsatzTV.csproj @@ -55,7 +55,7 @@ - + diff --git a/ErsatzTV/Pages/ChannelEditor.razor b/ErsatzTV/Pages/ChannelEditor.razor index f50df0f8a..4298bf493 100644 --- a/ErsatzTV/Pages/ChannelEditor.razor +++ b/ErsatzTV/Pages/ChannelEditor.razor @@ -159,6 +159,7 @@ else @if (_model.StreamingEngine is StreamingEngine.Next) { + MPEG-TS HLS Segmenter } else