Skip to content

Instantly share code, notes, and snippets.

@i8degrees
Last active May 27, 2017 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save i8degrees/4bd940e31e61fbd9ef53ce948680effd to your computer and use it in GitHub Desktop.
Save i8degrees/4bd940e31e61fbd9ef53ce948680effd to your computer and use it in GitHub Desktop.
Naughty Girl: Search Suggestion/Autocomplete (Rxjs,Ramda, Fetch)
#!/usr/bin/env bash
#
# [Naughty Girl: Search Suggestion/Autocomplete (Rxjs,Ramda, Fetch)](http://codepen.io/fielding/pen/Vbdppm)
all: bn-mp4
# all: bn-mp4 bn-webm
clean:
rm -rfv tmp/*
bn-mp4: clean
ffmpeg -y -i ./images/bn.mp4 -vf "scale=320:-1:flags=lanczos,palettegen" ./tmp/mp4-palette_320.png
# ffmpeg -y -i ./images/bn.mp4 -vf "scale=640:-1:flags=lanczos,palettegen" ./tmp/mp4-palette_640.png
ffmpeg -y -i ./images/bn.mp4 -i ./tmp/mp4-palette_320.png -lavfi "scale=320:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" -an ./images/mp4-bn320.gif
# ffmpeg -y -i ./images/bn.mp4 -i ./tmp/mp4-palette_640.png -lavfi "scale=640:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" -an ./images/mp4-bn640.gif
bn-webm: clean
ffmpeg -y -i ./images/bn.webm -vf "scale=320:-1:flags=lanczos,palettegen" ./tmp/webm-palette_320.png
# ffmpeg -y -i ./images/bn.webm -vf "scale=640:-1:flags=lanczos,palettegen" ./tmp/webm-palette_640.png
ffmpeg -y -i ./images/bn.webm -i ./tmp/webm-palette_320.png -lavfi "scale=320:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" -an ./images/webm-bn320.gif
# ffmpeg -y -i ./images/bn.webm -i ./tmp/webm-palette_640.png -lavfi "scale=640:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" -an ./images/webm-bn640.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment