]> code.delx.au - transcoding/blob - batchtoh264.sh
Fixed tomp4
[transcoding] / batchtoh264.sh
1 #!/bin/bash
2
3 # inputdesc specification:
4 #
5 # general options
6 # output_file\tinput_file\tspecific_options
7 # output_file\tinput_file\tspecific_options
8 #
9 # Example inputdesc
10 # --filters pp=ci,crop=704:576:10:0,scale=768:576,denoise3d,harddup
11 # 1x01.avi dvd://1 --dvd DISC1
12 # 1x02.avi dvd://1 --dvd DISC2
13
14
15 input="$1"
16 if [ -z "$input" ]; then
17 echo "Usage: $0 inputdesc"
18 exit 1
19 fi
20
21 # Read the general options
22 options="$(head -n 1 "$input")"
23
24 # Read each file description
25 tail -n +2 "$input" | while read line; do
26 out=$(echo "$line" | cut -d ' ' -f 1)
27 in=$(echo "$line" | cut -d ' ' -f 2)
28 specopts=$(echo "$line" | cut -d ' ' -f 3)
29 nice -n 10 toh264.py $options $specopts "$in" "$out"
30 done
31