To use the program:
- Install common lisp
- Make sure it's installed by typing 'clisp'
- Exec command "clisp path/to/file.lisp population string"
- Tweak population to find what works best for you
| #!/bin/bash | |
| # Based on http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | |
| # Requires ffmpeg | |
| filename="${1%.*}" | |
| palette="/tmp/palette.png" | |
| filters="scale=320:-1:flags=lanczos" | |
| ffmpeg -v warning -i "$1" -vf "$filters,palettegen" -y $palette | |
| ffmpeg -v warning -i "$1" -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y "$filename.gif" |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <errno.h> | |
| #include <string.h> | |
| #include <fcntl.h> | |
| #include <signal.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> |