Skip to content

Commit

Permalink
webmify function. v nice
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Oct 31, 2014
1 parent 3506246 commit fa2f782
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .functions
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
time convert -verbose +dither -layers Optimize -resize 900x900\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
Expand All @@ -157,3 +157,8 @@ gifify() {
fi
}

# turn that video into webm.
# brew reinstall ffmpeg --with-libvpx
webmify(){
ffmpeg -i $1 -vcodec libvpx -acodec libvorbis -isync -copyts -aq 80 -threads 3 -qmax 30 -y $2 $1.webm
}
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ install pv
install rename
install tree
install zopfli
install ffmpeg --with-libvpx

# Remove outdated versions from the cellar
cleanup

0 comments on commit fa2f782

Please sign in to comment.