This commit is contained in:
Brooke Vibber 2023-03-25 18:28:00 -07:00
parent 7b194147ef
commit e5adb72851
3 changed files with 42 additions and 0 deletions

10
video-cat/combine.sh Normal file
View file

@ -0,0 +1,10 @@
ffmpeg \
-r 60000/1001 \
-i 'frames/dither-%04d.png' \
-i 'cats-audio.wav' \
-ac 2 \
-ar 48000 \
-vf 'pad=w=640:h=360:x=52:y=20' \
-pix_fmt yuv420p \
-movflags +faststart \
-y cats-dither.mp4

17
video-cat/extract.sh Normal file
View file

@ -0,0 +1,17 @@
set -a
mkdir -p frames
ffmpeg \
-i 'cats computer fun.mp4' \
-vf 'scale=160:150,pad=h=160:y=5' \
-an \
-y 'frames/cats-%04d.png'
ffmpeg \
-i 'cats computer fun.mp4' \
-vn \
-ac 1 \
-ar 15734 \
-acodec pcm_u8 \
-y 'cats-audio.wav'

15
video-cat/video.sh Normal file
View file

@ -0,0 +1,15 @@
set -e
for frame in frames/cats-[0-9][0-9][0-9][0-9].png
do
n="${frame#frames/cats-}"
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