Skip to content

Instantly share code, notes, and snippets.

@mykeels
Created June 3, 2020 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mykeels/66dc360af24d742fdb82c19305d83c1d to your computer and use it in GitHub Desktop.
Save mykeels/66dc360af24d742fdb82c19305d83c1d to your computer and use it in GitHub Desktop.
A powershell script for converting mp4 files to gif, using ffmpeg
function global:Mp4ToGif()
{
$input=$args[0]
Write-Output "Input: $input"
ffmpeg -i "$input" -vf "split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment