File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 44
55* Remove CloudApp uploading
66* Combine FPS and speed into a single flag
7+ * Add -l loop option
78
89## 2015-03-25
910
Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ gifify -r 60 recording.mov
4444gifify -r 30@2 recording.mov
4545```
4646
47+ - Convert it and output at 30 frames per second at 2x speed, with a single loop:
48+
49+ ``` sh
50+ gifify -r 30@2 -l 1 recording.mov
51+ ```
52+
4753## Regarding framerates:
4854
4955GIF renderers typically cap the framerate somewhere between 60 and 100 frames
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ function printHelpAndExit {
99 echo ' Options: (all optional)'
1010 echo ' c CROP: The x and y crops, from the top left of the image, i.e. 640:480'
1111 echo ' o OUTPUT: The basename of the file to be output (default "output")'
12+ echo ' l LOOP: The number of times to loop the animnation. 0 (default)'
13+ echo ' for infinity.'
1214 echo ' r FPS@SPEED: With [email protected] , output at 60FPS at a speed of 1.5x the' 1315 echo ' source material. NOTE: It is best to keep FPSxSPEED'
1416 echo ' below approximately 60.'
@@ -22,16 +24,18 @@ function printHelpAndExit {
2224
2325crop=
2426output=
27+ loop=0
2528fpsspeed=' 10@1'
2629scale=
2730
2831OPTERR=0
2932
30- while getopts ' c:o:p:r:s:' opt; do
33+ while getopts ' c:o:l: p:r:s:' opt; do
3134 case $opt in
3235 c) crop=$OPTARG ;;
3336 h) printHelpAndExit 0;;
3437 o) output=$OPTARG ;;
38+ l) loop=$OPTARG ;;
3539 r) fpsspeed=$OPTARG ;;
3640 p) scale=$OPTARG ;;
3741 * ) printHelpAndExit 1;;
@@ -86,5 +90,5 @@ delay=$(bc -l <<< "100/$fps/$speed")
8690temp=$( mktemp /tmp/tempfile.XXXXXXXXX)
8791
8892ffmpeg -loglevel panic -i " $filename " $filter -r $fps -f image2pipe -vcodec ppm - >> $temp
89- cat $temp | convert +dither -layers Optimize -delay $delay - " ${output} .gif"
93+ cat $temp | convert +dither -layers Optimize -loop $loop - delay $delay - " ${output} .gif"
9094echo " ${output} .gif"
You can’t perform that action at this time.
0 commit comments