error trying to encode with HandBrakeCLI
Posted: Tue Sep 15, 2020 5:59 pm
I'm trying to make a little script with git bash (Windows 10) to recursively encode everything inside a folder, but I get an error
git bash script:
handbrake logs: https://pastebin.com/aQzBKYmZ
git bash script:
Code: Select all
#!/bin/bash
# remove all spaces
find . -depth -name '* *' \
| while IFS= read -r f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done
# list all files
rm filelist.txt
find ./dirs -maxdepth 10 -type f -print0 |
while IFS= read -rd '' dir
do
echo "$dir" >> filelist.txt
done
# handbrake
ARGS="-f av_mp4 -e x265_10bit -q 28.0 -r 30.0 -E mp3 -B 96 -w 1280 -l 720"
while IFS= read -r line
do
./HandBrakeCLI.exe -i ${line} -o ${line/dirs/dirs2} ${ARGS}
done < filelist.txt