From 527ef1ef05d09afe9da9c2153d329014983fb8e8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 24 Mar 2023 03:08:40 -0700 Subject: [PATCH] bwahahah --- video/combine.sh | 9 +++++++++ video/extract.sh | 17 +++++++++++++++++ video/video.sh | 15 +++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 video/combine.sh create mode 100644 video/extract.sh create mode 100644 video/video.sh diff --git a/video/combine.sh b/video/combine.sh new file mode 100644 index 0000000..75e7117 --- /dev/null +++ b/video/combine.sh @@ -0,0 +1,9 @@ +ffmpeg \ + -r 60000/1001 \ + -i 'frames/dither-%04d.png' \ + -i 'colamath-audio.wav' \ + -ac 2 \ + -ar 48000 \ + -vf 'pad=w=534' \ + -pix_fmt yuv420p \ + -y colamath-dither.mp4 diff --git a/video/extract.sh b/video/extract.sh new file mode 100644 index 0000000..e626e3c --- /dev/null +++ b/video/extract.sh @@ -0,0 +1,17 @@ +set -a + +mkdir -p frames + +ffmpeg \ + -i colamath-dv.avi \ + -vf 'yadif=1,scale=160:200,crop=h=160' \ + -an \ + -y 'frames/colamath-%04d.png' + +ffmpeg \ + -i colamath-dv.avi \ + -vn \ + -ac 1 \ + -ar 15734 \ + -acodec pcm_u8 \ + -y 'colamath-audio.wav' diff --git a/video/video.sh b/video/video.sh new file mode 100644 index 0000000..3a21da7 --- /dev/null +++ b/video/video.sh @@ -0,0 +1,15 @@ +set -e + +for frame in frames/colamath-[0-9][0-9][0-9][0-9].png +do + n="${frame#frames/colamath-}" + n="${n%.png}" + out="frames/dither-${n}" + last="${n:0-1}" + node ../dither-image.js "$frame" "$out" & + if (( last == 9 )) + then + wait + fi +done +wait