-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbatch.sh
More file actions
executable file
·52 lines (44 loc) · 982 Bytes
/
Copy pathbatch.sh
File metadata and controls
executable file
·52 lines (44 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
set -e
# Check arguments
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <INPUT_FILE> <OUTPUT_DIR>"
exit 1
fi
INPUT_FILE="$1"
OUTPUT_DIR="$2"
# Validate input file
if [ ! -f "$INPUT_FILE" ]; then
echo "Error: input file not found: $INPUT_FILE"
exit 1
fi
# Create output directories
mkdir -p \
"$OUTPUT_DIR/640x480" \
"$OUTPUT_DIR/640x640" \
"$OUTPUT_DIR/720x576"
# Loop over resolutions
for R in 640x480 640x640 720x576; do
case "$R" in
640x480)
WIDTH=640
HEIGHT=480
;;
640x640)
WIDTH=640
HEIGHT=640
;;
720x576)
WIDTH=720
HEIGHT=576
;;
esac
# Loop over cx values
for C in 4.26 3.01 2.27 2.13 2.01 1.42; do
echo "Running: bcrg -W $WIDTH -H $HEIGHT -cx $C -o $OUTPUT_DIR/$R $INPUT_FILE"
bcrg -W "$WIDTH" -H "$HEIGHT" -cx "$C" \
-o "$OUTPUT_DIR/$R" \
"$INPUT_FILE"
echo "Command done for -W $WIDTH -H $HEIGHT -cx $C -o $OUTPUT_DIR/$R"
done
done