aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshmibs <shmibs@gmail.com>2015-05-17 07:08:07 -0700
committershmibs <shmibs@gmail.com>2015-05-17 07:08:07 -0700
commit0ad8bff89d05dab2f4d3d1f7badcec93bb5e9c43 (patch)
tree180cc997f92041a4b47ec8faff773df2cd15f544
parenta2dac5ccbc2456c4f8a060b93b9396ccea4b530b (diff)
downloaddotfiles-0ad8bff89d05dab2f4d3d1f7badcec93bb5e9c43.tar.gz
add fps to make-gif
-rw-r--r--.zshrc14
1 files changed, 10 insertions, 4 deletions
diff --git a/.zshrc b/.zshrc
index f6cc903..d43551a 100644
--- a/.zshrc
+++ b/.zshrc
@@ -267,6 +267,12 @@ make-gif() {
else
t="-t"
fi
+
+ echo -n "fps [10]: "
+ read fps
+ if [[ -z "$fps" ]]; then
+ fps="10"
+ fi
echo -n "width [480]: "
read width
@@ -284,16 +290,16 @@ make-gif() {
if [[ $subs ]]; then
ffmpeg -y -ss "$start" $t "$length" -i "$1" \
- -copyts -vf "subtitles=make-gif-in,fps=10,scale=$width:-1:flags=lanczos,palettegen" make-gif-palette.png
+ -copyts -vf "subtitles=make-gif-in,fps=$fps,scale=$width:-1:flags=lanczos,palettegen" make-gif-palette.png
ffmpeg -ss "$start" $t "$length" -i "$1" $sub1 $sub2 -i make-gif-palette.png \
-copyts -filter_complex \
- "subtitles=make-gif-in,fps=10,scale=$width:-1:flags=lanczos[x];[x][1:v]paletteuse" \
+ "subtitles=make-gif-in,fps=$fps,scale=$width:-1:flags=lanczos[x];[x][1:v]paletteuse" \
out.gif
else
ffmpeg -y -ss "$start" $t "$length" -i "$1" \
- $sub1 $sub2 -vf "fps=10,scale=$width:-1:flags=lanczos,palettegen" make-gif-palette.png
+ $sub1 $sub2 -vf "fps=$fps,scale=$width:-1:flags=lanczos,palettegen" make-gif-palette.png
ffmpeg -ss "$start" $t "$length" -i "$1" $sub1 $sub2 -i make-gif-palette.png -filter_complex \
- "fps=10,scale=$width:-1:flags=lanczos[x];[x][1:v]paletteuse" \
+ "fps=$fps,scale=$width:-1:flags=lanczos[x];[x][1:v]paletteuse" \
out.gif
fi