From 5248831232fa22a1f3d6515f7f6c7bee8994faf2 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 21 Nov 2022 16:59:50 +0100 Subject: unify repos --- dhwt-codec/run | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 dhwt-codec/run (limited to 'dhwt-codec/run') diff --git a/dhwt-codec/run b/dhwt-codec/run new file mode 100755 index 0000000..9f7013e --- /dev/null +++ b/dhwt-codec/run @@ -0,0 +1,16 @@ +#!/bin/fish + +set f $argv[1] +set x $argv[2] +set y $argv[3] +set z $argv[4] + +# cat /dev/urandom | cargo run --release --bin import -- -x $x -y $y -z $z a/inp +ffmpeg -i $f -frames:v $z -filter_complex [0]scale={$x}x{$y},format=rgb24 -f rawvideo pipe:1 | cargo run --release --bin import -- -x $x -y $y -z $z a/inp + +time cargo run --release --bin encode -- -x $x -y $y -z $z a/inp a/enc +time cargo run --release --bin decode -- -x $x -y $y -z $z a/enc a/out + +cargo run --release --bin export -- -x (math $x / 2) -y (math $y / 2) -z (math $z / 2) a/enc | ffmpeg -y -pixel_format rgb24 -f rawvideo -video_size (math $x / 2)x(math $y / 2) -i pipe:0 a/enc.webm +cargo run --release --bin export -- -x $x -y $y -z $z a/out | ffmpeg -y -pixel_format rgb24 -f rawvideo -video_size {$x}x{$y} -i pipe:0 a/out.webm +# cargo run --release --bin export -- -x $x -y $y -z $z a/raw_out | ffplay -pixel_format rgb24 -f rawvideo -video_size {$x}x{$y} pipe:0 -- cgit v1.2.3-70-g09d2