Created
January 28, 2023 23:46
-
-
Save Circl3s/0d19c7f6e3ec08ca3be12e869a237985 to your computer and use it in GitHub Desktop.
Powershell script for converting videos to gifs using ffmpeg :)
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
param( | |
[Parameter(Mandatory=$True)] | |
[String]$In, | |
[String]$Out, | |
[String]$Scale = "-1:-1" | |
) | |
if ($Out.Length -eq 0) { | |
$Out = (Get-Item $In).BaseName + ".gif" | |
} | |
ffmpeg.exe -i $In -filter_complex "[0:v] scale=$Scale [s]; [s] split [a][b]; [a] palettegen [p]; [b][p] paletteuse" $Out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment