diff options
author | metamuffin <metamuffin@disroot.org> | 2022-11-21 16:59:50 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-11-21 16:59:50 +0100 |
commit | 5248831232fa22a1f3d6515f7f6c7bee8994faf2 (patch) | |
tree | fdbff884248948d124ab864e21d65fe49c6ca0e2 /dhwt-codec/run | |
download | video-codec-experiments-5248831232fa22a1f3d6515f7f6c7bee8994faf2.tar video-codec-experiments-5248831232fa22a1f3d6515f7f6c7bee8994faf2.tar.bz2 video-codec-experiments-5248831232fa22a1f3d6515f7f6c7bee8994faf2.tar.zst |
unify repos
Diffstat (limited to 'dhwt-codec/run')
-rwxr-xr-x | dhwt-codec/run | 16 |
1 files changed, 16 insertions, 0 deletions
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 |