--- /dev/null
+#! /bin/sh
+
+TRACK=""
+
+while getopts a: opt; do
+ case $opt in
+ a) TRACK="-a $OPTARG" ;;
+ esac
+done
+shift `expr $OPTIND - 1`
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 input_dir [type [codec]]"
+ exit 1
+elif [ -z "$2" ]; then
+ type=vob
+ codec=ac3
+elif [ -z "$3" ]; then
+ type="$2"
+ codec=ac3
+elif [ -z "$4" ]; then
+ type="$2"
+ codec="$3"
+else
+ echo "Usage: $0 input_dir type codec"
+ exit 1
+fi
+
+tccat -i "$1" | tcextract -t "$type" -x "$codec" $TRACK | tcdecode -x "$codec" | tcscan -x pcm