Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #This script recursively simulates compression of jpg and png files to jpg files without significant loss in visual quality with "mozjpeg" (https://github.com/mozilla/mozjpeg) with 243 sets of parameters (almost all possible parameter combinations). Text log files of the results are output to a folder in ./ in ascending alphabetical and numerical order, but no compressed files are actually produced. To make processing faster, rest of the simulations are skipped if the first simulation produces files that are larger than the original files.
- #8 june 2021 v1
- #mozjpeg-extreme-simulation-v1.sh was written in 8 june 2021 and tested to be functional with mozjpeg v 4.0.4 on Debian 10. This script works with files/folders containing at least %, $, *, white spaces horizontal tabs or newlines. "mozjpeg" command denoted in this script in mozjpeg v 4.0.4 is actually "cjpeg" unless a symbolic link after mozjpeg installation is created like so:
- #sudo ln -s /opt/mozjpeg/bin/cjpeg /usr/bin/mozjpeg
- #If no symbolic link is created, replace all instances of "mozjpeg" in this script to "cjpeg" to be able to use this script.
- #COPYRIGHT: this script is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/deed.en). The original creator of this script has no affiliation with "mozjpeg" or "Mozilla".
- printf "START:\t`date`\n"
- #Creates ./<YYYY-MM-DD_hh:mm>_<RANDOM NUMBER> folder for log files.
- rnd=$(date +%F_%H:%M_)$(printf $RANDOM | cut -c -3)
- mkdir ./$rnd
- printf "Log file location: ./$rnd\n"
- #Temp files to RAM as variables.
- R0="$(mktemp -p /dev/shm/)"
- R1="$(mktemp -p /dev/shm/)"
- R2="$(mktemp -p /dev/shm/)"
- R3="$(mktemp -p /dev/shm/)"
- while IFS= read -r -d '' i; do
- S=`date +%s`
- #Filename and size saved. If the name has newlines or tabs, they are converted to spaces so the names display well on terminal.
- name1="$(printf "$i" | tr '\n' ' ' | tr '\t' ' ')"
- name2="$(printf "$name1" | sed 's@.*/@@')"
- size="$(stat --printf="%s" "$i")"
- #Compression is simulated once. Compressed size in bytes are extracted and saved to a variable along with the used parameters.
- mozjpeg -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "$n\t-nojfif" > "$R1"
- #If compressed size is smaller than original size, then other parameters are skipped. Else: other parameters are tested.
- if(($size < $n)); then
- printf '%s: skipped, original file is smaller\n' "$name1"
- else
- printf '%s:' "$name1"
- mozjpeg -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -quant-baseline -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-baseline -nojfif" >> "$R1"
- mozjpeg -quant-table 0 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 0 -nojfif" >> "$R1"
- mozjpeg -quant-table 1 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 1 -nojfif" >> "$R1"
- mozjpeg -quant-table 2 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 2 -nojfif" >> "$R1"
- mozjpeg -quant-table 3 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 3 -nojfif" >> "$R1"
- mozjpeg -quant-table 4 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 4 -nojfif" >> "$R1"
- mozjpeg -quant-table 5 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 5 -nojfif" >> "$R1"
- mozjpeg -quant-table 6 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 6 -nojfif" >> "$R1"
- mozjpeg -quant-table 7 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 7 -nojfif" >> "$R1"
- mozjpeg -quant-table 8 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 8 -nojfif" >> "$R1"
- mozjpeg -quant-table 0 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 0 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -quant-table 0 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 0 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -quant-table 0 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 0 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -quant-table 1 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 1 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -quant-table 1 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 1 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -quant-table 1 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 1 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -quant-table 2 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 2 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -quant-table 2 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 2 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -quant-table 2 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 2 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -quant-table 3 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 3 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -quant-table 3 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 3 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -quant-table 3 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 3 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -quant-table 4 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 4 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -quant-table 4 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 4 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -quant-table 4 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 4 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -quant-table 5 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 5 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -quant-table 5 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 5 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -quant-table 5 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 5 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -quant-table 6 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 6 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -quant-table 6 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 6 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -quant-table 6 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 6 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -quant-table 7 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 7 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -quant-table 7 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 7 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -quant-table 7 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 7 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -quant-table 8 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 8 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -quant-table 8 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 8 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -quant-table 8 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-quant-table 8 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ssim -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -nojfif" >> "$R1"
- mozjpeg -tune-ssim -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ssim -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ssim -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ssim -quant-baseline -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-baseline -nojfif" >> "$R1"
- mozjpeg -tune-ssim -quant-table 0 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 0 -nojfif" >> "$R1"
- mozjpeg -tune-ssim -quant-table 1 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 1 -nojfif" >> "$R1"
- mozjpeg -tune-ssim -quant-table 2 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 2 -nojfif" >> "$R1"
- mozjpeg -tune-ssim -quant-table 3 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 3 -nojfif" >> "$R1"
- mozjpeg -tune-ssim -quant-table 4 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 4 -nojfif" >> "$R1"
- mozjpeg -tune-ssim -quant-table 5 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 5 -nojfif" >> "$R1"
- mozjpeg -tune-ssim -quant-table 6 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 6 -nojfif" >> "$R1"
- mozjpeg -tune-ssim -quant-table 7 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 7 -nojfif" >> "$R1"
- mozjpeg -tune-ssim -quant-table 8 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 8 -nojfif" >> "$R1"
- mozjpeg -tune-ssim -quant-table 0 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 0 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ssim -quant-table 0 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 0 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ssim -quant-table 0 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 0 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ssim -quant-table 1 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 1 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ssim -quant-table 1 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 1 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ssim -quant-table 1 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 1 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ssim -quant-table 2 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 2 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ssim -quant-table 2 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 2 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ssim -quant-table 2 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 2 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ssim -quant-table 3 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 3 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ssim -quant-table 3 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 3 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ssim -quant-table 3 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 3 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ssim -quant-table 4 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 4 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ssim -quant-table 4 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 4 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ssim -quant-table 4 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 4 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ssim -quant-table 5 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 5 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ssim -quant-table 5 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 5 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ssim -quant-table 5 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 5 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ssim -quant-table 6 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 6 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ssim -quant-table 6 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 6 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ssim -quant-table 6 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 6 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ssim -quant-table 7 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 7 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ssim -quant-table 7 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 7 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ssim -quant-table 7 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 7 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ssim -quant-table 8 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 8 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ssim -quant-table 8 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 8 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ssim -quant-table 8 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ssim -quant-table 8 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ms-ssim -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ms-ssim -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ms-ssim -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-baseline -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-baseline -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 0 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 0 -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 1 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 1 -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 2 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 2 -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 3 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 3 -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 4 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 4 -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 5 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 5 -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 6 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 6 -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 7 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 7 -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 8 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 8 -nojfif" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -nojfif" >> "$R1"
- mozjpeg -dct float -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -quant-baseline -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-baseline -nojfif" >> "$R1"
- mozjpeg -dct float -quant-table 0 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 0 -nojfif" >> "$R1"
- mozjpeg -dct float -quant-table 1 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 1 -nojfif" >> "$R1"
- mozjpeg -dct float -quant-table 2 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 2 -nojfif" >> "$R1"
- mozjpeg -dct float -quant-table 3 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 3 -nojfif" >> "$R1"
- mozjpeg -dct float -quant-table 4 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 4 -nojfif" >> "$R1"
- mozjpeg -dct float -quant-table 5 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 5 -nojfif" >> "$R1"
- mozjpeg -dct float -quant-table 0 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 0 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -quant-table 0 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 0 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -quant-table 0 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 0 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -quant-table 1 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 1 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -quant-table 1 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 1 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -quant-table 1 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 1 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -quant-table 2 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 2 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -quant-table 2 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 2 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -quant-table 2 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 2 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -quant-table 3 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 3 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -quant-table 3 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 3 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -quant-table 3 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 3 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -quant-table 4 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 4 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -quant-table 4 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 4 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -quant-table 4 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 4 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -quant-table 5 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 5 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -quant-table 5 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 5 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -quant-table 5 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 5 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -quant-table 6 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 6 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -quant-table 6 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 6 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -quant-table 6 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 6 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -quant-table 7 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 7 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -quant-table 7 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 7 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -quant-table 7 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 7 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -quant-table 8 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 8 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -quant-table 8 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 8 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -quant-table 8 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -quant-table 8 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ssim -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ssim -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ssim -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-baseline -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-baseline -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 0 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 0 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 1 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 1 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 2 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 2 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 3 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 3 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 4 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 4 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 5 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 5 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 6 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 6 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 7 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 7 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 8 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 8 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 0 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 0 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 0 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 0 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 0 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 0 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 1 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 1 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 1 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 1 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 1 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 1 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 2 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 2 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 2 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 2 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 2 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 2 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 3 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 3 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 3 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 3 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 3 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 3 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 4 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 4 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 4 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 4 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 4 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 4 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 5 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 5 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 5 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 5 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 5 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 5 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 6 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 6 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 6 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 6 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 6 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 6 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 7 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 7 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 7 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 7 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 7 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 7 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 8 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 8 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 8 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 8 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ssim -quant-table 8 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ssim -quant-table 8 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-baseline -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-baseline -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 0 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 0 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 1 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 1 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 2 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 2 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 3 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 3 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 4 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 4 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 5 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 5 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 6 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 6 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 7 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 7 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 8 -nojfif -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 8 -nojfif" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 0 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 1 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 2 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 3 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 4 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 5 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 6 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 7 -nojfif -dc-scan-opt 2" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 0 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 0" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 1 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 1" >> "$R1"
- mozjpeg -dct float -tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 2 -memdst "$i" > "$R0" 2>&1
- n=$(grep -oE "[0-9]+" "$R0"); printf "\n$n\t-dct float -tune-ms-ssim -quant-table 8 -nojfif -dc-scan-opt 2" >> "$R1"
- #Files are sorted alphabetically by parameter names and numerically by size in bytes.
- sort -k 2 "$R1" > "$R2"
- sort -n "$R1" > "$R3"
- E=`date +%s`
- T=$(("$E"-"$S"))
- sed -i -e "1iSeconds spent processing: $T\nBytes\tFilename/parameters\n$size\t$name1" "$R2" "$R3"
- #Creates an unique suffix for the log files of the file being processed. The suffix has filename (up to 30 char) and 5 random char, which attempt to prevent overwriting if there are multiple identical filenames in subfolders.
- log=$(printf "$(echo "$name2" | cut -c -30)"-"$(</dev/urandom tr -cd 'a-zA-Z0-9' | head -c5; echo -n "")")
- #RAM files are written to disk in log folder.
- cp "$R2" "./$rnd/$log-alph.txt"
- cp "$R3" "./$rnd/$log-nume.txt"
- printf ' %s sec spent on file, log prefix: %s\n' "$T" "$log"
- fi
- #Finds recursively files with variable extensions. Add "-maxdepth 1" after "find" to search non-recursively. To compress e.g. png files only, remove "-iname '*.jpg' -o -iname '*.jpeg' -o".
- done < <(find . -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \) -print0)
- #Temp files are removed from RAM.
- rm -f "$R0" "$R1" "$R2" "$R3"
- printf "END:\t`date`\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement