#!/bin/fish set w $argv[1] set h $argv[2] set t $argv[3] ffmpeg -hide_banner -i $argv[4] -to {$t} -vf scale={$w}x{$h},fps=30,format=rgb24 -f rawvideo pipe:1 > samples/raw echo "file: "$argv[4] echo "resolution: "{$w}x{$h} echo "frames: "(math $t \* 30) for mode in trivial simple-exhaustive simple-fast advanced advanced-partial echo ----------- echo "mode: $mode" echo "time: $(command time -f %U ./target/release/encode -W {$w} -H {$h} --mode $mode $argv[5..] samples/encoded-$mode 2>| tail -n 1)s" echo "size: $(du -h samples/encoded-$mode | cut -f 1)" end