aboutsummaryrefslogtreecommitdiff
path: root/old/dhwt-codec/run
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-05-05 15:09:54 +0200
committermetamuffin <metamuffin@disroot.org>2025-05-05 15:09:54 +0200
commit306f96164784a8cbf405e72fa4364d6523366e95 (patch)
tree51717fc139871baa438aad806f4923669ae0896c /old/dhwt-codec/run
parent9cc089e2d6e841879e430b01d2f3d92c8820523e (diff)
downloadvideo-codec-experiments-306f96164784a8cbf405e72fa4364d6523366e95.tar
video-codec-experiments-306f96164784a8cbf405e72fa4364d6523366e95.tar.bz2
video-codec-experiments-306f96164784a8cbf405e72fa4364d6523366e95.tar.zst
old dir
Diffstat (limited to 'old/dhwt-codec/run')
-rwxr-xr-xold/dhwt-codec/run16
1 files changed, 16 insertions, 0 deletions
diff --git a/old/dhwt-codec/run b/old/dhwt-codec/run
new file mode 100755
index 0000000..9f7013e
--- /dev/null
+++ b/old/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