From c212fd05a522ce14188c4c14b4f0aef1543a5e75 Mon Sep 17 00:00:00 2001 From: awmpietro Date: Thu, 8 Oct 2020 19:56:38 -0300 Subject: [PATCH] Added ignore_loop option, so it can keep gif looping --- Readme.md | 1 + bin/gify | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index e1f7fe4..0bd4a58 100644 --- a/Readme.md +++ b/Readme.md @@ -46,6 +46,7 @@ gify('out.mp4', 'out.gif', opts, function(err){ - `rate` frame rate [10] - `start` start position in seconds or hh:mm:ss[.xxx] [0] - `duration` length of video to convert in seconds or hh:mm:ss[.xxx] [auto] + - `ignore_loop` `0` for infinite loop or`-1` not looping [-1] # License diff --git a/bin/gify b/bin/gify index 1d46bf6..24f87b3 100755 --- a/bin/gify +++ b/bin/gify @@ -16,10 +16,12 @@ program .usage('[options] infile outfile') .option('-w, --width [width]', 'max width [500]') .option('-h, --height [height]', 'max height [none]') + .option('-h, --height [height]', 'max height [none]') .option('-d, --delay [delay]', 'delay between frames [auto]') .option('-r, --rate [rate]', 'frame rate [10]') .option('-s, --start [time]', 'start position in seconds or hh:mm:ss[.xxx] format [0]') .option('-D, --duration [length]', 'length of video to convert in seconds or hh:mm:ss[.xxx] format [10]') + .option('-i, --ignore_loop [loop]', 'Loop' ) .parse(process.argv); if (program.args.length < 2) { @@ -35,7 +37,8 @@ var opts = { delay: program.delay, rate: program.rate, start: program.start, - duration: program.duration + duration: program.duration, + ignore_loop: program.ignore_loop }; gify(src, dst, opts, function(err) {