diff options
| author | gnattu <gnattuoc@me.com> | 2024-05-05 10:41:43 +0800 |
|---|---|---|
| committer | gnattu <gnattuoc@me.com> | 2024-05-16 09:34:21 +0800 |
| commit | 5df171b3f9414426055c7e96dedc2ded4c54ffbb (patch) | |
| tree | 8e8e69c5791994241f8fa464483b1b7f375cc268 /Jellyfin.Api/Helpers/DynamicHlsHelper.cs | |
| parent | d318010c67684ad7359353ed2b457df4fb91dfef (diff) | |
Add remuxing support for VP9
Add VP9 as a valid HLS format to enable remuxing. This is useful when audio processing is required, but the VP9 video can be passed as-is to avoid unnecessary video transcoding.
No VP9 encoder is enabled and should not be enabled. AV1 and HEVC should be preferred over VP9 if video transcoding is required.
Signed-off-by: gnattu <gnattuoc@me.com>
Diffstat (limited to 'Jellyfin.Api/Helpers/DynamicHlsHelper.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/DynamicHlsHelper.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs index f8d89119a..b3878a41e 100644 --- a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs +++ b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs @@ -714,6 +714,21 @@ public class DynamicHlsHelper return HlsCodecStringHelpers.GetAv1String(profile, level, false, bitDepth); } + // VP9 HLS is for video remuxing only, everything is probed from the original video + if (string.Equals(codec, "vp9", StringComparison.OrdinalIgnoreCase)) + { + var width = state.VideoStream.Width ?? 0; + var height = state.VideoStream.Height ?? 0; + var framerate = state.VideoStream.AverageFrameRate ?? 30; + var bitDepth = state.VideoStream.BitDepth ?? 8; + return HlsCodecStringHelpers.GetVp9String( + width, + height, + state.VideoStream.PixelFormat, + framerate, + bitDepth); + } + return string.Empty; } |
