A growing collection of ffmpeg tools to convert (Quicktime and other) videos to gif or other optimized formats.
Last active
January 31, 2020 16:27
-
-
Save RichardBronosky/d9c80100ac7c9b1e76fbde1adf8e768b to your computer and use it in GitHub Desktop.
A growing collection of ffmpeg tools to convert (Quicktime and other) videos to gif or other optimized formats
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
#!/usr/bin/env bash -eu | |
# Usage: ffmpeg_chat.sh input.mov [output.mp4] | |
# from: https://andrekr.github.io/ffmpeg-command-line-wizard/ | |
ffmpeg -hide_banner -i "$1" -c:v libx264 -preset medium -movflags faststart -vsync 2 -enc_time_base -1 -crf 23 "${2:-${1/\.[^.]*/}.mp4}" |
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
#!/usr/bin/env bash | |
# Usage: gifenc.sh input.mov [output.gif] | |
# from: http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | |
palette="/tmp/palette.png" | |
filters="fps=5" | |
ffmpeg -v warning -i "$1" -vf "$filters,palettegen" -y $palette | |
ffmpeg -v warning -i "$1" -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y "${2:-${1/\.[^.]*/}.gif}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment