Skip to content

Commit

Permalink
4.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTaylorLee committed Dec 9, 2024
1 parent ba01153 commit 31fb863
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
29 changes: 15 additions & 14 deletions build/functions/Build-TranscodeParams.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,25 @@ function Build-TranscodeParams {
$x265Params = @()

# Add CLL (Content Light Level) information if it exists
if ($null -ne $side_data_list -and $null -ne ($side_data_list.max_content)) {
$cllmax = ([string]$side_data_list.max_content).Trim()
$cllavg = ([string]$side_data_list.max_average).Trim()
$cllmax = ([string]$side_data_list.max_content).Trim()
$cllavg = ([string]$side_data_list.max_average).Trim()
if ($cllavg -match '\d' -and $cllmax -match '\d') {
$x265Params += "max-cll=$cllmax,$cllavg"
}

# Add mastering display information if it exists
if ($null -ne $side_data_list -and $null -ne ($side_data_list.red_x)) {
$greenx = ([string]$side_data_list.green_x).split('/')[0]
$greeny = ([string]$side_data_list.green_y).split('/')[0]
$bluex = ([string]$side_data_list.blue_x).split('/')[0]
$bluey = ([string]$side_data_list.blue_y).split('/')[0]
$redx = ([string]$side_data_list.red_x).split('/')[0]
$redy = ([string]$side_data_list.red_y).split('/')[0]
$whitepointx = ([string]$side_data_list.white_point_x).split('/')[0]
$whitepointy = ([string]$side_data_list.white_point_y).split('/')[0]
$maxluminance = ([string]$side_data_list.max_luminance).split('/')[0]
$minluminance = ([string]$side_data_list.min_luminance).split('/')[0]
$greenx = ([string]$side_data_list.green_x).split('/')[0]
$greeny = ([string]$side_data_list.green_y).split('/')[0]
$bluex = ([string]$side_data_list.blue_x).split('/')[0]
$bluey = ([string]$side_data_list.blue_y).split('/')[0]
$redx = ([string]$side_data_list.red_x).split('/')[0]
$redy = ([string]$side_data_list.red_y).split('/')[0]
$whitepointx = ([string]$side_data_list.white_point_x).split('/')[0]
$whitepointy = ([string]$side_data_list.white_point_y).split('/')[0]
$maxluminance = ([string]$side_data_list.max_luminance).split('/')[0]
$minluminance = ([string]$side_data_list.min_luminance).split('/')[0]

if ($greenx -match '\d' -and $greeny -match '\d' -and $bluex -match '\d' -and $bluey -match '\d' -and $redx -match '\d' -and $redy -match '\d' -and $whitepointx -match '\d' -and $whitepointy -match '\d' -and $maxluminance -match '\d' -and $minluminance -match '\d') {
$masterDisplay = "G($greenx,$greeny)B($bluex,$bluey)R($redx,$redy)WP($whitepointx,$whitepointy)L($maxluminance,$minluminance)"
$x265Params += "master-display=$masterDisplay"
}
Expand Down
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@
- 4.5.1 Add repeat headers in with HDR metadata to prevent warnings.
- 4.5.2 Modify Invoke-Media(Shows/Movies)ToProcess function so that items items marked as no longer existing are only updated in the table once prior to update-processed running.
- 4.5.3 Improve Update-Metadata workflow with better protections.
- 4.5.4 Add output listing the table entry data for files once transcoding completes.
- 4.5.4 Add output listing the table entry data for files once transcoding completes.
- 4.5.5 Fix $null conditions not reading null
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.5.4
v4.5.5

0 comments on commit 31fb863

Please sign in to comment.