Skip to content

Commit

Permalink
Fix VideoToolbox H264 constrained profile option
Browse files Browse the repository at this point in the history
Like a lot of other encoders they need an underscore between two words.

Signed-off-by: gnattu <gnattuoc@me.com>
  • Loading branch information
gnattu committed May 18, 2024
1 parent 76854b5 commit 53de8c0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2083,6 +2083,18 @@ public string GetVideoQualityParam(EncodingJobInfo state, string videoEncoder, E
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
Expand Down

0 comments on commit 53de8c0

Please sign in to comment.