higher res chunks

This commit is contained in:
Crispy 2024-04-14 22:41:50 +02:00
parent a1b5dd9ce8
commit 6beebd0e1b

View file

@ -4,8 +4,10 @@ use std::{env, process::Command, thread, time::Duration};
// const HEIGHT: u32 = 7; // const HEIGHT: u32 = 7;
const WIDTH: u32 = 14; const WIDTH: u32 = 14;
const HEIGHT: u32 = 13; const HEIGHT: u32 = 13;
const CHUNK_W: u32 = 1280 / WIDTH;
const CHUNK_H: u32 = 1000 / HEIGHT;
const _SIZE: u32 = WIDTH * HEIGHT; const _SIZE: u32 = WIDTH * HEIGHT;
const SCALE: u32 = 2; // resolution of chunks // const SCALE: u32 = 2; // resolution of chunks
const OFFSET: f32 = 0.1; // time offset for starting const OFFSET: f32 = 0.1; // time offset for starting
fn main() { fn main() {
@ -35,11 +37,11 @@ fn generate() {
.arg(format!("{:.1}", offset)) .arg(format!("{:.1}", offset))
.arg("-filter_complex") .arg("-filter_complex")
.arg(dbg!(format!( .arg(dbg!(format!(
"[0:v]scale={}:{}[SC];[SC]crop={SCALE}:{SCALE}:{}:{}", "[0:v]scale=1280:1000[SC];[SC]crop={}:{}:{}:{}",
WIDTH * SCALE, CHUNK_W,
HEIGHT * SCALE, CHUNK_H,
x * SCALE, x * CHUNK_W,
y * SCALE y * CHUNK_H
))) )))
.arg("-an") .arg("-an")
.arg("-y") .arg("-y")