Get all of the deps from brew:
brew update
brew upgrade
brew install hg git go cmake ninja
import { RingBuffer } from "ringbuf.js"; | |
import { Worker } from "worker_threads"; | |
// https://github.com/padenot/ringbuf.js/blob/main/js/ringbuf.js | |
// https://github.com/padenot/ringbuf.js/blob/main/tests/test.mjs | |
async function main () { | |
const arraySize = Math.round(Math.random() * 48000); |
# how to generate hls outputs | |
# from https://ottverse.com/hls-packaging-using-ffmpeg-live-vod/ | |
# had to make a slight adjustment for zsh by wrapping quotes around the -map params, as explained in https://stackoverflow.com/a/60290103/1927767 | |
ffmpeg -i input.mp4 \ | |
-filter_complex \ | |
"[0:v]split=3[v1][v2][v3]; \ | |
[v1]copy[v1out]; [v2]scale=w=960:h=540[v2out]; [v3]scale=w=480:h=270[v3out]" \ | |
-map "[v1out]" -c:v:0 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:0 5M -maxrate:v:0 5M -minrate:v:0 5M -bufsize:v:0 10M -preset slow -g 48 -sc_threshold 0 -keyint_min 48 \ | |
-map "[v2out]" -c:v:1 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:1 3M -maxrate:v:1 3M -minrate:v:1 3M -bufsize:v:1 3M -preset slow -g 48 -sc_threshold 0 -keyint_min 48 \ |
# resize | |
ffmpeg -i input.mp4 -vf scale=1920:1080 output.mp4 | |
# resize with high quality | |
ffmpeg -i input.mp4 -vf scale=1920:1080 -preset slow -crf 18 output.mp4 |
ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 input.mp4 |
brew install ffmpeg --with-fdk-aac | |
ffmpeg -i movie.avi movie.mp4 |
brew install imagemagick | |
mogrify -resize 50% -format png * |
let level = require('./level.js') | |
// given a tiled level that references a tileset of certain dimensions, update to a tileset of different dimensions | |
let idx = -1 | |
const locations = [ ] | |
do { |
function createDiscreteProblem () { | |
return { | |
allAssignments: [ ], | |
variables: { }, | |
constraints: [ ] | |
} | |
} |