Created
August 20, 2014 16:44
-
-
Save mzgoddard/21e718968b03cf2eeac5 to your computer and use it in GitHub Desktop.
Revisions
-
mzgoddard created this gist
Aug 20, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/bin/zsh movieInput=$1 tmpFolder=$2 outName=$3 mkdir -p $tmpFolder ffmpeg -i $movieInput $tmpFolder/%03d.png for i in `ls $tmpFolder`; do j=`echo $i | sed s/\.png/.webp/` cwebp $tmpFolder/$i -o $tmpFolder/$j done webpmux `for i in \`ls $tmpFolder/*.webp\`; do echo -n "-frame $i +33+0+0+1+b "; done` `echo -n $4` -o $outName # To cheat a none looping animation, add the last frame again with a really # long timeout. A slightly higher value can be given then below but the below # value is already more than 2 days. # -frame last-frame.webp +9999999+0+0+1+b