Ver código fonte

Fix VideoToolbox H264 constrained profile option

Like a lot of other encoders they need an underscore between two words.

Signed-off-by: gnattu <gnattuoc@me.com>
gnattu 1 ano atrás
pai
commit
53de8c0805

+ 12 - 0
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

@@ -2083,6 +2083,18 @@ namespace MediaBrowser.Controller.MediaEncoding
                 profile = "constrained_high";
             }
 
+            if (string.Equals(videoEncoder, "h264_videotoolbox", StringComparison.OrdinalIgnoreCase)
+                && profile.Contains("constrainedbaseline", StringComparison.OrdinalIgnoreCase))
+            {
+                profile = "constrained_baseline";
+            }
+
+            if (string.Equals(videoEncoder, "h264_videotoolbox", StringComparison.OrdinalIgnoreCase)
+                && profile.Contains("constrainedhigh", StringComparison.OrdinalIgnoreCase))
+            {
+                profile = "constrained_high";
+            }
+
             if (!string.IsNullOrEmpty(profile))
             {
                 // Currently there's no profile option in av1_nvenc encoder