]> code.delx.au - transcoding/commitdiff
Fixed hencode-recursive
authorJames Bunton <jamesbunton@delx.net.au>
Fri, 14 Jun 2013 15:13:11 +0000 (01:13 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Fri, 14 Jun 2013 15:13:11 +0000 (01:13 +1000)
hencode-recursive

index 61967d3b2a7c18f6085a30d2bc2041feb4c6fe72..8fd7314bbc5d8e400b5e4ed1643b81ebb309c3e6 100755 (executable)
@@ -9,8 +9,7 @@ sourcedir="$(cd "$1" && pwd)"
 destdir="$(cd "$2" && pwd)"
 
 cd "$sourcedir"
-IFS=$(echo -en "\n")
-for infile in $(find . -type f); do
+find . -type f | while read infile; do
        if [ ! -r "$infile" ]; then
                echo "Missing file $infile"
                exit 1
@@ -21,12 +20,17 @@ for infile in $(find . -type f); do
                continue
        fi
        mkdir -p "$(dirname "$outfile")"
-       HandBrakeCLI \
-               --preset Universal \
+       HandBrakeCLI < /dev/null \
+               --format mp4 \
+               --encoder x264 \
+               --encopts cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6 \
+               --markers \
                --quality 21 \
                --deinterlace \
                --loose-anamorphic \
                --crop 24:24:24:24 \
+               --aencoder faac \
+               --ab 160 \
                --input "$infile" \
                --output "$outfile"
 done