Skip to content

Instantly share code, notes, and snippets.

张大伟 DreamAndDead

Block or report user

Report or block DreamAndDead

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="p5.js test bin">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.js"></script>
View video2gif.sh
#!/usr/bin/env bash
# usage: video2gif.sh screen-record.avi
palette="/tmp/palette.png"
filters="fps=20,scale=0:-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 "$1.gif"
You can’t perform that action at this time.