February 10, 201313 yr working on a script to reduce the size of some of my tv recordings. the first part works correct - creates a file listing all the files within the recording directory that I want to convert. If handbrake can't work with a file, the script works and ties the next one, however, as soon as I get a encode successful from handbrake the script stops and does not start the next file. any ideas. sourcedir="/recording/" destdir="/recording/output" cd "$sourcedir" log="./log.log" echo "" > filelist.lst find . -type f -name '*.mkv' | while read fname do # junk = fname echo $fname >> filelist.lst done echo "new Run" > log.log while read -r fname; do echo $fname >> log.log echo "Converting $fname to $destdir/${fname##./}" >> log.log junk="$destdir/${fname##./}" junk1="${junk%/*v}" echo $junk1 >> log.log /usr/bin/HandBrakeCLI --no-dvdnav -e x264 -a 1,1 -B 160,160 -6 dp12,auto -R Auto,Auto -D 0.0,0.0 -f mkv -4 --decomb --loose-anamorphic -m -x b-adapt=2:rc-looahead=5- --crop 0:0:0:0 -E copy:ac3,copy:aac -B 192 --audio-fallback ffac3 --large-file --vfr -q 16 -O -s 1 -i "$fname" -o "$destdir/${fname##./}" done<filelist.lst
Archived
This topic is now archived and is closed to further replies.