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