]> git.phdru.name Git - audio-cdr-video.git/blob - video/tc_calc_bitrate
Initail import
[audio-cdr-video.git] / video / tc_calc_bitrate
1 #! /bin/sh
2
3 TRACK=""
4
5 while getopts a: opt; do
6    case $opt in
7       a) TRACK="-a $OPTARG" ;;
8    esac
9 done
10 shift `expr $OPTIND - 1`
11
12 if [ -z "$1" ]; then
13    echo "Usage: $0 input_dir [type [codec]]"
14    exit 1
15 elif [ -z "$2" ]; then
16    type=vob
17    codec=ac3
18 elif [ -z "$3" ]; then
19    type="$2"
20    codec=ac3
21 elif [ -z "$4" ]; then
22    type="$2"
23    codec="$3"
24 else
25    echo "Usage: $0 input_dir type codec"
26    exit 1
27 fi
28
29 tccat -i "$1" | tcextract -t "$type" -x "$codec" $TRACK | tcdecode -x "$codec" | tcscan -x pcm