This commit is contained in:
Brooke Vibber 2024-08-31 09:30:21 -07:00
parent 2c754703e1
commit 73a707f99d
4 changed files with 7 additions and 7 deletions

View file

@ -247,7 +247,7 @@ function colorize(input) {
// Try dithering with this palette.
for (let x = 0; x < width; x++) {
let rgb = inputPixel(x, error);
let luma = Math.round(rgb.luma() / 15);
let luma = Math.round(rgb.luma() * 15 / 255);
let pick = luma;
let diff = rgb.difference(atariRGB[palette[pick]]);
@ -558,7 +558,7 @@ async function saveImage(width, height, lines, dest) {
resolve(image);
});
});
await image.resize(Math.round(width2 * 4 / 1.2), height * 2);
await image.resize(Math.round(width2 * 4), height * 2);
await image.writeAsync(dest);
}

View file

@ -1,10 +1,10 @@
ffmpeg \
-r 60000/1001 \
-i 'frames/dither-%04d.png' \
-i 'frames/dither-%05d.png' \
-i 'rickroll-audio.wav' \
-ac 2 \
-ar 48000 \
-vf 'pad=w=534,setsar=9/10' \
-vf 'scale=534x384,setsar=1' \
-pix_fmt yuv420p \
-movflags +faststart \
-y rickroll-dither.mp4

View file

@ -4,9 +4,9 @@ mkdir -p frames
ffmpeg \
-i rickroll.mp4 \
-vf 'scale=320:192,framerate=60000/1001' \
-vf 'scale=320:230,framerate=60000/1001' \
-an \
-y 'frames/rickroll-%04d.png'
-y 'frames/rickroll-%05d.png'
ffmpeg \
-i rickroll.mp4 \

View file

@ -1,6 +1,6 @@
set -e
for frame in frames/rickroll-[0-9][0-9][0-9][0-9].png
for frame in frames/rickroll-[0-9][0-9][0-9][0-9][0-9].png
do
n="${frame#frames/rickroll-}"
n="${n%.png}"