Last active
January 8, 2022 12:10
-
-
Save couleurm/6fdbddaf30737261abd3a3db3f8f89c9 to your computer and use it in GitHub Desktop.
This is the post install script when installing blur https://github.com/couleur-tweak-tips/utils/blob/main/bucket/blur.json
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
$defaults = @' | |
- blur | |
blur: true | |
blur amount: 1.27 | |
blur output fps: 60 | |
blur weighting: equal | |
- interpolation | |
interpolate: true | |
interpolated fps: 960 | |
- advanced rendering | |
gpu: false | |
gpu type (nvidia/amd/intel): nvidia | |
deduplicate: true | |
custom ffmpeg filters: -c:v libx264 -preset slow -crf 18 | |
# Feel free to comment the one above and uncomment the one that fits your specs: | |
# NVIDIA (NVENC) | |
#custom ffmpeg filters: -c:v hevc_nvenc -rc constqp -preset p7 -qp 18 | |
# AMD (AMF) | |
#custom ffmpeg filters: -c:v hevc_amf -quality quality -qp_i 16 -qp_p 18 -qp_b 20 | |
- advanced interpolation | |
interpolation program (svp/rife/rife-ncnn): svp | |
interpolation speed: fast | |
interpolation tuning: weak | |
interpolation algorithm: 23 | |
- advanced blur | |
blur weighting gaussian std dev: 2 | |
blur weighting triangle reverse: false | |
blur weighting bound: [0,2] | |
- timescale | |
input timescale: 1 | |
output timescale: 1 | |
adjust timescaled audio pitch: false | |
# Quality is useless to tune if you have custom FFmpeg output (which you should do anyways) | |
- rendering | |
quality: 18 | |
preview: false | |
detailed filenames: true | |
- filters | |
brightness: 1 | |
saturation: 1 | |
contrast: 1 | |
'@ | |
function Get-Path ($FileName){ | |
if (-Not(Get-Command $FileName -Ea Ignore)){return $null} | |
switch ($FileName.Split('.')[1]){ | |
'shim'{ | |
$Path = ((Get-Content ((Get-Command $FileName).source)) -split ' = ')[1] | |
} | |
'exe'{ | |
$BaseName = $FileName.Split('.')[0] | |
if (Get-Command "$BaseName.shim" -Ea Ignor){ | |
$Path = ((Get-Content ((Get-Command "$BaseName.shim").source)) -split 'path = ')[1] | |
}else{$Path = (Get-Command $FileName).source} | |
} | |
} | |
if(-Not($Path)){$Path = (Get-Command $FileName).Source} | |
return $Path | |
} | |
$SendTo = Join-Path ([Environment]::GetFolderPath('SendTo')) blur.lnk | |
$Videos = Join-Path ([Environment]::GetFolderPath('MyVideos')) blur-config.lnk | |
$yml = "$dir\blur-config.yml" | |
if(-Not(Test-Path $yml)){Set-Content -Path $yml -Value $defaults -Force -Ea Continue} | |
if (Get-Command code -Ea Ignore){$script:textEditor = 'code'}else{$script:textEditor='notepad.exe'} | |
# blur-config shortcut | |
$WshShell = New-Object -comObject WScript.Shell | |
$Shortcut = $WshShell.CreateShortcut("$Videos") | |
$Shortcut.TargetPath = "$((Get-Command $textEditor).Source)" | |
$Shortcut.Arguments = "$yml" | |
$Shortcut.Save() | |
# blur-cli shortcut | |
$WshShell = New-Object -comObject WScript.Shell | |
$Shortcut = $WshShell.CreateShortcut("$SendTo") | |
$Shortcut.TargetPath = "blur-cli.exe" | |
$Shortcut.IconLocation = "$(Get-Path blur.exe)" | |
$Shortcut.Arguments = "-i" | |
$Shortcut.Save() | |
& $Videos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment