This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'cdumitru' | |
import sys | |
from Crypto.Cipher import ARC4 | |
import numpy | |
import string | |
import itertools | |
from multiprocessing import Pool | |
from time import time | |
import cProfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# used for turning octoprint items into timelapse gifs. | |
# usage ./mkgif.sh <input_movie> <output_gif> | |
# - error checking is for people who type things poorly :) | |
FPS=10 | |
# Option 1 | |
# http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality | |
PALETTE="pallet-$1.png" | |
ffmpeg -y -i $1 -vf fps=$FPS,scale=800:-1:flags=lanczos,palettegen "$PALETTE" | |
ffmpeg -i $1 -i "$PALETTE" -filter_complex "fps=$FPS,scale=800:-1:flags=lanczos[x];[x][1:v]paletteuse" $2 |