This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fn = $args[0] | |
Start-Process -Wait -NoNewWindow 'cmd.exe' -ArgumentList "/C `"ffmpeg.exe -hide_banner -loglevel panic -i `"$fn`" -c:v copy -frames:v 1 -vbsf hevc_mp4toannexb -f hevc - | dovi_tool extract-rpu - -o `"$($fn).RPU.bin`"`"" | |
Start-Process -Wait -NoNewWindow 'cmd.exe' -ArgumentList "/C `"dovi_tool.exe info `"$($fn).RPU.bin`" -f 0 > `"$($fn).RPU.json`"`"" | |
$rpu = (Get-Content "$($fn).RPU.json" | Select-Object -Skip 1) | ConvertFrom-Json | |
if ($rpu.dovi_profile) { | |
Write-Output "Profile: $($rpu.dovi_profile)" | |
if ($rpu.dovi_profile -eq 5) { | |
Write-Output "Natively supported." | |
} |