Extension/Resize.RoughDraft.Extension.ps1
<# .Synopsis Resizes a video .Description Applies the resize filter to a video. .EXAMPLE Convert-Media .LINK https://ffmpeg.org/ffmpeg-filters.html#scale-1 #> [Runtime.CompilerServices.Extension()] # It's an extension [Management.Automation.Cmdlet("^(Convert|Edit|Show)","Media")] # that extends Convert/Edit/Show-Media [ComponentModel.Inheritance("Inherited")] param( # The width and height used to resize the video. [Parameter(Mandatory)] [ValidatePattern("\d{1,}x\d{1,}")] [string] $Resize ) "-vf" # Use the [scale videofilter](https://ffmpeg.org/ffmpeg-filters.html#scale-1) "`"scale=$($Resize.Replace("x", ":"))`"" |