1
0
Fork 0

bulk: changing experiments structure and how i use it.

This commit is contained in:
Strix 2025-06-27 16:23:34 +02:00
parent 20d4c9d3b7
commit 521c5b0063
20 changed files with 802 additions and 0 deletions

41
machine/shrink-video/shrink.sh Executable file
View file

@ -0,0 +1,41 @@
#!/bin/bash
crf=${CRF:-25}
video_codec=${VIDEO_CODEC:-libsvtav1}
audio_codec=${AUDIO_CODEC:-libopus}
while getopts ":c:v:a:" opt; do
case $opt in
c)
crf=$OPTARG
;;
v)
video_codec=$OPTARG
;;
a)
audio_codec=$OPTARG
;;
\?)
echo "no such arg!"
exit 1
;;
esac
done
shift $((OPTIND-1))
if [ $# -eq 0 ]; then
echo "no file selected"
exit 1
fi
if ! [ -f $1 ]; then
echo "no such file"
exit 2
fi
ffmpeg \
-i $1 \
-crf $crf \
-c:v $video_codec \
-c:a $audio_codec \
${2:-out.$1}