The Free Software Media System - Server Backend & API
Merge pull request #9799 from Bond-009/genregex
Bond-009b95fa294c9e8
diff --cc MediaBrowser.Controller/MediaEncoding/EncodingHelper.csindex e18c1733e1,89cf55b789..7507136941--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs@@@ -120,16 -112,16 +120,19 @@@ namespace MediaBrowser.Controller.Media_config = config;}+ [GeneratedRegex(@"\s+")]+ private static partial Regex WhiteSpaceRegex();+public string GetH264Encoder(EncodingJobInfo state, EncodingOptions encodingOptions)- => GetH264OrH265Encoder("libx264", "h264", state, encodingOptions);+ => GetH26xOrAv1Encoder("libx264", "h264", state, encodingOptions);public string GetH265Encoder(EncodingJobInfo state, EncodingOptions encodingOptions)- => GetH264OrH265Encoder("libx265", "hevc", state, encodingOptions);+ => GetH26xOrAv1Encoder("libx265", "hevc", state, encodingOptions);++ public string GetAv1Encoder(EncodingJobInfo state, EncodingOptions encodingOptions)+ => GetH26xOrAv1Encoder("libsvtav1", "av1", state, encodingOptions);- private string GetH264OrH265Encoder(string defaultEncoder, string hwEncoder, EncodingJobInfo state, EncodingOptions encodingOptions)+ private string GetH26xOrAv1Encoder(string defaultEncoder, string hwEncoder, EncodingJobInfo state, EncodingOptions encodingOptions){// Only use alternative encoders for video files.// When using concat with folder rips, if the mfx session fails to initialize, ffmpeg will be stuck retrying and will not exit gracefully