-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCompatabilityTest.ps1
More file actions
26 lines (25 loc) · 1.01 KB
/
CompatabilityTest.ps1
File metadata and controls
26 lines (25 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#Future addition- check if your CPU/GPU Is capable of transcoding.
function Confirm-CompatibleHardwareEncoder {
$Url = "https://raw.githubusercontent.com/dmankl/HomeCode/master/GPU.csv"
$GPUs = Invoke-WebRequest -Uri $Url -UseBasicParsing | ConvertFrom-Csv
$graphicsCards = @(Get-CimInstance win32_VideoController) | Where-Object {$_.VideoProcessor -like "NVIDIA*"} | ForEach-Object {$_.VideoProcessor -Replace 'NVIDIA ', ''}
$supportedGPU = @()
ForEach ($Graphic in $graphicsCards) {
if ($GPUs.gpu -contains $Graphic) {
$supportedGPU += $Graphic
}
}
if ($supportedGPU.count -ge 0) {
return $true
}
else {
return $false
}
}
if (Confirm-CompatibleHardwareEncoder) {
$URL = "https://raw.githubusercontent.com/dmankl/HomeCode/master/HEVC_Conversion.ps1"
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString("$URL"))
}else {
Read-Host "It seems you do not have a compatible CPU/GPU to convert to HEVC, Exiting."
Break
}