blob: 9fa17f6cff3913612d41d67ac60bcc75181008f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/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
# ffmpeg -hide_banner -y -i $argv[4] -to {$t} -vf scale={$w}x{$h},fps=30,format=rgb24 -c:v vp9 samples/reference.webm
echo
echo "file: "$argv[4]
echo "resolution: "{$w}x{$h}
echo "frames: "(math $t \* 30)
echo "reference (raw): "(du -h samples/raw | cut -f 1)
echo "reference (input): "(du -h $argv[4] | cut -f 1)
# echo "reference (vp8): "(du -h samples/reference.webm | cut -f 1)
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/raw >samples/encoded-$mode 2>| tail -n 1)s"
echo "size: $(du -h samples/encoded-$mode | cut -f 1)"
end
|