This commit is contained in:
Brooke Vibber 2023-03-25 18:57:09 -07:00
commit 38e9af3843
6 changed files with 79 additions and 16 deletions

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

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

22
video-doom/extract.sh Normal file
View file

@ -0,0 +1,22 @@
set -a
mkdir -p frames
TIME=37
ffmpeg \
-i 'doom-speedrun.webm' \
-t $TIME \
-r 60000/1001 \
-vf 'scale=160:192' \
-an \
-y 'frames/doom-%04d.png'
ffmpeg \
-i 'doom-speedrun.webm' \
-t $TIME \
-vn \
-ac 1 \
-ar 15734 \
-acodec pcm_u8 \
-y 'doom-audio.wav'

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

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