functions/public/Resize-Video.ps1
function Resize-Video { [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [string] $Path, [Parameter(Mandatory = $true)] [string] $Destination, [Parameter(Mandatory = $false)] [int] $Height = -1, [Parameter(Mandatory = $false)] [int] $Width = -1 ) if ($Height -eq -1 -and $Width -eq -1) { throw 'You must specify either -Height or -Width, or both.' return } ffmpeg -i "$Path" -vf scale=$Width`:$Height "$Destination" } |