From 832b36562aef04b2c0f6d012920fcf80e0dd080c Mon Sep 17 00:00:00 2001 From: Dominik Date: Mon, 14 Nov 2022 10:11:25 +0100 Subject: Add new options for segment deletion --- MediaBrowser.Model/Configuration/EncodingOptions.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'MediaBrowser.Model/Configuration/EncodingOptions.cs') diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs index f4cd2f006..c23d4e642 100644 --- a/MediaBrowser.Model/Configuration/EncodingOptions.cs +++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs @@ -11,7 +11,9 @@ namespace MediaBrowser.Model.Configuration DownMixAudioBoost = 2; MaxMuxingQueueSize = 2048; EnableThrottling = false; + EnableSegmentDeletion = false; ThrottleDelaySeconds = 180; + SegmentKeepSeconds = 200; EncodingThreadCount = -1; // This is a DRM device that is almost guaranteed to be there on every intel platform, // plus it's the default one in ffmpeg if you don't specify anything @@ -57,8 +59,12 @@ namespace MediaBrowser.Model.Configuration public bool EnableThrottling { get; set; } + public bool EnableSegmentDeletion { get; set; } + public int ThrottleDelaySeconds { get; set; } + public int SegmentKeepSeconds { get; set; } + public string HardwareAccelerationType { get; set; } /// -- cgit v1.2.3 From 09a1d6786a0cad593cc862d62351a0c5e748497f Mon Sep 17 00:00:00 2001 From: Dominik Date: Tue, 15 Nov 2022 16:06:24 +0100 Subject: Increase default SegmentKeepSeconds --- MediaBrowser.Model/Configuration/EncodingOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MediaBrowser.Model/Configuration/EncodingOptions.cs') diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs index c23d4e642..008050602 100644 --- a/MediaBrowser.Model/Configuration/EncodingOptions.cs +++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs @@ -13,7 +13,7 @@ namespace MediaBrowser.Model.Configuration EnableThrottling = false; EnableSegmentDeletion = false; ThrottleDelaySeconds = 180; - SegmentKeepSeconds = 200; + SegmentKeepSeconds = 360; EncodingThreadCount = -1; // This is a DRM device that is almost guaranteed to be there on every intel platform, // plus it's the default one in ffmpeg if you don't specify anything -- cgit v1.2.3 From 0dffe64489f826b91410bddc32ad2ceb1c5cc0d0 Mon Sep 17 00:00:00 2001 From: Dominik Date: Thu, 15 Jun 2023 19:55:11 +0200 Subject: Add baseUrlParam back in and fix indentation --- Jellyfin.Api/Controllers/DynamicHlsController.cs | 9 +++++++++ MediaBrowser.Model/Configuration/EncodingOptions.cs | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Model/Configuration/EncodingOptions.cs') diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs index 86be68004..9f2088e36 100644 --- a/Jellyfin.Api/Controllers/DynamicHlsController.cs +++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs @@ -1632,6 +1632,15 @@ public class DynamicHlsController : BaseJellyfinApiController ? _encodingOptions.MaxMuxingQueueSize.ToString(CultureInfo.InvariantCulture) : "128"; + var baseUrlParam = string.Empty; + if (isEventPlaylist) + { + baseUrlParam = string.Format( + CultureInfo.InvariantCulture, + " -hls_base_url \"hls/{0}/\"", + Path.GetFileNameWithoutExtension(outputPath)); + } + var hlsArguments = GetHlsArguments(isEventPlaylist, state.SegmentLength); return string.Format( diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs index b5b6e86c8..f11a43122 100644 --- a/MediaBrowser.Model/Configuration/EncodingOptions.cs +++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs @@ -103,12 +103,12 @@ public class EncodingOptions /// Gets or sets the delay after which throttling happens. /// public int ThrottleDelaySeconds { get; set; } - + /// /// Gets or sets a value indicating whether segment deletion is enabled. /// public bool EnableSegmentDeletion { get; set; } - + /// /// Gets or sets seconds for which segments should be kept before being deleted. /// -- cgit v1.2.3 From dbe44a591cbc19859161cd6cd7f63dab91110594 Mon Sep 17 00:00:00 2001 From: Dominik Date: Thu, 15 Jun 2023 21:38:45 +0200 Subject: Pick safer default value for segments to keep --- MediaBrowser.Model/Configuration/EncodingOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MediaBrowser.Model/Configuration/EncodingOptions.cs') diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs index f11a43122..a53be0fee 100644 --- a/MediaBrowser.Model/Configuration/EncodingOptions.cs +++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs @@ -21,7 +21,7 @@ public class EncodingOptions EnableThrottling = false; ThrottleDelaySeconds = 180; EnableSegmentDeletion = false; - SegmentKeepSeconds = 360; + SegmentKeepSeconds = 720; EncodingThreadCount = -1; // This is a DRM device that is almost guaranteed to be there on every intel platform, // plus it's the default one in ffmpeg if you don't specify anything -- cgit v1.2.3