File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ set -euo pipefail
4+
35function printHelpAndExit {
46 echo ' Usage:'
57 echo ' gifify [options] filename'
@@ -18,7 +20,10 @@ function printHelpAndExit {
1820 exit $1
1921}
2022
23+ crop=
24+ output=
2125fpsspeed=' 10@1'
26+ scale=
2227
2328OPTERR=0
2429
7075# frame delays < 3 to 3 or sometimes 10. Source:
7176# http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546
7277
73- echo ' Exporting movie...'
74-
7578fps=$( echo $fpsspeed | cut -d' @' -f1)
7679speed=$( echo $fpsspeed | cut -d' @' -f2)
7780
@@ -83,7 +86,5 @@ delay=$(bc -l <<< "100/$fps/$speed")
8386temp=$( mktemp /tmp/tempfile.XXXXXXXXX)
8487
8588ffmpeg -loglevel panic -i " $filename " $filter -r $fps -f image2pipe -vcodec ppm - >> $temp
86-
87- echo ' Making gif...'
8889cat $temp | convert +dither -layers Optimize -delay $delay - " ${output} .gif"
8990echo " ${output} .gif"
You can’t perform that action at this time.
0 commit comments