Page 1 of 1

error trying to encode with HandBrakeCLI

Posted: Tue Sep 15, 2020 5:59 pm
by misdocumeno
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:

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
handbrake logs: https://pastebin.com/aQzBKYmZ

Re: error trying to encode with HandBrakeCLI

Posted: Tue Sep 15, 2020 9:28 pm
by Woodstock
Does the user you are running under have write privileges to the directory "./dirs2/csgo/"?