Last active
May 20, 2016 09:11
Star
You must be signed in to star a gist
Video2GIF Convert a video file (maybe a ScreenCast) to a GIF - I usually use QuickCast to output an MP4 video file, then convert it into a GIF
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
#!/bin/bash | |
IN="quickcast.mp4" | |
OUT="output.gif" | |
# INPUT FILE: quickcast.mp4 | |
# OUTPUT FILE: output.gif | |
ffmpeg -y -i $IN -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png | |
ffmpeg -i $IN -i palette.png -filter_complex "fps=5,scale=640:-1:flags=lanczos[x];[x][1:v]paletteuse" -y $OUT | |
ffmpeg -t 20 -i $IN -i palette.png -filter_complex "fps=10,scale=640:-1:flags=lanczos[x];[x][1:v]paletteuse" -y $OUT | |
# ffmpeg -t 20 -i $IN -i palette.png -filter_complex "crop=0:0:0:0,fps=10,scale=640:-1:flags=lanczos[x];[x][1:v]paletteuse" -y $OUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment